/* =========================
   Modern Calculator Styles - Fully Responsive
========================= */
.calculator-wrapper {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    font-family: 'Roboto', sans-serif;
}

.calculator-wrapper h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--rich-black-color);
    font-size: 28px;
}

.calculator-section {
    margin-bottom: 25px;
    border-radius: 12px;
    padding: 20px 25px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.calculator-section.expanded {
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-charcoal-color);
}

.section-content {
    display: none;
    margin-top: 10px;
}

.calculator-section.expanded .section-content {
    display: block;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.input-group label {
    flex: 1 0 160px;
    font-weight: 500;
    color: var(--dark-charcoal-color);
}

.input-group input {
    flex: 1 0 180px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--gainsboro-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--blue-color);
    outline: none;
    box-shadow: 0 0 6px rgba(0, 0, 255, 0.2);
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning {
    min-width: 140px;
    margin-right: 10px;
    margin-top: 10px;
    font-weight: 500;
    border-radius: 8px;
}

.results-wrapper {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 25px 20px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.results-wrapper h3 {
    margin-bottom: 15px;
    color: var(--dark-charcoal-color);
    font-size: 22px;
}

.results-wrapper p {
    font-size: 16px;
    margin-bottom: 8px;
}

/* Make table fully responsive */
.results-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 15px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.results-wrapper th,
.results-wrapper td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.results-wrapper th {
    background: #e9ecef;
    font-weight: 600;
}

.results-wrapper td.yes {
    background-color: #d4edda;
    color: #155724;
    font-weight: 600;
}

.results-wrapper td.no {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

.toggle-btn {
    background: var(--vista-blue-color);
    color: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #6366f1;
}

/* =========================
   Responsive Fixes
========================= */
@media screen and (max-width: 992px) {
    .input-group label {
        flex: 1 0 140px;
    }

    .input-group input {
        flex: 1 0 150px;
    }
}

@media screen and (max-width: 768px) {
    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-group label,
    .input-group input {
        flex: 1 0 100%;
        width: 100%;
    }

    .calculator-wrapper {
        padding: 25px 20px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-success,
    .btn-warning {
        width: 100%;
        margin-right: 0;
    }
}

@media screen and (max-width: 480px) {
    .calculator-wrapper {
        padding: 20px 15px;
    }

    .calculator-wrapper h2 {
        font-size: 24px;
    }

    .results-wrapper h3 {
        font-size: 20px;
    }

    .input-group label {
        font-size: 14px;
    }

    .input-group input {
        font-size: 14px;
    }
}

@media screen and (max-width: 380px) {

    /* Small screens: allow table scroll horizontally */
    .results-wrapper table {
        font-size: 13px;
    }
}
