/* Plus Home Kitchen Estimator frontend styles */
.phe-app-container {
            --phe-bg-dark: #131a16;
            --phe-orange: #ff5500;
            --phe-orange-hover: #e04b00;
            --phe-text-dark: #0f172a;
            --phe-text-muted: #64748b;
            --phe-border: #e2e8f0;
            --phe-radius: 12px;
            display: flex;
            background: #ffffff;
            min-height: 720px;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            color: var(--phe-text-dark);
            border: 1px solid var(--phe-border);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 20px 40px -15px rgba(0,0,0,0.08);
            margin: 20px auto;
            max-width: 1300px;
        }
        .phe-app-container * { box-sizing: border-box; }
        .phe-sidebar { width: 380px; background: var(--phe-bg-dark); color: #ffffff; padding: 48px 36px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: space-between; }
        .phe-tagline { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--phe-orange); display: block; margin-bottom: 12px; }
        .phe-main-heading { font-size: 38px; font-weight: 800; line-height: 1.1; margin: 0 0 16px 0; letter-spacing: -1px; color:#fff; }
        .phe-orange-text { color: var(--phe-orange); }
        .phe-subtext { font-size: 14px; color: #94a3b8; line-height: 1.5; margin-bottom: 40px; }
        .phe-stepper { display: flex; flex-direction: column; gap: 24px; }
        .phe-step-nav { display: flex; align-items: center; gap: 16px; opacity: 0.4; transition: opacity 0.2s; }
        .phe-step-nav.phe-step-active, .phe-step-nav.phe-step-done { opacity: 1; }
        .phe-step-circle { width: 32px; height: 32px; border-radius: 50%; background: #242f29; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; border: 1px solid #334155; position: relative; flex-shrink: 0; }
        .phe-step-num { display: inline-block; }
        .phe-step-check { display: none; font-size: 14px; font-weight: bold; }
        .phe-step-nav.phe-step-active .phe-step-circle { background: var(--phe-orange); border-color: var(--phe-orange); }
        .phe-step-nav.phe-step-done .phe-step-circle { background: #1b241f; border-color: #10b981; color: #10b981; }
        .phe-step-nav.phe-step-done .phe-step-num { display: none; }
        .phe-step-nav.phe-step-done .phe-step-check { display: inline-block; }
        .phe-step-title { display: block; font-size: 15px; font-weight: 700; color: #fff; }
        .phe-step-sub { display: block; font-size: 12px; color: #94a3b8; }
        .phe-sidebar-badge { background: #1b241f; border: 1px solid #28362e; padding: 14px; border-radius: 8px; margin-top: 40px; }
        .phe-sidebar-badge strong { display: block; font-size: 12px; color: #fff; margin-bottom: 2px; }
        .phe-sidebar-badge span { font-size: 11px; color: #94a3b8; line-height: 1.3; display: block; }
        .phe-content-area { flex-grow: 1; padding: 40px 60px 30px 60px; display: flex; flex-direction: column; justify-content: space-between; background: #ffffff; }
        .phe-top-title-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 8px; }
        .phe-top-progress-bar { height: 4px; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin-bottom: 30px; }
        .phe-top-progress-fill { height: 100%; background: var(--phe-orange); transition: width 0.3s ease; }
        .phe-screen { display: none; }
        .phe-screen-active { display: block; animation: pheFade 0.25s ease; }
        @keyframes pheFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
        .phe-q-badge-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
        .phe-q-pill { background: #ffede6; color: var(--phe-orange); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
        .phe-pill-result { background: #fee2e2; color: #ef4444; }
        .phe-q-title { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -0.5px; }
        .phe-q-sub { font-size: 14px; color: var(--phe-text-muted); margin: 0 0 28px 0; }
        .phe-sub-section-title { font-size: 11px; font-weight: 700; color: #64748b; letter-spacing: 0.8px; margin-bottom: 10px; }
        .phe-cards-grid { display: grid; gap: 14px; }
        .phe-grid-2 { grid-template-columns: repeat(2, 1fr); }
        .phe-grid-3 { grid-template-columns: repeat(3, 1fr); }
        .phe-grid-4 { grid-template-columns: repeat(4, 1fr); }
        .phe-card { border: 1px solid var(--phe-border); border-radius: var(--phe-radius); padding: 18px 20px; cursor: pointer; position: relative; background: #ffffff; transition: all 0.2s ease; }
        .phe-card:hover { border-color: #94a3b8; }
        .phe-card.phe-card-selected { border-color: var(--phe-orange); box-shadow: 0 0 0 1px var(--phe-orange); background: #fffafa; }
        .phe-card.phe-tight { padding: 14px 18px; }
        .phe-card h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px 0; }
        .phe-card p { font-size: 13px; color: var(--phe-text-muted); margin: 0; line-height: 1.4; }
        .phe-pill-badge { position: absolute; top: 12px; right: 12px; background: var(--phe-orange); color: #ffffff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
        .phe-pill-common { background: var(--phe-orange); }
        .phe-check-mark { color: var(--phe-orange); font-weight: bold; float: right; }
        .phe-layout-card { text-align: center; }
        .phe-layout-art { height: 70px; background: #f8f6f0; border-radius: 8px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; position: relative; }
        .phe-art-line { position: absolute; border: 3px solid var(--phe-orange); }
        .phe-art-single { width: 50px; height: 0; }
        .phe-art-galley-1 { width: 50px; height: 0; top: 22px; }
        .phe-art-galley-2 { width: 50px; height: 0; bottom: 22px; border-style: dashed; }
        .phe-art-l { width: 40px; height: 35px; border-top: none; border-right: none; }
        .phe-art-u { width: 40px; height: 35px; border-top: none; }
        .phe-art-peninsula { width: 40px; height: 35px; border-top: none; border-right: none; }
        .phe-art-peninsula::after { content:""; position:absolute; right:15px; bottom:0; height:18px; border-left:3px solid var(--phe-orange); }
        .phe-art-island-wrap { width: 45px; height: 35px; border-top: none; }
        .phe-art-island-dot { width: 14px; height: 8px; background: var(--phe-orange); }
        .phe-notification-banner { border-radius: 8px; font-size: 13px; }
        .phe-banner-dark { background: #131a16; color: #ffffff; }
        .phe-banner-light { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
        .phe-sub-box-container { background: #ffffff; border: 1px solid var(--phe-border); padding: 20px; border-radius: var(--phe-radius); }
        .phe-alert-box { padding: 14px 18px; border-radius: 8px; font-size: 13px; }
        .phe-alert-orange { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
        .phe-alert-orange p { margin: 4px 0 0 0; font-size: 12px; color: #c2410c; }
        .phe-alert-green { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
        .phe-alert-green p { margin: 4px 0 0 0; font-size: 12px; color: #15803d; }
        .phe-zip-box { display: flex; gap: 14px; margin-bottom: 8px; max-width: 500px; }
        .phe-zip-input { width: 50%; font-size: 24px; font-weight: 800; padding: 12px; border: 1px solid var(--phe-border); border-radius: 8px; text-align: center; letter-spacing: 2px; }
        .phe-zip-box .phe-btn-orange { width: 70%; }
        .phe-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .phe-field-label { display: block; font-size: 11px; font-weight: 700; color: #475569; margin-bottom: 6px; letter-spacing: 0.5px; }
        .phe-label-opt { font-size: 10px; color: #94a3b8; font-weight: 600; }
        .phe-input { width: 100%; padding: 12px 16px; font-size: 15px; border: 1px solid var(--phe-border); border-radius: 8px; outline: none; }
        .phe-input:focus { border-color: var(--phe-orange); }
        .phe-consent-row { display: flex; gap: 10px; font-size: 12px; color: #64748b; margin-top: 18px; align-items: flex-start; }
        .phe-consent-row input { margin-top: 3px; }
        .phe-result-box { text-align: center; margin-bottom: 24px; }
        .phe-result-sub-label { font-size: 11px; font-weight: 800; color: var(--phe-orange); letter-spacing: 1px; display: block; margin-bottom: 8px; }
        .phe-range-display { font-size: 52px; font-weight: 800; color: #0f172a; line-height: 1.1; margin-bottom: 8px; letter-spacing: -1.5px; }
        .phe-range-disclaimer { font-size: 13px; color: #64748b; max-width: 580px; margin: 0 auto; }
        .phe-assumptions-box { background: #faf8f5; border: 1px solid #ede8df; padding: 16px 20px; border-radius: 8px; font-size: 13px; }
        .phe-assumptions-box strong { display: block; margin-bottom: 6px; }
        .phe-assumptions-box ul { margin: 0; padding-left: 18px; color: #475569; }
        .phe-assumptions-box li { margin-bottom: 3px; }
        .phe-result-footer-row { display: flex; gap: 12px; justify-content: center; margin-top: 24px; font-size: 11px; }
        .phe-tag-saved { background: #f1f5f9; padding: 4px 10px; border-radius: 4px; color: #475569; }
        .phe-tag-score { background: #ffffff; border: 1px solid #cbd5e1; padding: 4px 10px; border-radius: 4px; }
        .phe-tag-await { color: #94a3b8; padding: 4px 0; }
        .phe-legal-note { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 16px; line-height: 1.4; }
        .phe-bottom-bar { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--phe-border); padding-top: 20px; margin-top: 30px; }
        .phe-btn-orange { background: var(--phe-orange); color: #ffffff; border: none; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; transition: background 0.2s; }
        .phe-btn-orange:hover:not(:disabled) { background: var(--phe-orange-hover); }
        .phe-btn-orange:disabled { opacity: 0.4; cursor: not-allowed; }
        .phe-btn-large { padding: 14px 28px; font-size: 15px; }
        .phe-btn-link { background: none; border: none; font-size: 13px; font-weight: 700; color: #64748b; cursor: pointer; }
        .phe-safe-tag { font-size: 12px; color: #94a3b8; }
        .phe-helper-text { font-size: 12px; color: #94a3b8; }

        /* v15 responsive polish */
        .phe-app-container { width: 100%; max-width: 1180px; margin: 20px auto; box-sizing: border-box; overflow: hidden; }
        .phe-app-container *, .phe-app-container *::before, .phe-app-container *::after { box-sizing: border-box; }
        .phe-card { min-width: 0; overflow-wrap: anywhere; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
        .phe-card:hover { transform: translateY(-1px); }
        .phe-card:focus-visible, .phe-btn-orange:focus-visible, .phe-btn-link:focus-visible, .phe-input:focus-visible, .phe-zip-input:focus-visible { outline: 3px solid rgba(255,85,0,.28); outline-offset: 2px; }
        .phe-stepper { overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
        .phe-step-nav { min-width: 0; flex: 1 1 0; }
        .phe-content-area { min-width: 0; }
        .phe-views-wrapper { min-width: 0; }
        .phe-q-title, .phe-q-sub, .phe-card h4, .phe-card p { overflow-wrap: anywhere; }
        .phe-loading { position: relative; pointer-events: none; opacity: .68; }
        .phe-loading::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(255,255,255,.25); }
        .phe-btn-orange.is-loading { position: relative; padding-right: 42px; }
        .phe-btn-orange.is-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; position: absolute; right: 16px; top: 50%; margin-top: -7px; animation: phe-spin .7s linear infinite; }
        @keyframes phe-spin { to { transform: rotate(360deg); } }

        @media (max-width: 992px) {
            .phe-app-container { flex-direction: column; }
            .phe-sidebar { width: 100%; padding: 30px 24px; }
            .phe-content-area { padding: 30px 20px; }
            .phe-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .phe-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .phe-zip-box { flex-direction: column; }
            .phe-zip-box .phe-btn-orange { width: 100%; }
            .phe-grid-2 { grid-template-columns: repeat(1, 1fr); }
            .phe-q-badge-wrap { flex-direction: column; align-items: center; text-align: center; }
            .phe-q-title { text-align: center; }
            .phe-range-display { font-size: 32px; }
        }

        @media (max-width: 767px) {
            .phe-app-container { margin: 10px 0; min-height: auto; border-radius: 10px; width: 100%; }
            .phe-sidebar { padding: 24px 18px; }
            .phe-main-heading { font-size: 30px; }
            .phe-subtext { margin-bottom: 24px; }
            .phe-stepper { gap: 12px; }
            .phe-step-nav { gap: 10px; }
            .phe-step-circle { width: 28px; height: 28px; }
            .phe-step-title { font-size: 13px; }
            .phe-step-sub { font-size: 11px; }
            .phe-sidebar-badge { margin-top: 24px; }
            .phe-content-area { padding: 22px 14px 18px; width: 100%; overflow: hidden; }
            .phe-top-progress-bar { margin-bottom: 20px; }
            .phe-q-title { font-size: 24px; line-height: 1.2; }
            .phe-q-sub { text-align: center; margin-bottom: 20px; }
            .phe-cards-grid, .phe-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
            .phe-grid-3, .phe-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
            .phe-card { padding: 16px; }
            .phe-layout-art { height: 60px; }
            .phe-form-row-2 { grid-template-columns: 1fr; gap: 12px; }
            .phe-zip-box { max-width: 100%; gap: 10px; }
            .phe-zip-input { width: 100%; font-size: 20px; }
            .phe-notification-banner { align-items: flex-start; padding: 12px; }
            .phe-sub-box-container { padding: 14px; }
            .phe-result-footer-row { flex-direction: column; align-items: center; gap: 7px; }
            .phe-range-display { font-size: 28px; word-break: break-word; }
            .phe-assumptions-box { padding: 14px; }
            .phe-bottom-bar { flex-wrap: wrap; gap: 12px; padding-top: 16px; margin-top: 22px; }
            .phe-bottom-bar .phe-btn-link { order: 1; }
            .phe-safe-tag { order: 3; width: 100%; text-align: center; }
            .phe-continue-btn { order: 2; margin-left: auto; }
            .phe-btn-orange { padding: 12px 18px; }
            .phe-input { font-size: 16px; }
            .phe-result-box { margin-bottom: 18px; }
        }

        @media (max-width: 520px) {
            .phe-cards-grid, .phe-grid-2, .phe-grid-3, .phe-grid-4 { grid-template-columns: 1fr !important; }
            .phe-step-nav { flex: 0 0 auto; min-width: 145px; }
            .phe-stepper { gap: 8px; }
            .phe-zip-input, .phe-zip-box .phe-btn-orange { width: 100%; }
        }

        @media (max-width: 420px) {
            .phe-sidebar { padding: 20px 14px; }
            .phe-content-area { padding: 18px 12px 14px; }
            .phe-main-heading { font-size: 27px; }
            .phe-q-title { font-size: 21px; }
            .phe-card h4 { font-size: 14px; }
            .phe-card p { font-size: 12px; }
            .phe-range-display { font-size: 24px; }
            .phe-bottom-bar { align-items: stretch; }
            .phe-bottom-bar .phe-btn-link,
            .phe-bottom-bar .phe-continue-btn { width: 100%; margin: 0; }
            .phe-safe-tag { font-size: 11px; }
        }


/* Compact ZIP launcher + estimator modal */
.phe-zip-launcher { width: 100%; max-width: 620px; }
.phe-zip-launcher-form { display: flex; align-items: stretch; gap: 8px; width: 100%; }
.phe-zip-launcher-input { width: 40% !important; height: 52px; padding: 0 14px; border: 1px solid #d9dde2; border-radius: 5px; background: #fff; color: #111827; font-size: 17px; font-weight: 700; outline: none; box-sizing: border-box; }
.phe-zip-launcher-input:focus { border-color: var(--phe-orange); box-shadow: 0 0 0 2px rgba(255,85,0,.12); }
.phe-zip-launcher-button { flex: 1; width:60% !important; min-width: 0; height: 52px; padding: 0 26px; border: 0; border-radius: 5px; background: var(--phe-orange); color: #fff; font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.phe-zip-launcher-button:hover { background: var(--phe-orange-hover); transform: translateY(-1px); }
.phe-zip-launcher-button:active { transform: translateY(0); }
.phe-zip-launcher-error { display: none; margin-top: 9px; padding: 9px 12px; border-radius: 5px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; line-height: 1.4; }
.phe-zip-launcher-error.is-visible { display: block; }

.phe-estimator-modal { display: none; position: fixed; inset: 0; z-index: 999999; }
.phe-estimator-modal.is-open { display: block; }
.phe-estimator-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.72); backdrop-filter: blur(3px); }
.phe-estimator-modal-dialog { position: relative; z-index: 1; width: min(1300px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: 16px auto; overflow: auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.phe-estimator-modal-dialog > .phe-app-container { margin: 0; max-width: none; min-height: min(720px, calc(100vh - 32px)); border: 0; border-radius: 16px; box-shadow: none; }
.phe-estimator-modal-close { position: absolute; z-index: 5; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(15,23,42,.7); color: #fff; font-size: 27px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.phe-estimator-modal-close:hover { background: rgba(15,23,42,.9); }
html.phe-modal-open, body.phe-modal-open { overflow: hidden; }

@media (max-width: 600px) {
    .phe-zip-launcher-form { gap: 7px; }
    .phe-zip-launcher-input { width: 110px; min-width: 110px; height: 50px; font-size: 16px; }
    .phe-zip-launcher-button { height: 50px; padding: 0 14px; font-size: 14px; }
    .phe-estimator-modal-dialog { width: 100vw; max-height: 100vh; margin: 0; border-radius: 0; }
    .phe-estimator-modal-dialog > .phe-app-container { min-height: 100vh; border-radius: 0; }
    .phe-estimator-modal-close { top: 8px; right: 8px; }
}


/* Step 4 scheduling + same-page completion */
.phe-result-actions { margin-top: 24px; }
.phe-step4-cta-title { margin: 0 0 6px; font-size: 16px; color: #0f172a; }
.phe-step4-cta-sub { margin: 0 0 14px; font-size: 12px; color: #64748b; }
.phe-action-card { position: relative; }
.phe-route-badge { position: absolute; top: 8px; right: 10px; background: var(--phe-orange); color: #fff; }
.phe-sub-flow-panel { margin-top: 20px; }
.phe-schedule-panel { background: #f3faf6; border: 1px solid #c7dbd0; border-radius: 12px; padding: 20px; }
.phe-schedule-kicker { color: var(--phe-orange); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 7px; text-transform: uppercase; }
.phe-schedule-panel h3 { margin: 0 0 7px; font-size: 25px; color: #0f172a; }
.phe-schedule-help { margin: 0 0 18px; color: #64748b; font-size: 12px; }
.phe-date-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
.phe-date-option, .phe-time-option { border: 1px solid #d4ddd8; background: #fff; border-radius: 8px; min-height: 54px; cursor: pointer; color: #0f172a; font-weight: 700; padding: 8px 5px; }
.phe-date-option { display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: 11px; }
.phe-date-option span { font-size: 9px; color: #64748b; font-weight: 600; }
.phe-date-option:hover, .phe-time-option:hover { border-color: var(--phe-orange); }
.phe-date-option.phe-card-selected, .phe-time-option.phe-card-selected { border-color: var(--phe-orange); background: #fff7f0; box-shadow: 0 0 0 1px var(--phe-orange); }
.phe-time-wrap { margin-top: 16px; }
.phe-schedule-label { font-size: 11px; font-weight: 800; color: #475569; margin-bottom: 8px; }
.phe-time-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.phe-time-option { min-height: 42px; font-size: 11px; }
.phe-schedule-submit, .phe-email-submit { width: 100%; margin-top: 16px; }
.phe-route-result { align-items: center; gap: 14px; margin-top: 16px; padding: 15px 16px; border: 1px solid #a7d6bd; background: #e8f6ed; border-radius: 9px; color: #14532d; }
.phe-route-result strong { display: block; color: #0f5132; font-size: 14px; margin-bottom: 3px; }
.phe-route-result p { margin: 3px 0 0; font-size: 11px; color: #35664a; }
.phe-route-result-date { font-size: 12px; font-weight: 700; color: #0f5132; }
.phe-success-icon { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #1f6b50; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.phe-step4-question { font-size: 14px; color: #0f172a; }
.phe-step4-question-sub { font-size: 12px; color: #64748b; margin: 3px 0 12px; }
.phe-email-submit { max-width: 420px; }
@media (max-width: 800px) {
  .phe-date-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .phe-date-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .phe-time-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .phe-schedule-panel { padding: 15px; }
  .phe-schedule-panel h3 { font-size: 21px; }
}
