/* ==========================================================================
   SYNTEXFLOW — ENQUIRY BAG & LEAD VERIFICATION DRAWER & MODAL
   Design tokens consumed from design-tokens.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   DRAWER OVERLAY & PANEL
   -------------------------------------------------------------------------- */
.sf-bag-overlay,
.sf-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 13, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 125;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-ui) var(--sf-ease), visibility var(--duration-ui);
}

.sf-bag-overlay.active,
.sf-auth-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sf-bag-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  background: var(--ink-2);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-drawer);
  z-index: 130;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--duration-ui) var(--sf-ease);
  overflow: hidden;
}

.sf-bag-drawer.active {
  transform: translateX(0);
}

/* --------------------------------------------------------------------------
   DRAWER HEADER
   -------------------------------------------------------------------------- */
.sf-bag-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink-1);
}

.sf-bag-title-wrap h2 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--paper);
  margin: 0;
}

.sf-bag-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-top: 4px;
  display: block;
}

.sf-bag-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-micro) var(--sf-ease);
}

.sf-bag-close:hover {
  background: var(--ink-3);
  color: var(--accent);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   DRAWER ITEMS BODY
   -------------------------------------------------------------------------- */
.sf-bag-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sf-bag-empty {
  text-align: center;
  padding: 48px 16px;
  margin: auto 0;
}

.sf-bag-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-pill);
  background: var(--ink-1);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  color: var(--faint);
}

.sf-bag-empty h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 8px;
}

.sf-bag-empty p {
  font-size: 14px;
  color: var(--muted);
  max-width: 30ch;
  margin: 0 auto 20px auto;
}

.sf-bag-item {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: border-color var(--duration-micro) var(--sf-ease);
}

.sf-bag-item:hover {
  border-color: var(--border-strong);
}

.sf-bag-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sf-bag-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  margin: 0;
}

.sf-bag-item-remove {
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-micro) var(--sf-ease);
}

.sf-bag-item-remove:hover {
  color: var(--accent);
}

.sf-bag-item-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}

.sf-bag-item-price {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.sf-bag-item-price--custom {
  color: var(--faint);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   DRAWER FOOTER & PRICING
   -------------------------------------------------------------------------- */
.sf-bag-foot {
  padding: 20px 28px;
  background: var(--ink-1);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sf-bag-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-bag-subtotal-label {
  font-size: 13px;
  color: var(--muted);
}

.sf-bag-subtotal-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--paper);
}

.sf-bag-custom-note {
  font-size: 12px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sf-bag-disclaimer {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.sf-bag-submit-btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   LEAD CAPTURE & OTP MODAL
   -------------------------------------------------------------------------- */
.sf-auth-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
  z-index: 135;
  opacity: 0;
  visibility: hidden;
  transition: transform var(--duration-ui) var(--sf-ease), opacity var(--duration-ui) var(--sf-ease), visibility var(--duration-ui);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sf-auth-dialog.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.sf-auth-head {
  padding: 24px 28px 16px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sf-auth-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

.sf-auth-title {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--paper);
  margin: 0;
}

.sf-auth-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  padding: 0 28px;
  margin-bottom: 20px;
}

.sf-auth-form {
  padding: 0 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sf-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-auth-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--paper);
}

.sf-auth-input,
.sf-auth-select,
.sf-auth-textarea {
  width: 100%;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--paper);
  transition: border-color var(--duration-micro) var(--sf-ease);
}

.sf-auth-input::placeholder,
.sf-auth-textarea::placeholder {
  color: var(--faint);
  opacity: 0.85;
}

.sf-auth-select option {
  background: var(--ink-2);
  color: var(--paper);
}

.sf-auth-input:focus,
.sf-auth-select:focus,
.sf-auth-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--scarlet-soft);
}

.sf-auth-textarea {
  resize: vertical;
  min-height: 70px;
}

.sf-auth-otp-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-block: 12px;
}

.sf-otp-digit {
  width: 48px;
  height: 54px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  color: var(--paper);
}

.sf-otp-digit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--scarlet-soft);
}

.sf-auth-timer {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

.sf-auth-resend-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.sf-auth-resend-btn:disabled {
  color: var(--faint);
  text-decoration: none;
  cursor: not-allowed;
}

.sf-auth-error {
  font-size: 12.5px;
  color: var(--scarlet);
  background: var(--scarlet-soft);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: none;
}

.sf-auth-error.visible {
  display: block;
}

@media (max-width: 640px) {
  .sf-bag-drawer {
    max-width: 100%;
  }
  .sf-otp-digit {
    width: 42px;
    height: 48px;
    font-size: 19px;
  }
}


/* --------------------------------------------------------------------------
   EXPERIENCE TIER SELECTOR IN BAG DRAWER
   -------------------------------------------------------------------------- */
.sf-bag-tier-selector {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sf-bag-tier-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 6px;
  display: block;
}
.sf-bag-tier-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.sf-bag-tier-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 180ms ease;
  line-height: 1.25;
}
.sf-bag-tier-btn span {
  display: block;
}
.sf-bag-tier-btn .tier-cost {
  font-size: 9px;
  color: var(--faint);
  margin-top: 2px;
}
.sf-bag-tier-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.2);
}
.sf-bag-tier-btn.is-active {
  background: rgba(232, 40, 30, 0.1);
  border-color: var(--accent);
  color: var(--paper);
  font-weight: 600;
}
.sf-bag-tier-btn.is-active .tier-cost {
  color: var(--accent);
}
