/* ================================
   Qinta Legal / Terms Page
   ================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root
{
    --q-font-heading: "Inter", "Source Sans 3", sans-serif;
    --q-color-bg: #ffffff;
    --q-primary: #66D384;
}

html.terms-page
{
  background-color: var(--q-color-bg);
}

body.terms-page {
  font-family:var(--q-font-heading);
  color: #1a191e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Layout — rely on Bootstrap container/grid */
.legal-wrap {
  flex: 1;
  width: 100%;
}

.page-title {
  font-weight: 600;
  font-size: 16px;
  color: #1a191e;
  text-align: left;
  padding-top: 0px;
}

/* Dropdown styling aligns with Bootstrap’s form-select */
.policy-select {
  border-width: 1px;
  border-color: #000;
  font-weight: 300;
  font-size: 15px;
  min-width: 300px;
  max-width: 300px;
}

.policy-select:focus {
  border-color: var(--q-link);
  box-shadow: none;
}

/* Viewer panel (iframe wrapper) */
.viewer-panel {
  border-radius: 0;
  padding: 0; /*  removed shadow for a flat look */
}

.doc-frame {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 260px);
  border: 0;
}

/* ------------------------------------------------
   Bottom action bar (Back / Cancel / I Agree)
   ------------------------------------------------ */

/* Force override for the Terms action buttons */
.terms-page .btn-terms-back {
  border-radius: 10px !important;
  height: 44px;
  padding-left: 18px;
  padding-right: 18px;
  width: 200px;
  max-width: 200px;
}

/* Ensure outline variant actually looks like a secondary button (auth.css makes .btn black by default). */
.terms-page .btn.btn-outline-dark {
  background: transparent;
  color: #000;
  border: 1px solid #000;
}

.terms-page .btn.btn-outline-dark:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}

.terms-actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1040;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.terms-actionbar__inner {
  display: flex;
  align-items: center;
  /* Default mode (Back only): right-justify on non-mobile screens */
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Onboarding mode: cancel left, agree right (not grouped side-by-side). */
.terms-actionbar #onboardingActions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Add bottom padding so content isn't hidden behind the fixed bar */
.terms-page .legal-wrap {
  padding-bottom: 140px;
}

@media (max-width: 768px) {
  .terms-actionbar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  /* Full-width Back CTA on mobile (single button mode) */
  .terms-page .btn-terms-back {
    width: 100%;
    max-width: none; /* IMPORTANT: remove the 200px cap on mobile */
  }

  /* Onboarding actions: Cancel left, Agree right (NO stacking) */
  #onboardingActions {
    width: 100%;
    display: flex;
    flex-direction: row;         /* changed from column */
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
  }

  /* Make each onboarding button take half the bar */
  #onboardingActions .btn {
    flex: 1 1 0;
    width: 50%;
    max-width: none;
  }
}
