/* CloudRoam cookie consent — matches the app design system (dark, teal accent).
   Uses hardcoded CloudRoam colors so it renders identically on every page,
   independent of each page's own CSS variables. Responsive + accessible. */

.crc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  background: rgba(12, 17, 25, 0.97); backdrop-filter: blur(14px);
  border-top: 1px solid #2c3850; color: #e8ecf4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  animation: crc-rise 0.25s ease;
}
@keyframes crc-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.crc-banner-in {
  max-width: 1120px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between;
}
.crc-banner-msg { margin: 0; font-size: 0.9rem; line-height: 1.55; color: #93a1b8; max-width: 680px; }
.crc-banner-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.crc-link { color: #2dd4bf; text-decoration: none; cursor: pointer; }
.crc-link:hover { text-decoration: underline; }

.crc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: 0.15s;
  font-family: inherit;
}
.crc-btn-ghost { color: #e8ecf4; border-color: #2c3850; background: transparent; }
.crc-btn-ghost:hover { background: #18202f; }
.crc-btn-primary { background: linear-gradient(120deg, #2dd4bf, #4f8cff); color: #05121a; }
.crc-btn-primary:hover { filter: brightness(1.07); }
.crc-btn:focus-visible { outline: 2px solid #2dd4bf; outline-offset: 2px; }

/* Preferences modal */
.crc-overlay {
  position: fixed; inset: 0; z-index: 2100; background: rgba(3, 6, 12, 0.66);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: crc-fade 0.16s ease;
}
@keyframes crc-fade { from { opacity: 0; } to { opacity: 1; } }
.crc-modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto;
  background: #111826; border: 1px solid #2c3850; border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); color: #e8ecf4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  padding: 22px 22px 18px;
}
.crc-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crc-modal-t { margin: 0; font-size: 1.15rem; font-weight: 700; }
.crc-x { background: none; border: none; color: #93a1b8; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.crc-x:hover { color: #e8ecf4; background: #18202f; }
.crc-x:focus-visible { outline: 2px solid #2dd4bf; outline-offset: 2px; }
.crc-modal-i { color: #93a1b8; font-size: 0.86rem; line-height: 1.5; margin: 8px 0 16px; }

.crc-cards { display: flex; flex-direction: column; gap: 10px; }
.crc-card { background: #0c1119; border: 1px solid #222c3d; border-radius: 12px; padding: 13px 15px; }
.crc-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crc-card-t { font-weight: 600; font-size: 0.92rem; }
.crc-card-d { color: #65728a; font-size: 0.8rem; line-height: 1.45; margin: 6px 0 0; }
.crc-always { color: #2dd4bf; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }

/* Toggle switch */
.crc-toggle {
  position: relative; width: 42px; height: 24px; border-radius: 999px;
  background: #2c3850; border: none; cursor: pointer; padding: 0; flex: 0 0 auto; transition: background 0.16s;
}
.crc-toggle.on { background: linear-gradient(120deg, #2dd4bf, #4f8cff); }
.crc-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.16s; }
.crc-toggle.on .crc-knob { transform: translateX(18px); }
.crc-toggle:focus-visible { outline: 2px solid #2dd4bf; outline-offset: 2px; }

.crc-modal-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 18px; }

.crc-footer-line { text-align: center; margin-top: 14px; font-size: 0.85rem; }
.crc-floating { position: fixed; right: 14px; bottom: 14px; z-index: 1500; font-size: 0.8rem; background: rgba(12,17,25,0.9); border: 1px solid #2c3850; border-radius: 8px; padding: 6px 10px; }

/* Mobile: buttons wrap and go full width; modal scrolls */
@media (max-width: 640px) {
  .crc-banner-in { padding: 14px 16px; }
  .crc-banner-btns { width: 100%; }
  .crc-banner-btns .crc-btn { flex: 1 1 auto; }
  .crc-modal-btns .crc-btn { flex: 1 1 auto; }
}
