/* DocSquire Checkout Wizard — Styles
   Approach: refined, minimal, professional — matches a legal services brand.
   Uses PMPro's own CSS variables wherever possible.
*/

/* ─── Layout wrapper ─────────────────────────────────────── */
#dscw-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

/* ─── Left: Step navigation ──────────────────────────────── */
#dscw-nav {
  flex: 0 0 200px;
  position: sticky;
  top: 32px;
}

#dscw-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--pmpro--color--border--variation, #e3e8f0);
}

#dscw-nav-list li {
  position: relative;
  padding: 0;
}

/* Connector line dot */
#dscw-nav-list li::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pmpro--color--border--variation, #e3e8f0);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--pmpro--color--border--variation, #e3e8f0);
  transition: background 0.25s, box-shadow 0.25s;
  z-index: 1;
}

#dscw-nav-list li.dscw-active::before {
  background: #f58220;
  box-shadow: 0 0 0 2px #f58220;
}

#dscw-nav-list li.dscw-complete::before {
  background: var(--pmpro--color--border--variation, #e3e8f0);
  box-shadow: 0 0 0 2px var(--pmpro--color--border--variation, #e3e8f0);
}

.dscw-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 10px 0 10px 24px;
  background: none !important;
  border: none !important;
  outline: none !important;
  cursor: default;
  text-align: left;
  width: 100%;
  transition: none !important;
  box-shadow: none !important;
  color: inherit;
  text-decoration: none !important;
}

.dscw-nav-btn:hover,
.dscw-nav-btn:focus,
.dscw-nav-btn:active {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: inherit !important;
  text-decoration: none !important;
}

.dscw-nav-btn.dscw-clickable {
  cursor: pointer;
}

.dscw-nav-step-num {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pmpro--color--text--muted, #aab0be);
  margin-bottom: 2px;
  transition: color 0.25s;
}

.dscw-nav-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--pmpro--color--text--muted, #aab0be);
  line-height: 1.3;
  transition: color 0.25s;
}

li.dscw-active .dscw-nav-step-num,
li.dscw-active .dscw-nav-label {
  color: #f58220;
}

li.dscw-active::before {
  background: #f58220;
  box-shadow: 0 0 0 2px #f58220;
}

/* Completed: keep default muted color, only add green checkmark */
li.dscw-complete .dscw-nav-step-num,
li.dscw-complete .dscw-nav-label {
  color: var(--pmpro--color--text--muted, #aab0be);
}

li.dscw-complete .dscw-nav-label::after {
  content: ' ✓';
  color: rgb(22, 163, 74);
  font-weight: 700;
}

/* ─── Right: Step content ────────────────────────────────── */
#dscw-content {
  flex: 1;
  min-width: 0;
}

/* Hide all PMPro sections initially — JS will show the active one */
.dscw-section {
  display: none;
}
.dscw-section.dscw-visible {
  display: block;
  animation: dscw-fade-in 0.2s ease;
}

@keyframes dscw-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Step header (shown above each section) ─────────────── */
.dscw-step-header {
  margin-bottom: 20px;
}
.dscw-step-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--pmpro--color--text, #1a1a2e);
}
.dscw-step-header p {
  font-size: .88rem;
  color: var(--pmpro--color--text--muted, #7e8aab);
  margin: 0;
}

/* ─── Navigation buttons ─────────────────────────────────── */
.dscw-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--pmpro--color--border--variation, #e3e8f0);
}

.dscw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--pmpro--base--border-radius, 8px);
  font-size: .9rem;
  font-weight: 400 !important;
  cursor: pointer;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
  transition: none !important;
  box-shadow: none !important;
}
.dscw-btn:hover,
.dscw-btn:focus,
.dscw-btn:active {
  outline: none !important;
  transform: none !important;
  opacity: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.dscw-btn-primary {
  background: #f58220 !important;
  background-color: #f58220 !important;
  color: #fff !important;
  border: none !important;
}
.dscw-btn-primary:hover,
.dscw-btn-primary:focus,
.dscw-btn-primary:active {
  background: #f58220 !important;
  background-color: #f58220 !important;
  color: #fff !important;
  border: none !important;
}

.dscw-btn-ghost,
.dscw-btn-ghost:hover,
.dscw-btn-ghost:focus,
.dscw-btn-ghost:active {
  background: transparent !important;
  background-color: transparent !important;
  color: #000000 !important;
  border: 1.5px solid #000000 !important;
}

/* Hide the original PMPro submit button everywhere EXCEPT inside our step 4 btn-row */
#pmpro_form .pmpro_btn-submit-checkout {
  display: none !important;
}
#pmpro_form .dscw-btn-row .pmpro_btn-submit-checkout,
#pmpro_form .dscw-btn-row input[type="submit"]#pmpro_btn-submit {
  display: inline-block !important;
}

/* ─── Validation errors ──────────────────────────────────── */
.dscw-error-banner {
  background: #fff5f5;
  border: 1.5px solid #f8b4b4;
  border-radius: var(--pmpro--base--border-radius, 8px);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .88rem;
  color: #c0392b;
  display: none;
  animation: dscw-fade-in .15s ease;
}
.dscw-error-banner.dscw-visible {
  display: block;
}

/* Highlight invalid fields */
.dscw-field-error input,
.dscw-field-error select,
.dscw-field-error textarea {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231,76,60,.12) !important;
}

/* ─── Progress bar (top of content area) ────────────────── */
#dscw-progress {
  height: 3px;
  background: var(--pmpro--color--border--variation, #e3e8f0);
  border-radius: 2px;
  margin-bottom: 28px;
  overflow: hidden;
}
#dscw-progress-bar {
  height: 100%;
  background: #f58220;
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(.4,0,.2,1);
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media only screen and (max-width: 694px) {
  #dscw-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  #dscw-nav,
  #dscw-nav-list,
  #dscw-nav-list li,
  #dscw-nav-list li button {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }
}

/* Mobile: ensure error banner scrolls into view properly */
@media only screen and (max-width: 694px) {
  .dscw-error-banner.dscw-visible {
    display: block;
    position: relative;
    z-index: 10;
  }
}

/* ─── PMPro submit button in step 4 ─────────────────────── */
.dscw-btn-row .pmpro_form_submit {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dscw-btn-row .pmpro_btn-submit-checkout,
.dscw-btn-row input[type="submit"][name="submit-checkout"],
.dscw-btn-row button[name="submit-checkout"] {
  background: #f58220 !important;
  background-color: #f58220 !important;
  color: #fff !important;
  border: none !important;
  outline: none !important;
  padding: 11px 24px !important;
  border-radius: var(--pmpro--base--border-radius, 8px) !important;
  font-size: .9rem !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  display: inline-flex !important;
}
.dscw-btn-row .pmpro_btn-submit-checkout:hover,
.dscw-btn-row input[type="submit"][name="submit-checkout"]:hover {
  background: #f58220 !important;
  background-color: #f58220 !important;
  color: #fff !important;
  border: none !important;
}

/* ─── Purchase button fixes ──────────────────────────────── */
.pmpro_form_submit #pmpro_processing_message {
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}
#pmpro_btn-submit {
  margin-top: 0px !important;
  height: 41px !important;
}

/* ─── Hide duplicate bottom message permanently ─────────── */
#pmpro_message_bottom {
  display: none !important;
  visibility: hidden !important;
}



