/* ============================================================
   Wordfyle — Custom Klaro Consent UI
   ============================================================ */

/* --- Sticky footer banner ---------------------------------- */

@keyframes wf-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#wf-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #f4f1da;
  box-shadow: 0 -3px 20px rgba(0, 0, 0, 0.15);
  border-top: 2px solid #99d17d;
  animation: wf-slide-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wf-consent-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wf-consent-title {
  margin: 0;
  font-size: 14px;
  color: #000000;
  line-height: 1.6;
  flex: 1;
}

.wf-consent-text {
  margin: 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  flex: 1;
}

.wf-consent-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* --- Shared button style (green, matches .lightgreen-bg) --- */

.wf-accept-btn {
  display: inline-block;
  background-color: #99d17d;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.wf-accept-btn:hover {
  background-color: #79b15d;
}

/* --- "Manage settings" plain link -------------------------- */

.wf-manage-link {
  font-size: 13px;
  color: #4696ac;
  text-decoration: none;
  white-space: nowrap;
}

.wf-manage-link:hover {
  text-decoration: underline;
}

/* --- Settings modal overlay -------------------------------- */

#wf-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wf-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

/* --- Settings dialog card ---------------------------------- */

.wf-settings-dialog {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

.wf-settings-title {
  margin: 0 0 0.5rem;
  font-size: 18px;
  font-weight: 700;
  color: #434334;
}

.wf-settings-intro {
  margin: 0 0 1.5rem;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

/* --- Service rows ------------------------------------------ */

.wf-svc-list {
  margin-bottom: 1.75rem;
}

.wf-svc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid #efefef;
  gap: 1rem;
}

.wf-svc-row:last-child {
  border-bottom: none;
}

.wf-svc-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.wf-svc-title {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
}

.wf-svc-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

/* --- Toggle switch ----------------------------------------- */

.wf-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.wf-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wf-toggle-track {
  display: inline-block;
  width: 42px;
  height: 24px;
  background: #cfcfcf;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
  position: relative;
}

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

.wf-toggle input[type="checkbox"]:checked + .wf-toggle-track {
  background: #99d17d;
}

.wf-toggle input[type="checkbox"]:checked + .wf-toggle-track .wf-toggle-thumb {
  transform: translateX(18px);
}

.wf-toggle--required {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --- Settings modal action buttons ------------------------- */

.wf-settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.wf-accept-all-btn {
  display: inline-block;
  background: transparent;
  color: #79b15d;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  border: 1.5px solid #99d17d;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.wf-accept-all-btn:hover {
  background-color: #99d17d;
  color: #fff;
}

/* --- Mobile ------------------------------------------------ */

@media (max-width: 640px) {
  .wf-consent-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .wf-consent-actions {
    width: 100%;
    justify-content: space-between;
  }

  .wf-settings-dialog {
    padding: 1.5rem;
  }

  .wf-settings-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .wf-settings-actions button {
    width: 100%;
    text-align: center;
  }
}
