/* ============================================================================
   PJL order page (2026-11-16) - /order and /order/<plan>.
   Loaded only by mod_order_product / mod_order_index (theme overrides). Everything is scoped to
   body.pjl-order-page so the rest of the client area is untouched. pjl-portal-theme.css marks most of
   its form and accordion rules !important, so the few overrides here that must win do too.
   ============================================================================ */

.pjl-order-page {
    --pjl-order-line: rgba(255, 255, 255, 0.14);
    --pjl-order-line-strong: rgba(255, 255, 255, 0.24);
    --pjl-order-panel: rgba(27, 43, 75, 0.55);
    --pjl-order-panel-2: rgba(15, 24, 41, 0.55);
}

.pjl-order { max-width: 1200px; margin: 0 auto; }

.pjl-order-head { margin: 0 0 1.25rem; }

/* Steps on the left, "Your order" on the right (the theme's Bootstrap build has no col-lg-8). */
.pjl-order-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.pjl-order--checkout .pjl-order-side { order: -1; }
@media (min-width: 992px) {
    .pjl-order-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
    .pjl-order--checkout .pjl-order-side { order: 0; }
}
.pjl-summary-continue { width: 100%; margin-top: 1rem; }
@media (max-width: 991.98px) { .pjl-summary-continue { display: none; } }
.pjl-order-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--pjl-text-primary);
}

/* ---------- Steps (the stock accordion, numbered) ---------- */
.pjl-order-page .pjl-steps {
    counter-reset: pjl-step;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pjl-order-page .pjl-steps > .accordion-item {
    counter-increment: pjl-step;
    background: var(--pjl-order-panel) !important;
    border: 1px solid var(--pjl-order-line) !important;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
}
.pjl-order-page .pjl-steps .accordion-header { margin: 0; }
.pjl-order-page .pjl-steps .accordion-button {
    background: transparent !important;
    color: var(--pjl-text-primary) !important;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    border-radius: 0 !important;
}
.pjl-order-page .pjl-steps .accordion-button.collapsed { color: var(--pjl-text-secondary) !important; }
.pjl-order-page .pjl-steps .accordion-button::before {
    content: counter(pjl-step);
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid var(--pjl-order-line-strong);
    color: var(--pjl-text-secondary);
}
.pjl-order-page .pjl-steps .accordion-button:not(.collapsed)::before {
    background: var(--pjl-blue);
    border-color: var(--pjl-blue);
    color: #fff;
}
.pjl-order-page .pjl-steps .accordion-button:not(.collapsed) { border-bottom: 1px solid var(--pjl-order-line) !important; }
.pjl-order-page .pjl-steps .accordion-body {
    background: transparent;
    padding: 1.5rem 1.25rem;
}

/* Text inside the steps: readable, not the theme's tiny grey. */
.pjl-order-page .pjl-steps p,
.pjl-order-page .pjl-steps li { color: var(--pjl-text-secondary); }

/* Fields: visible edges and labels above. */
.pjl-order-page .pjl-steps .form-control,
.pjl-order-page .pjl-steps .form-select {
    border-color: var(--pjl-order-line-strong) !important;
    background-color: var(--pjl-order-panel-2) !important;
    padding: 0.65rem 0.85rem !important;
}
.pjl-order-page .pjl-steps .form-select { padding-right: 2.25rem !important; }
.pjl-order-page .pjl-steps .form-control:focus,
.pjl-order-page .pjl-steps .form-select:focus { border-color: var(--pjl-blue) !important; }
.pjl-order-page .pjl-steps .form-label,
.pjl-order-page .pjl-steps label.form-label {
    color: var(--pjl-text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}
.pjl-order-page .pjl-steps .form-check-input {
    border-color: var(--pjl-order-line-strong) !important;
    width: 1.15rem;
    height: 1.15rem;
}
.pjl-order-page .pjl-steps .form-check-input:checked {
    background-color: var(--pjl-blue) !important;
    border-color: var(--pjl-blue) !important;
}

/* ---------- Plan block ---------- */
.pjl-plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.pjl-price { font-size: 2rem; font-weight: 700; color: var(--pjl-text-primary); line-height: 1.1; }
.pjl-per { color: var(--pjl-text-secondary); font-size: 1rem; }
.pjl-setup { color: var(--pjl-text-secondary); font-size: 0.9rem; margin-left: 0.25rem; }
.pjl-plan-summary { color: var(--pjl-text-secondary); font-size: 0.975rem; line-height: 1.6; }
.pjl-plan-summary p { margin: 0 0 0.5rem; }
.pjl-plan-summary p:last-child { margin-bottom: 0; }

.pjl-periods { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pjl-period {
    display: inline-flex !important;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--pjl-order-line-strong);
    border-radius: var(--radius-lg);
    cursor: pointer;
    margin: 0 !important;
}
.pjl-period .pjl-price { font-size: 1.25rem; }
.btn-check:checked + .pjl-period { border-color: var(--pjl-blue); background: rgba(59, 130, 246, 0.15); }
.btn-check:focus-visible + .pjl-period { box-shadow: 0 0 0 3px var(--pjl-blue-glow); }

.pjl-qty { max-width: 140px; }

/* ---------- Sections inside the plan step ---------- */
.pjl-section { border-top: 1px solid var(--pjl-order-line); margin-top: 1.5rem; padding-top: 1.5rem; }
.pjl-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pjl-text-primary);
    margin: 0 0 0.35rem;
}
.pjl-section-lead { font-size: 0.9rem; margin: 0 0 1rem; }

