@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ============================================================
   ABPI Congress 2026 Calculator — Frontend Styles
   All selectors scoped under .abpi-calc-wrapper
   ============================================================ */

.abpi-calc-wrapper {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1B7B7E;
    line-height: 1.5;
    box-sizing: border-box;
    width: 100%;
}

.abpi-calc-wrapper *,
.abpi-calc-wrapper *::before,
.abpi-calc-wrapper *::after {
    box-sizing: border-box;
}

/* Layout: left ~65%, right ~35% */
.abpi-calc-layout {
    display: flex;
    gap: 24px;
    align-items: stretch;
    width: 100%;
}

.abpi-calc-left {
    flex: 1 1 65%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.abpi-calc-sidebar {
    flex: 0 0 35%;
    min-width: 0;
    position: sticky;
    top: 2rem;
    align-self: stretch;
}

/* Cards */
.abpi-calc-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.abpi-calc-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1B7B7E;
    margin: 0 0 16px;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Options container */
.abpi-calc-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================================
   Custom Radio Buttons (circle)
   ============================================================ */
.abpi-calc-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
}

.abpi-calc-radio:hover {
    border-color: #1B7B7E;
    background-color: rgba(27, 123, 126, 0.03);
}

.abpi-calc-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.abpi-calc-radio__custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.abpi-calc-radio__custom::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1B7B7E;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.abpi-calc-radio input[type="radio"]:checked ~ .abpi-calc-radio__custom {
    border-color: #1B7B7E;
}

.abpi-calc-radio input[type="radio"]:checked ~ .abpi-calc-radio__custom::after {
    transform: scale(1);
}

.abpi-calc-radio input[type="radio"]:checked ~ .abpi-calc-radio__label {
    font-weight: 600;
    color: #1B7B7E;
}

.abpi-calc-radio__label {
    font-size: 0.9rem;
    color: #1B7B7E;
    transition: color 0.2s ease, font-weight 0.2s ease;
    flex: 1;
}

/* "Melhor oferta" badge */
.abpi-calc-badge {
    display: inline-block;
    background: #F5C518;
    color: #333;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Selected radio row */
.abpi-calc-radio:has(input[type="radio"]:checked) {
    border-color: #1B7B7E;
    background-color: rgba(27, 123, 126, 0.05);
}

/* ============================================================
   Custom Checkboxes (square — used for profile + extras)
   Left panel: teal border + teal checkmark on white bg
   ============================================================ */
.abpi-calc-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
}

.abpi-calc-check:hover {
    border-color: #1B7B7E;
    background-color: rgba(27, 123, 126, 0.03);
}

.abpi-calc-check input[type="radio"],
.abpi-calc-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.abpi-calc-check__custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    margin-top: 1px;
    background: #fff;
}

.abpi-calc-check__custom::after {
    content: '';
    width: 6px;
    height: 12px;
    border: solid #1B7B7E;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
    margin-top: -2px;
}

/* Checked state: white bg, teal border, teal checkmark */
.abpi-calc-check input:checked ~ .abpi-calc-check__custom {
    background-color: #fff;
    border-color: #1B7B7E;
}

.abpi-calc-check input:checked ~ .abpi-calc-check__custom::after {
    transform: rotate(45deg) scale(1);
}

.abpi-calc-check input:checked ~ .abpi-calc-check__label {
    font-weight: 600;
    color: #1B7B7E;
}

.abpi-calc-check__label {
    font-size: 0.9rem;
    color: #1B7B7E;
    transition: color 0.2s ease, font-weight 0.2s ease;
    flex: 1;
}

/* Selected check row */
.abpi-calc-check:has(input:checked) {
    border-color: #1B7B7E;
    background-color: rgba(27, 123, 126, 0.05);
}

/* ============================================================
   Profile Grid (2x2)
   ============================================================ */
.abpi-calc-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================================
   Summary Sidebar — full height, teal tones
   ============================================================ */
