/**
 * ROI Consultant Modal Styles
 * Dark-themed tabbed modal for ROI calculators
 */

/* ===== BOX SIZING RESET ===== */

#roi-consultant-modal,
#roi-consultant-modal *,
#roi-consultant-modal *::before,
#roi-consultant-modal *::after {
    box-sizing: border-box;
}

/* ===== MODAL OVERLAY ===== */

#roi-consultant-modal.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

#roi-consultant-modal.modal.show {
    display: flex;
    animation: roiModalFadeIn 0.25s ease-out;
}

@keyframes roiModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes roiModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== MODAL CONTENT ===== */

.roi-modal-content {
    width: 95vw;
    max-width: 1400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1a1a2e 0%, #141422 100%);
    border: 1px solid rgba(79, 116, 229, 0.3);
    border-radius: 16px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 60px rgba(79, 116, 229, 0.15);
    overflow: hidden;
    animation: roiModalSlideIn 0.3s ease-out;
}

/* ===== MODAL HEADER ===== */

#roi-consultant-modal .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(15, 15, 26, 0.95) 0%, rgba(15, 15, 26, 0.8) 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#roi-consultant-modal .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
}

#roi-consultant-modal .modal-header h3 i {
    margin-right: 0.5rem;
    color: #4f74e5;
}

#roi-consultant-modal .modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #a8b3cf;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#roi-consultant-modal .modal-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* ===== TABS ===== */

.roi-tabs {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.roi-tab {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: #a8b3cf;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.roi-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.roi-tab.active {
    background: rgba(79, 116, 229, 0.1);
    color: #4f74e5;
    border-bottom-color: #4f74e5;
}

.roi-tab i {
    font-size: 1rem;
}

/* ===== MODAL BODY ===== */

.roi-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.roi-tab-content {
    display: none;
}

.roi-tab-content.active {
    display: block;
    animation: roiFadeIn 0.2s ease;
}

@keyframes roiFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== HEADER BANNER ===== */

.roi-header-banner {
    background: linear-gradient(135deg, #1a274c 0%, #2a3a6e 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 116, 229, 0.2);
    position: relative;
    overflow: hidden;
}

.roi-header-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 116, 229, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.roi-header-banner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.25rem 0;
    position: relative;
    z-index: 1;
}

.roi-header-subtitle {
    color: #a8b3cf;
    font-size: 0.9rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Stats Banner */
.roi-stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
    position: relative;
    z-index: 1;
}

.roi-stat-banner-item {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-stat-banner-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.25rem;
}

.roi-stat-banner-label {
    font-size: 0.8rem;
    color: #a8b3cf;
    font-weight: 500;
}

/* ===== MAIN GRID (Input + Results) ===== */

.roi-main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ===== PANEL ===== */

.roi-panel {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-panel-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roi-panel-title i {
    color: #4f74e5;
}

/* ===== INPUT SLIDERS ===== */

.roi-input-group {
    margin-bottom: 1.5rem;
}

.roi-input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.825rem;
    font-weight: 500;
    color: #a8b3cf;
}

.roi-input-value {
    font-family: 'Poppins', sans-serif;
    color: #4f74e5;
    font-weight: 700;
    font-size: 0.9rem;
}

#roi-consultant-modal input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

#roi-consultant-modal input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f74e5;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 116, 229, 0.4);
    transition: all 0.2s;
}

#roi-consultant-modal input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(79, 116, 229, 0.6);
}

#roi-consultant-modal input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f74e5;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(79, 116, 229, 0.4);
}

/* ===== METRICS GRID ===== */

.roi-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.roi-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s;
}

.roi-metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 116, 229, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.roi-metric-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7891;
    margin-bottom: 0.4rem;
}

.roi-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #4f74e5;
}

.roi-metric-change {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    color: #4bc0ba;
    font-weight: 600;
}

/* ===== CHART CONTAINER ===== */