.pjl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.pjl-span-1 { grid-column: span 1; }
.pjl-span-2 { grid-column: span 2; }
.pjl-span-3 { grid-column: span 3; }
.pjl-span-4 { grid-column: span 4; }
.pjl-field { min-width: 0; }
.pjl-optional { color: var(--pjl-text-muted); font-weight: 400; }
@media (max-width: 767.98px) {
    .pjl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pjl-span-4, .pjl-span-3 { grid-column: span 2; }
    .pjl-span-2, .pjl-span-1 { grid-column: span 1; }
}

/* E911 terms: readable box above the consent check. */
.pjl-terms {
    margin-top: 1.25rem;
    border: 1px solid var(--pjl-order-line);
    border-radius: var(--radius-lg);
    background: var(--pjl-order-panel-2);
}
.pjl-terms-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pjl-text-secondary);
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--pjl-order-line);
}
.pjl-terms-body {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    line-height: 1.55;
}
.pjl-terms-body p, .pjl-terms-body li { color: var(--pjl-text-secondary); font-size: 0.85rem; }
.pjl-terms-body p { margin: 0 0 0.6rem; }
.pjl-terms-body ul { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.pjl-terms-body a { color: var(--pjl-blue-light); }

.pjl-consent { margin-top: 1rem; display: flex; gap: 0.65rem; align-items: flex-start; padding-left: 0; }
.pjl-consent .form-check-input { margin: 0.15rem 0 0; flex: 0 0 auto; float: none; }
.pjl-order-page .pjl-consent .form-check-label {
    color: var(--pjl-text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    margin: 0;
    cursor: pointer;
}
.pjl-consent-note { display: block; color: var(--pjl-text-secondary); font-weight: 400; font-size: 0.85rem; margin-top: 0.2rem; }

/* ---------- Add-ons ---------- */
.pjl-addons { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; }
.pjl-addon {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--pjl-order-line);
    border-radius: var(--radius-lg);
    background: var(--pjl-order-panel-2);
    transition: border-color 150ms ease, background 150ms ease;
}
.pjl-addon.is-added { border-color: var(--pjl-blue); background: rgba(59, 130, 246, 0.10); }
.pjl-addon-icon { flex: 0 0 auto; border-radius: var(--radius-md); }
.pjl-addon-main { flex: 1 1 auto; min-width: 0; }
.pjl-addon-title { font-weight: 600; color: var(--pjl-text-primary); font-size: 0.975rem; }
.pjl-addon-desc, .pjl-addon-desc p { color: var(--pjl-text-secondary); font-size: 0.875rem; margin: 0.15rem 0 0; }
.pjl-addon-side { flex: 0 0 auto; display: flex; align-items: center; gap: 1rem; }
.pjl-addon-price { text-align: right; white-space: nowrap; }
.pjl-addon-price .pjl-price { font-size: 1.05rem; }
.pjl-addon-price .pjl-per { font-size: 0.85rem; }
.pjl-addon-price .pjl-setup { display: block; margin: 0; font-size: 0.8rem; }
.pjl-addon-price .form-select { min-width: 12rem; }
.pjl-addon-controls { display: flex; align-items: center; gap: 0.5rem; }
.pjl-order-page .pjl-addon-qty { width: 4.5rem !important; text-align: center; padding: 0.4rem 0.5rem !important; }
.pjl-addon-radio { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.pjl-addon-controls label.btn { margin: 0 !important; min-width: 6.25rem; display: inline-flex !important; align-items: center; justify-content: center; gap: 0.3rem; }
.pjl-addon-controls label.btn .icon { width: 1rem; height: 1rem; }
.pjl-addon-radio[value="1"]:checked ~ .pjl-addon-add { display: none !important; }
.pjl-addon-radio[value="0"]:checked ~ .pjl-addon-added { display: none !important; }
.pjl-addon-radio[value="0"]:checked ~ .pjl-addon-remove { display: none !important; }
.pjl-order-page label.pjl-addon-remove {
    display: inline !important;
    margin: 0 !important;
    color: var(--pjl-text-secondary);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}
.pjl-order-page label.pjl-addon-remove:hover { color: var(--pjl-red-light); }
.pjl-addon-radio:focus-visible ~ label.btn { box-shadow: 0 0 0 3px var(--pjl-blue-glow); }
@media (max-width: 767.98px) {
    .pjl-addon { flex-wrap: wrap; }
    .pjl-addon-side { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }
    .pjl-addon-price { text-align: left; }
    .pjl-addon-controls { margin-left: auto; }
    .pjl-addon-controls label.btn { min-width: 5.25rem; }
    .pjl-order-page .pjl-addon-qty { width: 3.75rem !important; }
}

.pjl-actions { margin-top: 1.75rem; display: flex; justify-content: flex-end; }
.pjl-actions .btn { min-width: 10rem; }

/* ---------- Your order (right column) ---------- */
.pjl-summary {
    position: sticky;
    top: calc(var(--header-height, 70px) + 1rem);
    background: var(--pjl-order-panel);
    border: 1px solid var(--pjl-order-line);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}
.pjl-summary-title { font-size: 1.05rem; font-weight: 600; color: var(--pjl-text-primary); margin: 0 0 0.9rem; }
.pjl-summary-lines { list-style: none; margin: 0; padding: 0; }
.pjl-summary-lines > li { padding: 0.6rem 0; border-bottom: 1px solid var(--pjl-order-line); }
.pjl-summary-lines > li:first-child { padding-top: 0; }
.pjl-summary-line { display: flex; justify-content: space-between; gap: 0.75rem; }
.pjl-summary-name { color: var(--pjl-text-primary); font-size: 0.9rem; }
.pjl-summary-amount { color: var(--pjl-text-primary); font-size: 0.9rem; white-space: nowrap; text-align: right; }
.pjl-summary-sub { display: flex; justify-content: space-between; gap: 0.75rem; color: var(--pjl-text-secondary); font-size: 0.8rem; margin-top: 0.15rem; }
.pjl-summary-empty { color: var(--pjl-text-secondary); font-size: 0.9rem; }
.pjl-summary-remove { color: var(--pjl-text-secondary); text-decoration: underline; }
.pjl-summary-remove:hover { color: var(--pjl-red-light); }
.pjl-summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 0.75rem; color: var(--pjl-text-secondary); font-size: 0.9rem; }
.pjl-summary-total strong { color: var(--pjl-text-primary); font-size: 1rem; }
.pjl-summary-total--main strong { font-size: 1.35rem; }
.pjl-summary-total[hidden] { display: none; }
.pjl-summary-note { color: var(--pjl-text-muted); font-size: 0.78rem; margin: 0.9rem 0 0; }

/* ---------- Account step ---------- */
.pjl-auth-switch {
    display: inline-flex;
    padding: 0.25rem;
    border: 1px solid var(--pjl-order-line-strong);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    gap: 0.25rem;
}
.pjl-auth-tab {
    border: 0;
    background: transparent;
    color: var(--pjl-text-secondary);
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md);
}
.pjl-auth-tab.active { background: var(--pjl-blue); color: #fff; }
/* Stock uses Bootstrap floating labels, which this theme draws on top of the placeholder. Labels go above. */
.pjl-order-page #register .form-floating { display: flex; flex-direction: column-reverse; }
.pjl-order-page #register .form-floating > label {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    height: auto;
    padding: 0 !important;
    margin: 0 0 0.4rem !important;
    color: var(--pjl-text-primary) !important;
    font-size: 0.875rem;
    font-weight: 500;
    border: 0;
}
.pjl-order-page #register .form-floating > label::after { display: none; }
.pjl-order-page #register .form-floating > .form-control,
.pjl-order-page #register .form-floating > .form-select { height: auto; min-height: 0; padding: 0.65rem 0.85rem !important; }
.pjl-order-page #register .form-floating > .form-control::placeholder { color: transparent !important; }
@media (min-width: 768px) {
    /* Two columns for the long Create account form. */
    .pjl-order-page #sign-up form > .row,
    .pjl-order-page #sign-up form .row { --bs-gutter-x: 1rem; }
}

