/**
 * Salary Indexation Calculator Styles
 * FGTB/ABVV - 2025
 */

/* Global Font */
body,
.container,
.calculator-form,
.result-section {
    font-family: 'Open Sans', sans-serif;
}

/* Page Header */
.page-header {
    margin-top: 15px;
    margin-bottom: 12px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #e74c3c;
}

.page-header h1 {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-header .lead {
    color: #666;
    font-size: 1.2em;
}

/* Calculator Form */
.calculator-form {
    max-width: 750px;
    margin: 15px auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mode Selection Toggle */
.mode-selection-container {
    max-width: 700px;
    margin: 15px auto 10px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.mode-selection-title {
    color: #333;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 0;
}

.mode-toggle-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

.mode-toggle-btn {
    flex: 1;
    max-width: 250px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #f8f9fa;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.mode-toggle-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.mode-toggle-btn.active {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.mode-toggle-btn.active:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

.mode-info-text {
    margin: 15px 0 0 0;
    padding: 12px 20px;
    background-color: #fdeaea;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    color: #721c24;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

/* Form Row - Three columns layout */
.calculator-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.calculator-form .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.calculator-form .form-row .form-group label {
    min-height: 40px;
    margin-bottom: 8px;
}

.calculator-form .form-row .form-group .input-group {
    margin-bottom: 5px;
}

.calculator-form .form-row .form-group .help-block {
    min-height: 36px;
}

.calculator-form .form-group {
    margin-bottom: 12px;
}

.calculator-form label {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.calculator-form .form-control {
    height: 45px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
    text-align: right;
}

.calculator-form .form-control:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

.calculator-form .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
}

.calculator-form .input-group .form-control {
    flex: 1 1 auto !important;
    width: auto !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding-right: 4px;
}

.calculator-form .input-group-addon {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #e74c3c;
    color: white;
    border: 2px solid #e74c3c;
    border-left: none;
    padding: 10px 15px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}


.calculator-form .help-block {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.calculator-form .alert-info {
    background-color: #e8f4f8;
    border-color: #bee5eb;
    color: #0c5460;
    margin-top: 15px;
}

.calculator-form .alert-info h4 {
    color: #0c5460;
    font-weight: bold;
    margin-bottom: 10px;
}

.calculator-form .alert-info ul {
    margin-bottom: 0;
}

.calculator-form .alert-info ul.scenario-list {
    list-style-type: none;
    padding-left: 0;
}

.calculator-form .alert-info ul.scenario-list li {
    margin-bottom: 8px;
    padding-left: 0;
}

/* Form Actions */
.form-actions {
    margin-top: 15px;
    text-align: center;
}

.form-actions .btn {
    min-width: 150px;
    margin: 0 10px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s;
}

.form-actions .btn-primary {
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.form-actions .btn-primary:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-actions .btn-default {
    background-color: #95a5a6;
    border-color: #95a5a6;
    color: white;
}

.form-actions .btn-default:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
    color: white;
}

/* Result Section */
.result-section {
    max-width: 1000px;
    margin: 15px auto;
    padding: 15px;
    background: #ffffff;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section h2 {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 2em;
}

.result-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 8px;
}

/* Result Summary Main */
.result-summary-main {
    margin-bottom: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.result-summary-main h3 {
    color: #e74c3c;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 8px;
}

/* 2015 Index Skip Loss Section */
.index-skip-section {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff8e1;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.index-skip-section .result-row {
    padding: 12px 0;
    border-bottom: 1px solid #ffe0b2;
}

.index-skip-section .result-row:last-child {
    border-bottom: none;
}

.index-skip-section .result-row.loss-2015 {
    background-color: #fff3e0;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.index-skip-section .loss-2015-note {
    margin: 10px 0 0 0;
    padding: 0;
    font-size: 12px;
    font-style: italic;
    color: #666;
}

/* Total Loss at Retirement Section */
.total-loss-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

.total-loss-section .result-row.total-loss-retirement {
    background-color: #e74c3c;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.total-loss-section .result-row.total-loss-retirement .result-label,
.total-loss-section .result-row.total-loss-retirement .result-value {
    color: white;
    font-weight: bold;
}

.total-loss-section .result-row.total-loss-retirement .result-value.total {
    font-size: 24px;
    color: white;
}

/* Cumulative Loss Section */
.cumulative-loss-section {
    margin-top: 15px;
    margin-bottom: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cumulative-loss-section h3 {
    color: #333;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

#cumulativeDifferenceChart {
    max-width: 100%;
    height: auto !important;
}

/* Result Details */
.result-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row.scenario1 {
    background-color: #d4edda;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.result-row.scenario2 {
    background-color: #fff3cd;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.result-row.loss {
    background-color: #f8d7da;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.result-row.cumulative-loss {
    background-color: #dc3545;
    padding: 15px 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.result-row.cumulative-loss .result-label,
.result-row.cumulative-loss .result-value {
    color: white;
    font-weight: bold;
}

.result-label {
    font-weight: 600;
    color: #495057;
    font-size: 15px;
}

.result-value {
    font-size: 18px;
    font-weight: bold;
    color: #212529;
}

.result-row.result-total {
    margin-top: 15px;
    padding-top: 20px;
    border-top: 3px solid #e74c3c;
}

.result-value.total {
    font-size: 24px;
    color: #c0392b;
}

/* Comparison Section */
.comparison-section {
    margin-top: 15px;
    margin-bottom: 10px;
}

.comparison-section h3 {
    text-align: center;
}

.comparison-section #comparisonTable {
    display: flex;
    justify-content: center;
}

.comparison-section table {
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-section .table {
    font-size: 14px;
}

.comparison-section .table thead {
    background-color: #e74c3c;
    color: white;
}

.comparison-section .table thead th {
    font-weight: bold;
    text-align: center;
    padding: 12px;
}

.comparison-section .table tbody td {
    text-align: center;
    padding: 10px;
}

.comparison-section .table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.comparison-section .table .text-danger {
    color: #c0392b !important;
}

/* Result Info */
.result-info {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.result-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #856404;
}

.result-info strong {
    color: #856404;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .calculator-form .form-row .form-group {
        margin-bottom: 12px;
    }

    .mode-selection-container {
        margin: 20px 15px;
        padding: 15px;
    }

    .mode-toggle-group {
        flex-direction: column;
        gap: 10px;
    }

    .mode-toggle-btn {
        max-width: 100%;
    }

    .calculator-form,
    .result-section {
        margin: 20px 15px;
        padding: 15px;
    }

    .form-actions .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-value {
        margin-top: 5px;
    }

    .page-header h1 {
        font-size: 1.5em;
    }

    .result-section h2 {
        font-size: 1.5em;
    }

    .comparison-section .table {
        font-size: 12px;
    }

    .comparison-section .table thead th,
    .comparison-section .table tbody td {
        padding: 8px 4px;
    }
}

/* Print Styles */
@media print {
    .calculator-form,
    .form-actions {
        display: none;
    }

    .result-section {
        box-shadow: none;
        border: 1px solid #000;
    }
}
