/* =========================================================
   FREEVEXA - RISK / REWARD CALCULATOR
   Scoped CSS - Does not interfere with global Freevexa CSS
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

.rr-page {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 110px 20px 80px;
}


/* =========================================================
   HERO
   ========================================================= */

.rr-page .tool-hero {
    text-align: center;
    margin-bottom: 45px;
}

.rr-page .tool-pills {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.rr-page .tool-pills span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.60);
    color: #aebbd0;
    font-size: 13px;
    line-height: 1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.rr-page .tool-hero h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.rr-page .tool-hero p {
    max-width: 720px;
    margin: 16px auto 0;
    color: #9aa9bd;
    font-size: 16px;
    line-height: 1.7;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.rr-page .rr-card {
    width: 100%;
    margin-bottom: 28px;
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at top left,
            rgba(0, 240, 255, 0.045),
            transparent 38%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(112, 0, 255, 0.055),
            transparent 40%
        ),
        rgba(15, 23, 42, 0.72);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

.rr-page .section-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.rr-page .step-number {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(0, 240, 255, 0.28);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(0, 240, 255, 0.12),
            rgba(112, 0, 255, 0.12)
        );

    color: #00f0ff;
    font-size: 14px;
    font-weight: 800;
}

.rr-page .section-title h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 750;
}

.rr-page .section-title p {
    margin: 5px 0 0;
    color: #8fa0b7;
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   ERROR
   ========================================================= */

.rr-page .rr-error {
    display: none;

    margin-bottom: 22px;
    padding: 13px 16px;

    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;

    background: rgba(239, 68, 68, 0.08);

    color: #fca5a5;
    font-size: 14px;
    line-height: 1.5;
}

.rr-page .rr-error.show {
    display: block;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.rr-page .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 22px;
}


/* =========================================================
   FORM GROUP
   ========================================================= */

.rr-page .form-group {
    min-width: 0;
}

.rr-page .form-group label {
    display: block;
    margin-bottom: 9px;

    color: #dce5f1;
    font-size: 14px;
    font-weight: 650;
}

.rr-page .form-group label span {
    color: #71829a;
    font-weight: 500;
}


/* =========================================================
   INPUTS / SELECT
   ========================================================= */

.rr-page .form-group input,
.rr-page .form-group select {
    width: 100%;
    height: 52px;

    box-sizing: border-box;

    padding: 0 15px;

    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;

    outline: none;

    background: rgba(2, 8, 23, 0.76);

    color: #edf4ff;

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.rr-page .form-group input::placeholder {
    color: #52627a;
}

.rr-page .form-group input:hover,
.rr-page .form-group select:hover {
    border-color: rgba(148, 163, 184, 0.30);
}

.rr-page .form-group input:focus,
.rr-page .form-group select:focus {
    border-color: rgba(0, 240, 255, 0.55);

    background: rgba(3, 10, 28, 0.92);

    box-shadow:
        0 0 0 3px rgba(0, 240, 255, 0.07),
        0 0 25px rgba(0, 240, 255, 0.06);
}

.rr-page .form-group select {
    cursor: pointer;
}


/* =========================================================
   SMALL HELP TEXT
   ========================================================= */

.rr-page .form-group small {
    display: block;
    margin-top: 7px;

    color: #697a92;
    font-size: 12px;
    line-height: 1.4;
}


/* =========================================================
   BUY / SELL
   ========================================================= */

.rr-page .direction-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rr-page .direction-option {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;

    margin: 0;
    padding: 0 12px;

    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 12px;

    background: rgba(2, 8, 23, 0.70);

    color: #9aa9bd;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.rr-page .direction-option:hover {
    border-color: rgba(148, 163, 184, 0.32);
    transform: translateY(-1px);
}

.rr-page .direction-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rr-page .direction-option span {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
}

.rr-page .direction-option.buy-option:has(input:checked) {
    border-color: rgba(34, 197, 94, 0.60);
    background: rgba(34, 197, 94, 0.07);
    color: #4ade80;
    box-shadow: inset 0 0 20px rgba(34, 197, 94, 0.025);
}

.rr-page .direction-option.sell-option:has(input:checked) {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(239, 68, 68, 0.07);
    color: #f87171;
}


/* =========================================================
   CALCULATE BUTTON
   ========================================================= */

.rr-page .calculate-btn {
    width: 100%;
    height: 56px;

    margin-top: 30px;

    border: 0;
    border-radius: 13px;

    background:
        linear-gradient(
            100deg,
            #08d5e8 0%,
            #258eea 45%,
            #7410ff 100%
        );

    color: #ffffff;

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(37, 142, 234, 0.16),
        0 8px 28px rgba(116, 16, 255, 0.13);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.rr-page .calculate-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 38px rgba(37, 142, 234, 0.22),
        0 12px 34px rgba(116, 16, 255, 0.20);

    filter: brightness(1.04);
}

.rr-page .calculate-btn:active {
    transform: translateY(0);
}


/* =========================================================
   RESULT VISIBILITY
   ========================================================= */

.rr-page .result-card.hidden {
    display: none !important;
}


/* =========================================================
   MAIN RESULT
   ========================================================= */

.rr-page .rr-main-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 185px;

    padding: 30px 20px;

    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at center,
            rgba(112, 0, 255, 0.055),
            transparent 60%
        ),
        rgba(2, 8, 23, 0.48);

    text-align: center;
}

