/* ═══════════════════════════════════════════
   INVESTMENT ESTIMATOR — WIDGET
   v1.3.0 — Layout 1 + Layout 2 (ROI Estimator)
═══════════════════════════════════════════ */

/* ── Shared ── */
.iew-wrap {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    border-top: 3px solid #4ade80;
    padding: 28px 28px 24px;
    box-sizing: border-box;
    font-family: inherit;
}

/* ═══════════════════════════════════════════
   LAYOUT 1 — INVESTMENT ESTIMATOR
═══════════════════════════════════════════ */
.iew-layout-1 .iew-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    padding: 0;
    line-height: 1.2;
}

.iew-layout-1 .iew-subtitle {
    color: #aaa;
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.iew-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.iew-slider-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.iew-sqft-value {
    color: #4ade80;
    font-size: 22px;
    font-weight: 700;
}

.iew-sqft-unit {
    color: #888;
    font-size: 13px;
    font-weight: 400;
}

/* Range slider */
.iew-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    display: block;
    border: none;
    padding: 0;
    margin: 0;
}

.iew-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4ade80;
    cursor: pointer;
    transition: transform .1s;
}

.iew-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.iew-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4ade80;
    cursor: pointer;
    border: none;
}

.iew-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    margin-bottom: 20px;
}

.iew-range-labels span {
    color: #555;
    font-size: 11px;
    letter-spacing: .04em;
}

/* Price cards */
.iew-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.iew-price-card {
    background: #111;
    border-radius: 8px;
    padding: 16px 18px;
    box-sizing: border-box;
}

.iew-card-label {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.iew-price {
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.1;
}

.iew-monthly-suffix {
    color: #4ade80;
    font-size: 14px;
    font-weight: 400;
}

.iew-card-desc {
    color: #555;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

/* CTA button */
.iew-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #4ade80;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    font-family: inherit;
}

.iew-btn:hover  { opacity: .88; transform: translateY(-1px); }
.iew-btn:active { transform: translateY(0); }


/* ═══════════════════════════════════════════
   LAYOUT 2 — RESTORATION ROI ESTIMATOR
═══════════════════════════════════════════ */
.iew-layout-2 {
    border-top-color: #4ade80;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
}

.iew-roi-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222;
}

/* Left panel */
.iew-roi-left {
    background: #111;
    padding: 32px 28px;
    box-sizing: border-box;
    border-right: 1px solid #222;
}

.iew-roi-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.2;
}

