/* ─────────────────────────────────────────────────────────────
   ZyraPlanner — Cookie Consent Banner
   Class names match the JS exactly.
───────────────────────────────────────────────────────────── */

#zyra-cookie-banner {
  --ck-white:       #ffffff;
  --ck-surface:     #f0f4f9;
  --ck-off-white:   #f7f9fc;
  --ck-border:      #e4eaf2;
  --ck-border-soft: #edf1f7;
  --ck-text:        #0d1421;
  --ck-text-2:      #4a5568;
  --ck-text-3:      #8a96a8;
  --ck-blue:        #2563eb;
  --ck-blue-dark:   #1a4dc4;
  --ck-blue-light:  #eff4ff;
  --ck-blue-mid:    #c7d9fd;
  --ck-red:         #dc2626;
  --ck-red-light:   #fef2f2;
  --ck-font:        'DM Sans', sans-serif;

  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  width: 320px;
  background-color: var(--ck-white);
  border: 1.5px solid var(--ck-border);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(13,20,33,0.10), 0 4px 16px rgba(13,20,33,0.06);
  font-family: var(--ck-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ck-text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  box-sizing: border-box;
  animation: ckSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

#zyra-cookie-banner *,
#zyra-cookie-banner *::before,
#zyra-cookie-banner *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@keyframes ckSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header: .ck-top ─────────────────────────────────────────── */

#zyra-cookie-banner .ck-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--ck-border-soft);
  background-color: var(--ck-white);
}

#zyra-cookie-banner .ck-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37,99,235,0.30);
  object-fit: contain;
  filter: none;
  flex-shrink: 0;
  display: block;
  padding: 6px;
}

#zyra-cookie-banner .ck-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ck-text);
  display: block;
}

#zyra-cookie-banner .ck-sub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ck-text-3);
  margin-top: 2px;
  display: block;
}

/* ── Body text: p.ck-body ────────────────────────────────────── */

#zyra-cookie-banner .ck-body {
  display: block;
  padding: 14px 16px 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--ck-text-2);
  line-height: 1.6;
  background-color: var(--ck-white);
}

#zyra-cookie-banner .ck-body a {
  color: var(--ck-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#zyra-cookie-banner .ck-body a:hover {
  color: var(--ck-blue-dark);
}

/* ── Manage panel: .ck-manage ────────────────────────────────── */

#zyra-cookie-banner .ck-manage {
  display: none;
  flex-direction: column;
  margin: 12px 16px 0;
  background-color: var(--ck-surface);
  border: 1.5px solid var(--ck-border);
  border-radius: 8px;
  overflow: hidden;
}

/* ── Toggle rows: .ck-row ────────────────────────────────────── */

#zyra-cookie-banner .ck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--ck-white);
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-text);
}

#zyra-cookie-banner .ck-row + .ck-row {
  border-top: 1px solid var(--ck-border-soft);
}

#zyra-cookie-banner .ck-row.ck-disabled {
  opacity: 0.55;
  pointer-events: none;
}

#zyra-cookie-banner .ck-rowsub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ck-text-3);
  margin-top: 2px;
  display: block;
}

/* ── Toggle switch: .ck-sw ───────────────────────────────────── */

#zyra-cookie-banner .ck-sw {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

#zyra-cookie-banner .ck-sw input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

#zyra-cookie-banner .ck-sw span {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--ck-border);
  border-radius: 999px;
  transition: background-color 0.2s;
  cursor: pointer;
}

#zyra-cookie-banner .ck-sw span::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}

#zyra-cookie-banner .ck-sw input:checked + span {
  background-color: var(--ck-blue);
}

#zyra-cookie-banner .ck-sw input:checked + span::before {
  transform: translateX(18px);
}

/* ── Buttons: .ck-btns ───────────────────────────────────────── */

#zyra-cookie-banner .ck-btns {
  display: flex;
  gap: 6px;
  padding: 14px 16px 16px;
  background-color: var(--ck-white);
}

#zyra-cookie-banner .ck-btns button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border-radius: 8px;
  font-family: var(--ck-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid var(--ck-border);
  background-color: var(--ck-white);
  color: var(--ck-text-2);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Manage button */
#zyra-cookie-banner #ckManageBtn {
  background-color: var(--ck-surface);
  color: var(--ck-text-2);
  border-color: var(--ck-border);
}

#zyra-cookie-banner #ckManageBtn:hover {
  background-color: var(--ck-white);
  color: var(--ck-blue);
  border-color: var(--ck-blue-mid);
  transform: translateY(-1px);
}

/* Decline button */
#zyra-cookie-banner #ckDecline:hover {
  background-color: var(--ck-red-light);
  border-color: #fecaca;
  color: var(--ck-red);
  transform: translateY(-1px);
}

/* Accept all: .ck-primary */
#zyra-cookie-banner .ck-primary {
  background-color: var(--ck-blue) !important;
  color: #ffffff !important;
  border-color: var(--ck-blue) !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

#zyra-cookie-banner .ck-primary:hover {
  background-color: var(--ck-blue-dark) !important;
  border-color: var(--ck-blue-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

#zyra-cookie-banner .ck-btns button:active {
  transform: translateY(0);
}

/* ── Dismiss animation ──────────────────────────────────────── */

#zyra-cookie-banner.ck-hiding {
  animation: ckSlideDown 0.2s ease forwards;
}

@keyframes ckSlideDown {
  to { opacity: 0; transform: translateY(12px); }
}

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 860px) and (pointer: coarse) {
  #zyra-cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 28px 28px 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
    animation: ckMobileUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }

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

  #zyra-cookie-banner.ck-hiding {
    animation: ckMobileDown 0.2s ease forwards;
  }

  @keyframes ckMobileDown {
    to { opacity: 0; transform: translateY(100%); }
  }

  #zyra-cookie-banner .ck-btns {
    flex-wrap: wrap;
  }

  #zyra-cookie-banner #ckManageBtn {
    flex: 0 0 100%;
  }
}
