/* =====================================================================
   Optywise Cookie Consent — uses design-system tokens from responsive-fixes.css
   ===================================================================== */

/* Banner ------------------------------------------------------------------ */
#ow-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #1c1228;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.35);
  padding: 20px 24px;
}

#ow-cookie-banner[hidden] {
  display: none;
}

.ow-cb-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ow-cb-text {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  flex: 1;
  min-width: 240px;
}

.ow-cb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Buttons ----------------------------------------------------------------- */
.ow-btn {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1;
}

.ow-btn-primary {
  background: var(--brand, #661a8f);
  color: #fff;
}

.ow-btn-primary:hover,
.ow-btn-primary:focus-visible {
  background: var(--brand-hover, #7a22a8);
}

.ow-btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
}

.ow-btn-secondary:hover,
.ow-btn-secondary:focus-visible {
  border-color: var(--teal, #14c7c3);
  color: var(--teal, #14c7c3);
}

.ow-btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  padding: 9px 12px;
}

.ow-btn-ghost:hover,
.ow-btn-ghost:focus-visible {
  color: #fff;
}

.ow-btn:focus-visible {
  outline: 2px solid var(--teal, #14c7c3);
  outline-offset: 2px;
}

/* Modal backdrop ---------------------------------------------------------- */
.ow-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 16, 0.7);
  z-index: 9001;
  backdrop-filter: blur(3px);
}

#ow-cookie-modal[hidden] {
  display: none;
}

/* Modal box --------------------------------------------------------------- */
.ow-modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9002;
  background: #fff;
  border-radius: 14px;
  width: min(520px, calc(100vw - 32px));
  padding: 32px;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.3);
  outline: none;
}

.ow-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-muted, #6e687f);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.ow-modal-close:hover {
  color: var(--ink-heading, #2e2838);
}

.ow-modal-close:focus-visible {
  outline: 2px solid var(--brand, #661a8f);
  outline-offset: 2px;
}

.ow-modal-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-heading, #2e2838);
  margin: 0 0 24px;
}

/* Categories -------------------------------------------------------------- */
.ow-category {
  border: 1px solid var(--border, #eceaf1);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.ow-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ow-category-name {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-heading, #2e2838);
  margin-right: 8px;
}

.ow-category-badge {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-dark, #0c8f8c);
  background: rgba(20, 199, 195, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
}

.ow-category-desc {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-body, #5a5468);
}

/* Always-on indicator ----------------------------------------------------- */
.ow-toggle-fixed {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--teal, #14c7c3);
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  opacity: 0.5;
  cursor: not-allowed;
}

.ow-toggle-fixed::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
}

/* Toggle switch ----------------------------------------------------------- */
.ow-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.ow-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ow-toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--border, #eceaf1);
  transition: background 0.2s ease;
  position: relative;
}

.ow-toggle input:checked + .ow-toggle-track {
  background: var(--brand, #661a8f);
}

.ow-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ow-toggle input:checked + .ow-toggle-track .ow-toggle-thumb {
  transform: translateX(18px);
}

.ow-toggle:focus-within .ow-toggle-track {
  outline: 2px solid var(--brand, #661a8f);
  outline-offset: 2px;
}

/* Modal footer ------------------------------------------------------------ */
.ow-modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.ow-modal-footer .ow-btn-primary {
  font-size: 14px;
  padding: 11px 24px;
}

/* Footer cookie link ------------------------------------------------------ */
.ow-cookie-prefs-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.ow-cookie-prefs-link:hover {
  color: var(--teal, #14c7c3);
}

.ow-cookie-prefs-link:focus-visible {
  outline: 2px solid var(--teal, #14c7c3);
  outline-offset: 2px;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 640px) {
  #ow-cookie-banner {
    padding: 16px;
  }

  .ow-cb-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ow-cb-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ow-modal-box {
    padding: 24px 20px;
  }
}