.iew-roi-subtitle {
    color: #666;
    font-size: 13px;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* Surface type tabs */
.iew-surface-label {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.iew-surface-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.iew-surface-tab {
    flex: 1;
    min-width: 80px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 10px 10px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
    font-family: inherit;
}

.iew-surface-tab:hover {
    border-color: #4ade80;
    background: #1e2e1e;
}

.iew-surface-tab.active {
    border-color: #4ade80;
    background: #1e2e1e;
}

.iew-surface-tab-icon {
    font-size: 20px;
    display: block;
    margin-bottom: 6px;
    line-height: 1;
}

.iew-surface-tab-name {
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    display: block;
}

.iew-surface-tab.active .iew-surface-tab-name {
    color: #4ade80;
}

/* Sqft slider label row */
.iew-roi-sqft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.iew-roi-sqft-label {
    color: #888;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.iew-roi-sqft-value {
    background: #1e2e1e;
    border: 1px solid #4ade80;
    color: #4ade80;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 5px;
    letter-spacing: .04em;
}

/* How we calculate box */
.iew-roi-how {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 20px;
}

.iew-roi-how-title {
    color: #f0c040;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iew-roi-how-text {
    color: #666;
    font-size: 12px;
    line-height: 1.6;
    margin: 0;
}

.iew-roi-how-text strong {
    color: #aaa;
}

/* Right panel */
.iew-roi-right {
    background: #0d0d0d;
    padding: 32px 28px;
    box-sizing: border-box;
}

.iew-roi-stat-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.iew-roi-stat-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 18px 16px;
    box-sizing: border-box;
}

.iew-roi-stat-label {
    color: #666;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 8px;
}

.iew-roi-stat-value {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1;
}

.iew-roi-stat-value.replacement { color: #fff; }
.iew-roi-stat-value.restoration { color: #4ade80; }

.iew-roi-stat-desc {
    color: #555;
    font-size: 11px;
    line-height: 1.4;
    margin: 0;
}

/* Savings highlight box */
.iew-roi-savings-box {
    background: #0a1a0f;
    border: 1px solid #1e3d1e;
    border-radius: 10px;
    padding: 24px 22px;
    margin-bottom: 20px;
    text-align: center;
}

.iew-roi-savings-label {
    color: #4ade80;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 10px;
}

.iew-roi-savings-amount {
    color: #fff;
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    margin: 0 0 14px;
}

.iew-roi-savings-text {
    color: #888;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

.iew-roi-savings-text strong {
    color: #fff;
}

/* Lifespan bar */
.iew-roi-lifespan {
    margin-bottom: 20px;
}

.iew-roi-lifespan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.iew-roi-lifespan-title {
    color: #666;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.iew-roi-lifespan-ext {
    color: #4ade80;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.iew-roi-bar-track {
    background: #222;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.iew-roi-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2d6a4f, #4ade80);
    border-radius: 4px;
    transition: width .4s ease;
}

.iew-roi-bar-labels {
    display: flex;
    justify-content: space-between;
}

.iew-roi-bar-labels span {
    color: #555;
    font-size: 10px;
}

.iew-roi-bar-labels span:last-child {
    color: #4ade80;
}

/* Guarantee badge */
.iew-roi-guarantee {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 0;
}

.iew-roi-guarantee-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.iew-roi-guarantee-text strong {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.iew-roi-guarantee-text span {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════
   MODAL OVERLAY (shared by both layouts)
═══════════════════════════════════════════ */
.iew-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.75);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.iew-modal-overlay.iew-open {
    display: flex;
}

.iew-modal-box {
    position: relative;
    background: #1a1a1a;
    border-top: 3px solid #4ade80;
    border-radius: 12px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: 0 24px 64px rgba(0,0,0,.6);
    animation: iew-slide-in .22s ease;
}

@keyframes iew-slide-in {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Close X */
.iew-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color .15s;
}
.iew-modal-close:hover { color: #fff; }

/* Modal title */
.iew-modal-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}

.iew-modal-title svg {
    flex-shrink: 0;
    color: #4ade80;
}

.iew-modal-subtitle {
    color: #aaa;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 24px;
}

/* Form area */
.iew-modal-form {
    margin-bottom: 20px;
}

/* Override Elementor form defaults for dark bg */
.iew-modal-form .elementor-field-group label,
.iew-modal-form .elementor-field-label {
    color: #ccc !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    margin-bottom: 6px !important;
}

.iew-modal-form .elementor-field input,
.iew-modal-form .elementor-field textarea,
.iew-modal-form .elementor-field select,
.iew-modal-form input[type="text"],
.iew-modal-form input[type="email"],
.iew-modal-form input[type="tel"],
.iew-modal-form input[type="number"],
.iew-modal-form input[type="date"],
.iew-modal-form textarea,
.iew-modal-form select {
    background: #111 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    transition: border-color .15s !important;
}

.iew-modal-form input:focus,
.iew-modal-form textarea:focus,
.iew-modal-form select:focus {
    border-color: #4ade80 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(74,222,128,.15) !important;
}

.iew-modal-form input::placeholder,
.iew-modal-form textarea::placeholder {
    color: #555 !important;
}

/* Built-in modal form (Layout 2 style — 2-col grid) */
.iew-builtin-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.iew-builtin-form .iew-form-full {
    grid-column: 1 / -1;
}

.iew-builtin-form label {
    display: block;
    color: #ccc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.iew-builtin-form label .iew-req {
    color: #4ade80;
    margin-left: 2px;
}

.iew-builtin-form input,
.iew-builtin-form textarea {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    padding: 10px 14px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .15s;
    outline: none;
}

.iew-builtin-form input:focus,
.iew-builtin-form textarea:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 2px rgba(74,222,128,.12);
}

.iew-builtin-form input::placeholder,
.iew-builtin-form textarea::placeholder {
    color: #555;
}

.iew-builtin-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Modal buttons row */
.iew-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.iew-modal-submit {
    background: #4ade80;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s;
    flex: 1;
}

.iew-modal-submit:hover { opacity: .88; }

/* Elementor submit button inside modal */
.iew-modal-form .elementor-button,
.iew-modal-form button[type="submit"],
.iew-modal-form input[type="submit"] {
    background: #4ade80 !important;
    color: #000 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 28px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: opacity .15s !important;
    width: auto !important;
}

.iew-modal-form .elementor-button:hover,
.iew-modal-form button[type="submit"]:hover {
    opacity: .88 !important;
}

/* Cancel link */
.iew-modal-cancel {
    background: none;
    border: 1px solid #333;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    padding: 14px 20px;
    font-family: inherit;
    transition: color .15s, border-color .15s;
    display: inline-block;
    border-radius: 8px;
    flex: 0 0 auto;
}
.iew-modal-cancel:hover { color: #fff; border-color: #555; }

/* Responsive */
@media (max-width: 900px) {
    .iew-roi-wrapper {
        grid-template-columns: 1fr;
    }
    .iew-roi-left {
        border-right: none;
        border-bottom: 1px solid #222;
    }
}

@media (max-width: 560px) {
    .iew-cards { grid-template-columns: 1fr; }
    .iew-wrap  { padding: 20px 16px 18px; }
    .iew-modal-box { padding: 28px 18px 22px; }
    .iew-roi-stat-cards { grid-template-columns: 1fr; }
    .iew-builtin-form { grid-template-columns: 1fr; }
    .iew-surface-tabs { gap: 8px; }
    .iew-roi-savings-amount { font-size: 36px; }
}

/* v1.3.0 layout patch */
.iew-modal-overlay{display:none;}
.iew-modal-overlay.iew-open{display:flex;}

/* ═══════════════════════════════════════════
   LAYOUT 2 — POPUP / MODAL (same design as L1)
═══════════════════════════════════════════ */
.iew-layout-2 ~ .iew-modal-overlay .iew-modal-box,
.iew-roi-wrapper ~ .iew-modal-overlay .iew-modal-box {
    background: #1a1a1a;
    border-top: 3px solid #4ade80;
    border-radius: 12px;
    padding: 36px 32px 28px;
    max-width: 560px;
    box-shadow: 0 24px 64px rgba(0,0,0,.6);
}

/* Ensure Layout 2 modal form fields are styled identically to Layout 1 */
.iew-layout-2 ~ .iew-modal-overlay .iew-builtin-form input,
.iew-layout-2 ~ .iew-modal-overlay .iew-builtin-form textarea {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
}

.iew-layout-2 ~ .iew-modal-overlay .iew-builtin-form input:focus,
.iew-layout-2 ~ .iew-modal-overlay .iew-builtin-form textarea:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 2px rgba(74,222,128,.12);
    outline: none;
}