.roi-chart-container {
    position: relative;
    height: 300px;
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== MECHANISM / FLOW SECTION ===== */

.roi-mechanism-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-mechanism-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

.roi-mechanism-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.roi-flow-step {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    position: relative;
}

.roi-flow-step::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #4f74e5;
    z-index: 1;
}

.roi-flow-step:last-child::after {
    content: '';
}

.roi-flow-number {
    width: 28px;
    height: 28px;
    background: #4f74e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
}

.roi-flow-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.35rem;
}

.roi-flow-description {
    font-size: 0.8rem;
    color: #6b7891;
    line-height: 1.5;
}

/* ===== COMPARISON GRID ===== */

.roi-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.roi-scenario-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
}

.roi-scenario-card.elenium {
    border-color: rgba(79, 116, 229, 0.3);
    background: rgba(79, 116, 229, 0.04);
}

.roi-scenario-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.roi-scenario-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.roi-scenario-badge.baseline {
    background: rgba(255, 255, 255, 0.08);
    color: #a8b3cf;
}

.roi-scenario-badge.elenium {
    background: #4f74e5;
    color: white;
}

.roi-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.roi-stat-row:last-child {
    border-bottom: none;
}

.roi-stat-row .stat-label {
    color: #6b7891;
    font-size: 0.85rem;
    font-weight: 500;
}

.roi-stat-row .stat-value-inline {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

/* ===== IMPACT HERO ===== */

.roi-impact-hero {
    background: linear-gradient(135deg, #1a274c 0%, #2a3a6e 50%, #1a274c 100%);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    color: white;
    border: 1px solid rgba(79, 116, 229, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.roi-impact-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a8b3cf;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.roi-impact-value {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
    line-height: 1;
    color: #fff;
}

.roi-impact-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4bc0ba;
    margin-top: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.roi-impact-note {
    font-size: 0.8rem;
    color: #6b7891;
    margin-top: 1rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.roi-benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.roi-benefit-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-benefit-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-family: 'Poppins', sans-serif;
    color: #fff;
}

.roi-benefit-label {
    font-size: 0.8rem;
    color: #a8b3cf;
}

/* ===== REFERENCES SECTION ===== */

.roi-references-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.roi-references-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

.roi-references-intro {
    font-size: 0.875rem;
    color: #6b7891;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.roi-references-intro strong {
    color: #a8b3cf;
}

.roi-reference-category {
    margin-bottom: 1.5rem;
}

.roi-reference-category h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #4f74e5;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roi-reference-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.roi-reference-item {
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.6rem;
    border-left: 3px solid #4f74e5;
    font-size: 0.825rem;
    line-height: 1.6;
    color: #a8b3cf;
}

.roi-reference-item strong {
    color: #fff;
    font-weight: 600;
}

.roi-reference-item em {
    color: #6b7891;
    font-style: italic;
}

.roi-reference-finding {
    color: #a8b3cf;
    margin-top: 0.25rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
}

.roi-reference-finding strong {
    color: #4bc0ba;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1200px) {
    .roi-main-grid {
        grid-template-columns: 1fr;
    }

    .roi-comparison-grid {
        grid-template-columns: 1fr;
    }

    .roi-mechanism-flow {
        grid-template-columns: repeat(2, 1fr);
    }

    .roi-flow-step::after {
        display: none;
    }

    .roi-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .roi-stats-banner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .roi-stats-banner {
        grid-template-columns: 1fr;
    }

    .roi-metrics-grid {
        grid-template-columns: 1fr;
    }

    .roi-mechanism-flow {
        grid-template-columns: 1fr;
    }

    .roi-benefits-grid {
        grid-template-columns: 1fr;
    }

    .roi-impact-value {
        font-size: 2.5rem;
    }

    .roi-modal-content {
        width: 98vw;
        max-height: 95vh;
    }
}

/* ===== SCROLLBAR STYLING ===== */

.roi-modal-body::-webkit-scrollbar {
    width: 8px;
}

.roi-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.roi-modal-body::-webkit-scrollbar-thumb {
    background: rgba(79, 116, 229, 0.3);
    border-radius: 4px;
}

.roi-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 116, 229, 0.5);
}