/* ---------- Review and pay ---------- */
.pjl-promo-group { max-width: 26rem; }
.pjl-promo-group .form-control { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.pjl-promo-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pjl-gateways { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pjl-gateway {
    display: inline-flex !important;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--pjl-order-line-strong);
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--pjl-text-primary) !important;
    margin: 0 !important;
}
.pjl-gateway-logo { height: 22px; width: auto; }
.btn-check:checked + .pjl-gateway { border-color: var(--pjl-blue); background: rgba(59, 130, 246, 0.15); }
.btn-check:focus-visible + .pjl-gateway { box-shadow: 0 0 0 3px var(--pjl-blue-glow); }
.pjl-fineprint { color: var(--pjl-text-muted); font-size: 0.8rem; }

/* ---------- Choose a plan (/order) ---------- */
.pjl-plan-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.pjl-plan-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid var(--pjl-order-line);
    border-radius: var(--radius-lg);
    color: var(--pjl-text-primary);
    text-decoration: none;
    background: var(--pjl-order-panel-2);
}
.pjl-plan-link:hover { border-color: var(--pjl-blue); color: var(--pjl-text-primary); }
.pjl-plan-link .icon { width: 1.1rem; height: 1.1rem; }

@media (max-width: 991.98px) {
    .pjl-summary { position: static; }
    .pjl-actions .btn { width: 100%; }
}

/* Phone number field: the country flag button sits inside the input; keep the number clear of it. */
.pjl-order-page #register .iti { width: 100%; }
.pjl-order-page #register .iti input.form-control { padding-left: 3.25rem !important; }
