/* ROI Simulator Section */
.roi-simulator {
    background: linear-gradient(135deg, #fefcfb 0%, #fff8f5 50%, #fef7f3 100%);
    padding: 40px 0 60px 0;
}

.roi-simulator .section-title {
    color: var(--secondary-color);
}

.roi-simulator .section-subtitle {
    color: var(--text-secondary);
}

.simulator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

/* Mobile orientation message */
.mobile-orientation-message {
    display: none;
    background: rgba(255, 92, 1, 0.15);
    padding: 12px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 20px;
    color: var(--accent-color);
    font-weight: 600;
}

/* Sliders Section */
.sliders-section {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.sliders-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: white;
}

.sliders-main-title {
    color: #FFF9F6 !important;
    font-size: 24px !important;
    margin-bottom: 20px !important;
}

/* Sliders subsections */
.sliders-subsection {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #fefcfb 0%, #fff8f5 50%, #fef7f3 100%);
}

.sliders-subsection:last-child {
    margin-bottom: 0;
}

.sliders-subsection h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--accent-color);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(26, 37, 55, 0.2);
}

.sliders-subsection .slider-label {
    color: #313B4B;
}

.slider-group {
    margin-bottom: 30px;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: white;
}

.label-hint {
    font-size: 0.875em;
    font-weight: 400;
    color: #6b7280;
    margin-left: 8px;
}

.sliders-subsection .label-hint {
    color: #8a94a6;
}

.slider-value {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 700;
}

.slider-container {
    position: relative;
    width: 100%;
}

/* Custom Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, var(--accent-color) 0%, var(--accent-color) var(--slider-progress, 50%), rgba(26, 37, 55, 0.2) var(--slider-progress, 50%), rgba(26, 37, 55, 0.2) 100%);
    outline: none;
}

input[type="range"]:hover {
    background: linear-gradient(to right, var(--accent-color) 0%, var(--accent-color) var(--slider-progress, 50%), rgba(26, 37, 55, 0.3) var(--slider-progress, 50%), rgba(26, 37, 55, 0.3) 100%);
}

/* Webkit (Chrome, Safari, Edge) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 92, 1, 0.4);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 92, 1, 0.6);
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 92, 1, 0.4);
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 92, 1, 0.6);
}

/* Results Section */
.results-section {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.results-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--accent-color);
}

/* Tables */
.results-table {
    width: 100%;
    margin-bottom: 30px;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
    table-layout: fixed;
}

.results-table:last-child {
    margin-bottom: 0;
}

.results-table th,
.results-table td {
    padding: 16px;
    text-align: left;
    border: 1px solid white;
}

.results-table th {
    background: var(--secondary-color);
    font-weight: 700;
    color: white;
}

.results-table td {
    color: white;
}


.results-table td:first-child {
    font-weight: 600;
}

.results-table td:not(:first-child) {
    text-align: center;
    font-weight: 700;
    color: white;
}

/* ROI Highlight in first row */
.roi-cell {
    background: rgba(255, 92, 1, 0.3);
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-color);
}

/* ROI cell styling */
.results-table:not(.cumulative-table) thead th:first-child {
    background: var(--accent-color);
    color: white;
    text-align: center;
}

/* Header cells center alignment */
.results-table:not(.cumulative-table) thead th:not(:first-child) {
    text-align: center;
}

/* ROI value styling */
#result-roi {
    color: white;
    font-size: 18px;
    font-weight: 800;
}

/* Value cells with number formatting */
.value-cell {
    font-family: 'Inter', monospace;
    font-size: 16px;
}

/* Table body rows */
.results-table tbody tr {
    background: #313B4B;
}

/* Cumulative Savings Table */
.cumulative-table {
    margin-top: 20px;
    table-layout: fixed;
}

.cumulative-table th {
    text-align: center;
    width: 33.33%;
}

.cumulative-table td {
    text-align: center !important;
}

/* Results CTA Button */
.results-cta {
    margin-top: 80px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .simulator-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sliders-section,
    .results-section {
        padding: 30px 20px;
    }

    .results-table th,
    .results-table td {
        padding: 12px 8px;
        font-size: 14px;
    }

    .roi-cell {
        font-size: 16px;
    }

    .cumulative-table td {
        font-size: 16px;
    }
}

/* Mobile Portrait Orientation */
@media (max-width: 768px) and (orientation: portrait) {
    .mobile-orientation-message {
        display: block;
    }

    .simulator-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Mobile Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-orientation-message {
        display: none;
    }

    .simulator-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .sliders-section,
    .results-section {
        padding: 20px;
    }

    .slider-group {
        margin-bottom: 20px;
    }

    .results-table th,
    .results-table td {
        padding: 10px 6px;
        font-size: 12px;
    }
}

/* Smartphone landscape only - optimized for immersive experience without header */
@media (max-width: 896px) and (max-height: 500px) and (orientation: landscape) {
    .roi-simulator {
        padding: 15px 0 20px 0;
    }

    .roi-simulator .section-header {
        margin-bottom: 15px;
    }

    .roi-simulator .section-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .roi-simulator .section-subtitle {
        font-size: 14px;
    }

    .simulator-content {
        gap: 15px;
        margin-top: 15px;
    }

    .sliders-section,
    .results-section {
        padding: 15px;
    }

    .sliders-subsection {
        margin-bottom: 15px;
        padding: 12px;
    }

    .sliders-subsection h3 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .slider-group {
        margin-bottom: 12px;
    }

    .slider-label {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .slider-value {
        font-size: 14px;
    }

    .results-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .results-table {
        margin-bottom: 15px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 4px;
        font-size: 11px;
    }

    .results-cta {
        margin-top: 20px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .simulator-content {
        gap: 40px;
    }

    .sliders-section,
    .results-section {
        padding: 30px;
    }
}
