/* Tickles cookie consent banner + preferences modal. Loaded site-wide via /assets/js/consent.js. */

.tk-consent-banner,
.tk-consent-modal-backdrop {
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #e9eef5;
  -webkit-font-smoothing: antialiased;
}

.tk-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999999;
  background: rgba(21, 37, 56, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (max-width: 720px) {
  .tk-consent-banner {
    grid-template-columns: 1fr;
  }
}

.tk-consent-banner-text {
  font-size: 14px;
  line-height: 1.55;
  color: #e9eef5;
  margin: 0;
}

.tk-consent-banner-text strong {
  color: #fff;
  font-weight: 600;
}

.tk-consent-banner-text a {
  color: #1bc1a9;
  text-decoration: underline;
}

.tk-consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tk-consent-btn {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.tk-consent-btn-primary {
  background: #1bc1a9;
  color: #0a1320;
  border-color: #1bc1a9;
}

.tk-consent-btn-primary:hover {
  background: #25d6bc;
  border-color: #25d6bc;
}

.tk-consent-btn-secondary {
  background: transparent;
  color: #e9eef5;
  border-color: rgba(255, 255, 255, 0.22);
}

.tk-consent-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
}

.tk-consent-btn-link {
  background: transparent;
  color: #94a6bc;
  border-color: transparent;
  padding: 9px 6px;
}

.tk-consent-btn-link:hover {
  color: #e9eef5;
}

/* Preferences modal */
.tk-consent-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 18, 32, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.tk-consent-modal {
  background: #152538;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.tk-consent-modal h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.tk-consent-modal > p {
  margin: 0 0 18px;
  font-size: 13px;
  color: #94a6bc;
  line-height: 1.5;
}

.tk-consent-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tk-consent-row:first-of-type {
  border-top: 0;
}

.tk-consent-row-text {
  flex: 1;
  min-width: 0;
}

.tk-consent-row-text h3 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #e9eef5;
  font-weight: 600;
}

.tk-consent-row-text p {
  margin: 0;
  font-size: 12px;
  color: #94a6bc;
  line-height: 1.5;
}

.tk-consent-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.tk-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.tk-consent-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}

.tk-consent-toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.tk-consent-toggle input:checked + .tk-consent-toggle-slider {
  background: #1bc1a9;
}

.tk-consent-toggle input:checked + .tk-consent-toggle-slider::before {
  transform: translateX(18px);
}

.tk-consent-toggle input:disabled + .tk-consent-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.tk-consent-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
