/**
 * 2Pro Financing Simulator - Frontend Styles
 *
 * Specific selectors to avoid conflicts with Avada theme
 * All selectors prefixed with .twopro-
 *
 * @package TwoPro_Simulator
 * @version 2.1.0
 */

/* ============================================================
   HEADER (title area, no card)
   ============================================================ */
.twopro-simulator-header {
    max-width: 960px;
    margin: 2rem auto 0;
    text-align: center;
}

/* ============================================================
   MAIN WRAPPER (card style with blue left border)
   ============================================================ */
.twopro-simulator-wrapper {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 2rem;
    background: #ffffff;
    /* border-radius: 8px; */
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--awb-color5, #1a2332); */
    border-width: 1px;
    border-color: #001fb5;
    border-style: solid;
    border-radius: 20px 0px 20px 0px;
    box-shadow: none;
    padding: 20px 20px 20px 20px;
}

/* ============================================================
   PROPOSAL CARD (two-column: table left, notes right)
   ============================================================ */
.twopro-proposal-card > .twopro-section-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.twopro-proposal-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.twopro-proposal-table-col {
    flex: 1;
    min-width: 0;
}

.twopro-proposal-notes-col {
    flex: 1;
    min-width: 0;
}

/* ============================================================
   CALCULATOR CARD (centered, narrower)
   ============================================================ */
.twopro-calculator-card {
    max-width: 700px;
    min-width: 400px;
}

.twopro-calculator-card > .twopro-section-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* ============================================================
   RESULTS WRAPPER (separate section below calculator)
   ============================================================ */
.twopro-results-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
}

/* ============================================================
   TITLE AND SUBTITLE
   ============================================================ */
.twopro-simulator-header .twopro-title,
.twopro-simulator-wrapper .twopro-title {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--awb-color5, #1a2332);
    text-align: center;
}

.twopro-simulator-header .twopro-subtitle,
.twopro-simulator-wrapper .twopro-subtitle {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    font-style: italic;
}

/* ============================================================
   FORM STYLES
   ============================================================ */
.twopro-simulator-form {
    margin-bottom: 0;
}

.twopro-simulator-form .twopro-field {
    margin-bottom: 1.5rem;
}

.twopro-simulator-form .twopro-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--awb-color5, #333);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.twopro-simulator-form .twopro-field label .twopro-field-currency {
    font-size: 0.9rem;
    text-transform: none;
    color: #888;
}

