/* Aviso de cookies de GM Ironwood. Fijo abajo (no mueve la página: sin CLS). */
.cc-bar {
  position: fixed; z-index: 70; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; gap: 16px; padding: 20px;
  background: #202024; color: #efe8dc; border: 1px solid rgba(239, 232, 220, .18); border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  font: 400 1rem/1.5 "Archivo", system-ui, sans-serif;
}
.cc-bar[hidden], .cc-gpc[hidden] { display: none; }
.cc-bar p { margin: 0; max-width: 70ch; }
.cc-bar a, .cc-prefs a { color: #efe8dc; text-underline-offset: 3px; text-decoration-color: #b4823f; }
.cc-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }

/* Los 3 botones con el mismo tamaño y el mismo peso visual */
.cc-btn {
  min-height: 48px; padding: 10px 18px; border-radius: 4px; cursor: pointer;
  background: transparent; color: #efe8dc; border: 1.5px solid #b4823f;
  font: 600 1rem/1.2 "Archivo", system-ui, sans-serif; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.cc-btn:hover { background: #b4823f; color: #17171a; }
.cc-btn:focus-visible, .cc-x:focus-visible, .cc-link:focus-visible, .cc-switch input:focus-visible + span { outline: 3px solid #d6b48a; outline-offset: 3px; }

@media (max-width: 959px) {
  .cc-bar { gap: 10px; padding: 12px; font-size: .875rem; line-height: 1.45; max-height: calc(100dvh - 24px); overflow-y: auto; }
  .cc-bar .cc-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cc-bar .cc-btn { min-height: 44px; min-width: 0; padding: 8px 4px; font-size: .875rem; white-space: normal; overflow-wrap: anywhere; }
}

@media (min-width: 960px) {
  .cc-bar { left: 0; right: 0; bottom: 0; border-radius: 0; border-width: 1px 0 0; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 18px clamp(16px, 5vw, 64px); }
  .cc-actions { grid-template-columns: repeat(3, 12.5rem); }
}

/* Sube el botón de llamar mientras el aviso está abierto (el chat usa la misma variable) */
.cc-open .call-bar { bottom: calc(var(--gm-cc-h, 0px) + max(12px, env(safe-area-inset-bottom))); }

/* Ventana de preferencias */
.cc-prefs {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  padding: 0; border: 1px solid rgba(239, 232, 220, .18); border-radius: 6px;
  background: #202024; color: #efe8dc; font: 400 1rem/1.55 "Archivo", system-ui, sans-serif;
}
.cc-prefs::backdrop { background: rgba(10, 10, 12, .7); }
.cc-prefs-in { padding: 24px; display: grid; gap: 16px; }
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-prefs h2 { margin: 0; font: 400 1.75rem/1.15 "Instrument Serif", Georgia, serif; }
.cc-x { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid rgba(239, 232, 220, .35); background: transparent; color: #efe8dc; cursor: pointer; font-size: 1.25rem; line-height: 1; }
.cc-cat { border-top: 1px solid rgba(239, 232, 220, .12); padding-top: 16px; display: grid; gap: 6px; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-cat h3 { margin: 0; font: 600 1rem/1.3 "Archivo", system-ui, sans-serif; }
.cc-cat p, .cc-note, .cc-gpc { margin: 0; color: rgba(239, 232, 220, .85); font-size: .875rem; }
.cc-always { font-size: .875rem; color: #d6b48a; font-weight: 600; }
.cc-gpc { padding: 10px 12px; border-left: 2px solid #b4823f; background: rgba(180, 130, 63, .1); color: #efe8dc; }
.cc-switch { position: relative; display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-switch span { width: 46px; height: 26px; border-radius: 13px; background: rgba(239, 232, 220, .25); position: relative; transition: background-color .2s; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #efe8dc; transition: transform .2s; }
.cc-switch input:checked + span { background: #b4823f; }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.cc-prefs .cc-actions { border-top: 1px solid rgba(239, 232, 220, .12); padding-top: 16px; }
@media (min-width: 560px) { .cc-prefs .cc-actions { grid-template-columns: repeat(3, 1fr); } }

/* Enlace "Cookie settings" del pie (es un botón con aspecto de enlace) */
.cc-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b4823f; min-height: 44px; }

@media (prefers-reduced-motion: reduce) { .cc-btn, .cc-switch span, .cc-switch span::after { transition: none; } }
.cc-x[hidden] { display: none; }
