/**
 * Hoja de Estilos Base para Banner de Cookies (Stitch Architecture <150 líneas)
 */

.cookie-banner-wrapper {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: calc(100% - 40px);
  max-width: 420px;
  background: var(--gcc-bg, #0f172a);
  color: var(--gcc-text, #f8fafc);
  border-radius: 16px;
  padding: 18px 20px;
  z-index: 9999999;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
}

@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-wrapper.hidden, .hidden { display: none !important; }

/* 1. Cabecera */
.cookie-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cookie-banner-brand { display: flex; align-items: center; gap: 8px; }
.cookie-icon { width: 20px; height: 20px; color: var(--gcc-secondary, #38bdf8); flex-shrink: 0; }
.cookie-banner-title { font-size: 13.5px; font-weight: 700; color: inherit; }
.cookie-btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit; cursor: pointer; transition: all 0.2s ease;
}
.cookie-btn-icon:hover { background: rgba(255, 255, 255, 0.18); }
/* Zonas tactiles: el area sensible llega a 44 px sin agrandar el dibujo. */
.cookie-btn-icon::after, .cookie-close-icon::after, .cookie-switch::after { content: ''; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; transform: translate(-50%, -50%); }
.cookie-btn-icon, .cookie-close-icon { position: relative; }

/* 2. Contenido */
.cookie-banner-content p { font-size: 12.5px; line-height: 1.5; color: inherit; opacity: 0.9; margin: 0 0 14px 0; }
.cookie-banner-content a { color: var(--gcc-secondary, #38bdf8); text-decoration: underline; font-weight: 600; }

/* 3. Acciones */
.cookie-banner-actions { display: flex; align-items: center; gap: 10px; }
.cookie-btn {
  flex: 1; padding: 10px 14px; font-size: 13px; font-weight: 600;
  border-radius: 10px; cursor: pointer; text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; box-sizing: border-box;
}
.cookie-btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important; border: none; font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}
.cookie-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.06); color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.cookie-btn-secondary:hover { background: rgba(255, 255, 255, 0.14); }

/* 4. Modal Configuración */
#cookie-settings-detailed { display: flex; flex-direction: column; color: inherit; }
.cookie-settings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cookie-settings-header h3 { font-size: 15px; font-weight: 700; margin: 0; color: inherit; }
.cookie-close-icon { background: transparent; border: none; color: inherit; cursor: pointer; padding: 6px; display: flex; }
.cookie-settings-desc { font-size: 12px; line-height: 1.4; color: inherit; opacity: 0.85; margin: 0 0 12px 0; }
.cookie-settings-scroll-area {
  background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px; padding: 12px; margin-bottom: 12px; max-height: 200px; overflow-y: auto;
}
.cookie-accordion { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding: 8px 0; }
.cookie-accordion:last-child { border-bottom: none; }
.cookie-accordion-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cookie-accordion-title { font-size: 12.5px; font-weight: 600; flex: 1; color: inherit; }
.cookie-status-green { font-size: 10px; font-weight: 700; color: #34d399; background: rgba(16, 185, 129, 0.15); padding: 2px 6px; border-radius: 4px; }
.cookie-accordion-body { padding: 6px 0 0 0; font-size: 11.5px; opacity: 0.85; line-height: 1.4; }

/* Switches */
.cookie-switch { position: relative; display: flex; align-items: center; cursor: pointer; }
.cookie-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.cookie-switch-track { width: 34px; height: 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; padding: 2px; transition: all 0.25s ease; box-sizing: border-box; }
.cookie-switch-thumb { width: 12px; height: 12px; border-radius: 50%; background: #ffffff; transition: all 0.25s ease; }
.cookie-switch input:checked + .cookie-switch-track { background: #0284c7; }
.cookie-switch input:checked + .cookie-switch-track .cookie-switch-thumb { transform: translateX(16px); }
.cookie-settings-footer { display: flex; gap: 8px; margin-top: 8px; }

/* Mobile */
@media (max-width: 640px) {
  .cookie-banner-wrapper {
    left: 12px !important; right: 12px !important; bottom: 12px !important;
    width: auto !important; max-width: 480px !important; padding: 16px !important; border-radius: 14px !important;
  }
  .cookie-btn { padding: 11px 12px !important; font-size: 12.5px !important; min-height: 42px !important; }
}

/* Reapertura tras decidir: pastilla discreta en la esquina. */
.cookie-reopen { position: fixed; left: 16px; bottom: 16px; z-index: 99998; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.08);
  background: var(--gcc-bg, #ffffff); color: var(--gcc-primary, #0f172a); box-shadow: 0 6px 20px rgba(15,23,42,0.18); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cookie-reopen:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(15,23,42,0.22); }
.cookie-reopen:focus-visible { outline: 2px solid var(--gcc-secondary, #3b82f6); outline-offset: 2px; }
/* Categorias sin cookies configuradas: visibles pero sin interruptor operativo. */
.cookie-status-muted { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.55; margin-left: 6px; }
.cookie-accordion.is-empty .cookie-switch { opacity: 0.35; pointer-events: none; }
.cookie-switch input:focus-visible + .cookie-switch-track { outline: 2px solid var(--gcc-secondary, #3b82f6); outline-offset: 2px; }
/* Boton de la politica de cookies ([gcc_cookie_settings]) e inventario. */
.gcc-cookie-settings-link { background: var(--gcc-primary, #0f172a); color: #ffffff; border: 0; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.gcc-cookie-inventory table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 14px; }
.gcc-cookie-inventory th, .gcc-cookie-inventory td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(15,23,42,0.12); }
.gcc-cookie-inventory code { font-size: 12.5px; }
/* El aviso no declaraba familia: heredaba la del tema, que suele ser otra (serif en los
   temas de bloques) y Arial en los botones. Con esto adopta la tipografia del sitio. */
#nubecore-cookie-banner, .cookie-reopen { font-family: inherit; }
#nubecore-cookie-banner :is(h1,h2,h3,h4,h5,p,span,a,label,button,input,select,textarea) { font-family: inherit; }
#nubecore-cookie-banner h3 { letter-spacing: -0.01em; }