/* Input styling - works for both type=number and type=text */
.twopro-simulator-wrapper input[type="number"],
.twopro-simulator-wrapper input[type="text"],
.twopro-simulator-form .twopro-field input[type="number"],
.twopro-simulator-form .twopro-field input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border-width: 0;
    border-bottom: 1px solid
        var(--awb-form-border-color, var(--awb-color8, #ddd));
    border-radius: 0;
    font-size: 1.2rem;
    background-color: var(
        --awb-form-bg-color,
        var(--awb-color4, #ffffff)
    ) !important;
    color: var(--awb-form-text-color, var(--awb-color8, #333333)) !important;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    transition: border-color 0.3s ease;
}

.twopro-simulator-wrapper input[type="number"]:focus,
.twopro-simulator-wrapper input[type="text"]:focus,
.twopro-simulator-form .twopro-field input[type="number"]:focus,
.twopro-simulator-form .twopro-field input[type="text"]:focus {
    outline: none;
    border-bottom-color: var(
        --awb-form-focus-border-color,
        var(--awb-color1, #4caf50)
    );
    box-shadow: none;
    background-color: var(
        --awb-form-bg-color,
        var(--awb-color4, #ffffff)
    ) !important;
    color: var(--awb-form-text-color, var(--awb-color8, #333333)) !important;
}

/* Remove number spinners */
.twopro-simulator-wrapper input[type="number"]::-webkit-inner-spin-button,
.twopro-simulator-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Validation Message */
.twopro-simulator-wrapper .twopro-validation-message {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
}

.twopro-simulator-wrapper .twopro-validation-message strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* Calculate Button */
.twopro-simulator-form #twopro-calculate {
    width: auto;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.twopro-simulator-form #twopro-calculate:not(.fusion-button) {
    background: var(--awb-color1, #4caf50);
    color: white;
    border-radius: 0;
}

.twopro-simulator-form #twopro-calculate:not(.fusion-button):hover {
    background: var(--awb-color1, #45a049);
    opacity: 0.9;
}

.twopro-simulator-form .twopro-button-wrapper {
    text-align: right;
    margin-top: 1.5rem;
}

/* ============================================================
   SECTION COMMON STYLES
   ============================================================ */
.twopro-simulator-wrapper .twopro-section,
.twopro-results-wrapper .twopro-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
}

.twopro-simulator-wrapper .twopro-section-title,
.twopro-results-wrapper .twopro-section-title {
    margin: 0 0 1.25rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--awb-color5, #1a2332);
}

/* ============================================================
   SECTION 1: FINANCING PROPOSAL (always visible)
   ============================================================ */
.twopro-proposal-table-col .twopro-proposal-table {
    margin-bottom: 0;
}

.twopro-proposal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.twopro-proposal-table th,
.twopro-proposal-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.twopro-proposal-table thead th {
    background: var(--awb-color5, #1a2332);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.twopro-proposal-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.twopro-proposal-table tbody td {
    font-size: 18px;
    color: #000;
}

.twopro-proposal-table tbody td small {
    display: block;
    color: #333;
    font-size: 0.9rem;
}

.twopro-proposal-notes {
    padding: 1.25rem 1.5rem;
    background: #edf2f8;
    border-radius: 8px;
    font-size: 18px;
    color: #333;
    border: 1px solid #dbe5ef;
}

.twopro-proposal-notes p {
    margin: 0 0 0.5rem 0;
}

.twopro-proposal-notes ul {
    margin: 0;
    padding-left: 1.5rem;
}

.twopro-proposal-notes li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
    color: #000;
}

.twopro-proposal-other-fees {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #fff8e1;
    border: 1px solid #f5a623;
    border-radius: 8px;
    font-size: 18px;
    color: #5d4e37;
}

.twopro-proposal-other-fees p {
    margin: 0;
    font-size: 16px;
    color: #000;
}

/* ============================================================
   SECTION 2: SCENARIO COMPARISON
   ============================================================ */
.twopro-results-wrapper .twopro-comparison {
    background: #f0f4f8;
    border: 1px solid #d6dfe8;
}

.twopro-scenarios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.twopro-scenario-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.twopro-scenario-header {
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.twopro-bank-header {
    background: #3a5a8c;
}

.twopro-kit-header {
    background: var(--awb-color5, #1a2332);
}

.twopro-cash-header {
    background: #2e7d32;
}

.twopro-scenario-details {
    list-style: none;
    margin: 0;
    padding: 1rem;
}

.twopro-scenario-details li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    font-size: 18px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

.twopro-scenario-details li:last-child {
    border-bottom: none;
}

.twopro-detail-label {
    color: #000;
    flex-shrink: 0;
    margin-right: 0.5rem;
    font-size: 18px;
}

.twopro-scenario-details li strong {
    color: #1a2332;
    font-size: 18px;
}

.twopro-scenario-details li.twopro-detail-stacked {
    flex-wrap: wrap;
}

.twopro-detail-sub {
    width: 100%;
    color: #666;
}

.twopro-detail-total {
    margin-top: 0.5rem;
    padding-top: 0.75rem !important;
    border-top: 2px solid #e0e0e0 !important;
    border-bottom: none !important;
}

.twopro-detail-total .twopro-detail-label {
    font-weight: 600;
    color: #333;
}

.twopro-detail-total strong {
    font-size: 1.2rem;
}

.twopro-positive {
    color: #2e7d32 !important;
}

.twopro-scenario-details li small {
    font-size: 0.8rem;
    color: #888;
    margin-left: 0.25rem;
}

.twopro-scenario-note {
    padding: 0.75rem 1rem;
    background: #fff8e1;
    font-size: 0.9rem;
    color: #000;
    border-top: 1px solid #ffeeba;
    font-style: italic;
}

/* ============================================================
   SECTION 3: SELIC BENEFIT
   ============================================================ */
.twopro-results-wrapper .twopro-selic-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.twopro-selic-intro {
    font-size: 18px;
    color: #000;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.twopro-selic-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.twopro-selic-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.twopro-selic-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--awb-color5, #1a2332);
}

.twopro-selic-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.twopro-selic-card small {
    font-size: 16px;
    color: #272626;
    line-height: 1.4;
}

.twopro-selic-highlight {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.twopro-surplus-value {
    font-size: 2rem;
}

.twopro-surplus-positive {
    color: #2e7d32 !important;
}

.twopro-surplus-negative {
    color: #c62828 !important;
}

/* Conclusion */
.twopro-conclusion {
    padding: 1.5rem;
    border-radius: 6px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.twopro-conclusion-positive {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}

.twopro-conclusion-negative {
    background: #fff3e0;
    border: 1px solid #ffcc02;
    color: #e65100;
}

.twopro-conclusion strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
}

/* ============================================================
   INFO / DISCLAIMER SECTION
   ============================================================ */
.twopro-results-wrapper .twopro-info-section {
    padding: 1.25rem;
    background: #fafafa;
    border-left: 4px solid var(--awb-color1, #4caf50);
    margin-top: 2rem;
    margin-bottom: 0;
    border-radius: 4px;
}

.twopro-results-wrapper .twopro-info-section .twopro-disclaimer {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.twopro-proposal-notes p {
    margin-bottom: 6px !important;
}

.twopro-proposal-other-fees p {
    margin-bottom: 0px !important;
    font-size: 18px;
}

/* ============================================================
   RESULTS ANIMATION (staggered fade + slide up)
   ============================================================ */
@keyframes twoproFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.twopro-animate-in {
    animation: twoproFadeSlideUp 0.5s ease-out forwards;
    opacity: 0;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media screen and (max-width: 960px) {
    .twopro-simulator-header,
    .twopro-simulator-wrapper,
    .twopro-results-wrapper {
        max-width: 100%;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media screen and (max-width: 768px) {
    .twopro-proposal-table-col {
        width: 100%;
    }

    .twopro-proposal-content {
        flex-direction: column;
    }

    .twopro-calculator-card {
        max-width: 100%;
    }

    .twopro-simulator-wrapper {
        padding: 1.5rem;
    }

    .twopro-simulator-header .twopro-title,
    .twopro-simulator-wrapper .twopro-title {
        font-size: 1.5rem;
    }

    .twopro-scenarios {
        grid-template-columns: 1fr;
    }

    .twopro-selic-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .twopro-selic-value {
        font-size: 1.5rem;
    }

    .twopro-surplus-value {
        font-size: 1.75rem;
    }

    .twopro-scenario-details li {
        flex-direction: column;
        gap: 0.15rem;
    }

    .twopro-detail-label {
        margin-right: 0;
    }

    .twopro-results-wrapper .twopro-section-title {
        font-size: 1.35rem;
    }
}

@media screen and (max-width: 480px) {
    .twopro-simulator-wrapper {
        padding: 1rem;
    }

    .twopro-simulator-wrapper .twopro-title {
        font-size: 1.25rem;
    }

    .twopro-results-wrapper .twopro-section-title {
        font-size: 1.15rem;
    }

    .twopro-selic-cards {
        grid-template-columns: 1fr 1fr;
    }

    .twopro-selic-value {
        font-size: 1.25rem;
    }

    .twopro-surplus-value {
        font-size: 1.5rem;
    }

    .twopro-simulator-form #twopro-calculate {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .twopro-proposal-table th,
    .twopro-proposal-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}