.abpi-calc-summary {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #1B7B7E;
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.abpi-calc-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #1B7B7E, rgba(27, 123, 126, 0.3));
    border-radius: 8px 8px 0 0;
}

.abpi-calc-summary__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B7B7E;
    margin: 0 0 20px;
    padding: 0;
}

.abpi-calc-summary__experience {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.abpi-calc-summary__check {
    color: #1B7B7E;
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.abpi-calc-summary__text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1B7B7E;
}

/* Extras in summary */
.abpi-calc-summary__extras {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.abpi-calc-summary__extras-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1B7B7E;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
    opacity: 0.7;
}

.abpi-calc-summary__extra-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #1B7B7E;
    margin-bottom: 4px;
}

.abpi-calc-summary__extra-item .abpi-calc-summary__check {
    font-size: 1rem;
}

/* Savings — full-width strip, no border-radius */
.abpi-calc-summary__savings {
    background: #FFF3CD;
    border-radius: 0;
    padding: 12px 24px;
    margin: 0 -24px 16px -24px;
    font-size: 0.85rem;
    color: #1B7B7E;
    line-height: 1.4;
}

.abpi-calc-summary__savings strong {
    color: #1B7B7E;
}

/* ============================================================
   Summary Footer — gradient teal → coral block
   ============================================================ */
.abpi-calc-summary__footer {
    margin-top: auto;
    background: linear-gradient(135deg, #1B7B7E 0%, #E8642C 100%);
    border-radius: 0 0 7px 7px;
    margin: auto -24px -24px -24px;
    padding: 20px 24px;
}

/* Total — left aligned, white text on gradient */
.abpi-calc-summary__total {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 16px;
}

.abpi-calc-summary__total-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.abpi-calc-summary__total-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

/* CTA Button — dark overlay on gradient */
.abpi-calc-cta {
    display: block;
    width: 100%;
    background: rgba(0, 0, 0, 0.30);
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 16px;
    border-radius: 6px;
    line-height: 1.5;
    transition: background 0.2s ease, transform 0.2s ease;
}

.abpi-calc-cta:hover {
    background: rgba(0, 0, 0, 0.45);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.abpi-calc-cta:active {
    transform: translateY(0);
}

.abpi-calc-cta:visited {
    color: #fff !important;
    text-decoration: none !important;
}

/* Hidden CTA when combination is unavailable */
.abpi-calc-cta--hidden {
    display: none !important;
}

/* ============================================================
   Footer Buttons — white text, no underline
   ============================================================ */
.abpi-calc-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.abpi-calc-footer__btn {
    flex: 1;
    display: inline-block;
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 14px 24px;
    border-radius: 6px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1.3;
}

.abpi-calc-footer__btn:hover {
    opacity: 0.9;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.abpi-calc-footer__btn:active {
    transform: translateY(0);
}

.abpi-calc-footer__btn:visited {
    color: #fff !important;
    text-decoration: none !important;
}

.abpi-calc-footer__btn:focus {
    color: #fff !important;
    text-decoration: none !important;
    outline: 2px solid rgba(27, 123, 126, 0.5);
    outline-offset: 2px;
}

/* ============================================================
   Unavailable state (e.g. estudantes + innovation_hub)
   ============================================================ */
.abpi-calc-unavailable {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px;
    font-size: 0.85rem;
    color: #721c24;
    text-align: center;
    margin-bottom: 16px;
}

/* ============================================================
   Responsive: below 768px
   ============================================================ */
@media (max-width: 768px) {
    .abpi-calc-layout {
        flex-direction: column;
    }

    .abpi-calc-left {
        flex: 1 1 100%;
    }

    .abpi-calc-sidebar {
        flex: 1 1 100%;
        position: static;
    }

    .abpi-calc-profile-grid {
        grid-template-columns: 1fr;
    }

    .abpi-calc-footer {
        flex-direction: column;
    }

    .abpi-calc-footer__btn {
        width: 100%;
    }

    .abpi-calc-summary__total-value {
        font-size: 1.6rem;
    }
}
