/* ── Cookie banner — paleta institucional del intranet ── */

/* Overlay full-screen */
.cookie-overlay {
  display: none; /* JS lo cambia a flex */
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
}

/* selector simple de cookies.php */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #1E3A5F;
  color: #e2e8f0;
  padding: 14px 28px;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 -3px 16px rgba(0,0,0,.28);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes cookieSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Card central */
.cookie-banner {
  width: 100%;
  max-width: 860px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: 4px solid #2563EB;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: #374151;
}

/* Cabecera */
.cookie-top {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}

.cookie-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.cookie-text h3 {
  font-size: .95rem;
  font-weight: 700;
  color: #1E3A5F;
  margin: 0 0 .3rem;
  font-family: inherit;
  letter-spacing: normal;
}

.cookie-text p {
  font-size: .82rem;
  color: #4b5563;
  line-height: 1.55;
  margin: 0;
}

.cookie-text a {
  color: #2563EB;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-text a:hover { color: #1d4ed8; }

/* Paneles de categorías */
.cookie-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}

.cookie-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .75rem .9rem;
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}

.cookie-panel input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #2563EB;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.cookie-panel input[type="checkbox"]:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.panel-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 2px;
}

.panel-desc {
  font-size: .72rem;
  color: #6b7280;
  line-height: 1.4;
}

.panel-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: #eff6ff;
  color: #2563EB;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: .3px;
}

/* Botones */
.cookie-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.btn-cookie {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  padding: .5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s;
  line-height: 1;
  letter-spacing: .2px;
}
.btn-cookie:hover  { opacity: .88; }
.btn-cookie:active { opacity: .75; }

.btn-reject {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
}
.btn-reject:hover { background: #f1f5f9; opacity: 1; }

.btn-custom {
  background: transparent;
  border: 1px solid #2563EB;
  color: #2563EB;
}
.btn-custom:hover { background: #eff6ff; opacity: 1; }

.btn-accept {
  background: #2563EB;
  color: #fff;
}
.btn-accept:hover { background: #1d4ed8; opacity: 1; }

/* Botón simple "De acuerdo" de cookies.php */
#accept-cookies {
  display: inline-block;
  background: #2563EB;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 18px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
#accept-cookies:hover { background: #1d4ed8; }

.cookie-mini-note {
  font-size: .7rem;
  color: #9ca3af;
  text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
  .cookie-banner {
    padding: 1.1rem 1rem;
    border-radius: 10px;
  }
  .cookie-panels {
    grid-template-columns: 1fr;
  }
  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-cookie {
    text-align: center;
    padding: .65rem;
  }
}