.rr-page .rr-main-result > span {
    color: #8798ae;
    font-size: 14px;
}

.rr-page .rr-main-result > strong {
    margin-top: 12px;

    color: #f8fafc;

    font-size: clamp(42px, 7vw, 62px);
    line-height: 1;
    font-weight: 850;
    letter-spacing: -2px;
}

.rr-page #rrStatus {
    margin-top: 14px;

    color: #4ade80;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   RESULT GRID
   ========================================================= */

.rr-page .result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;

    margin-top: 22px;
}


/* =========================================================
   RESULT BOX
   ========================================================= */

.rr-page .result-box {
    min-width: 0;
    min-height: 88px;

    padding: 17px;

    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 14px;

    background: rgba(2, 8, 23, 0.46);
}

.rr-page .result-box.wide {
    grid-column: span 1;
}

.rr-page .result-box span {
    display: block;

    margin-bottom: 9px;

    color: #71829a;

    font-size: 12px;
    line-height: 1.4;
}

.rr-page .result-box strong {
    display: block;

    overflow-wrap: anywhere;

    color: #e8eef8;

    font-size: 16px;
    line-height: 1.3;
    font-weight: 750;
}


/* =========================================================
   NOTE
   ========================================================= */

.rr-page .rr-note {
    margin-top: 20px;
    padding: 14px 16px;

    border: 1px solid rgba(0, 240, 255, 0.18);
    border-radius: 13px;

    background: rgba(0, 240, 255, 0.035);

    color: #72859d;

    font-size: 12px;
    line-height: 1.65;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .rr-page {
        padding-top: 100px;
    }

    .rr-page .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-page .result-box.wide {
        grid-column: span 1;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 680px) {

    .rr-page {
        padding: 90px 14px 55px;
    }

    .rr-page .tool-hero {
        margin-bottom: 30px;
    }

    .rr-page .tool-pills {
        gap: 7px;
    }

    .rr-page .tool-pills span {
        padding: 7px 10px;
        font-size: 11px;
    }

    .rr-page .tool-hero h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .rr-page .tool-hero p {
        font-size: 14px;
    }

    .rr-page .rr-card {
        padding: 22px 17px;
        border-radius: 19px;
    }

    .rr-page .section-title {
        gap: 12px;
        margin-bottom: 24px;
    }

    .rr-page .step-number {
        flex-basis: 43px;
        width: 43px;
        height: 43px;
        border-radius: 12px;
    }

    .rr-page .section-title h2 {
        font-size: 21px;
    }

    .rr-page .section-title p {
        font-size: 12px;
    }

    .rr-page .form-grid {
        grid-template-columns: 1fr;
        gap: 19px;
    }

    .rr-page .direction-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr-page .calculate-btn {
        margin-top: 24px;
        height: 54px;
    }

    .rr-page .rr-main-result {
        min-height: 160px;
    }

    .rr-page .rr-main-result > strong {
        font-size: 46px;
    }

    .rr-page .result-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .rr-page .result-box {
        min-height: 82px;
        padding: 14px;
    }

    .rr-page .result-box strong {
        font-size: 14px;
    }

    .rr-page .result-box.wide {
        grid-column: span 2;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .rr-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .rr-page .rr-card {
        padding: 19px 13px;
    }

    .rr-page .result-grid {
        grid-template-columns: 1fr;
    }

    .rr-page .result-box.wide {
        grid-column: span 1;
    }

    .rr-page .rr-main-result > strong {
        font-size: 40px;
    }
}