/* =========================================================
   GoldPriceBD
   Universal Tools Design System
   ========================================================= */


/* =========================================================
   PAGE
   ========================================================= */

.tool-page {

    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    padding: 40px 20px 80px;

}


/* =========================================================
   TOOL HERO
   ========================================================= */

.tool-hero {

    text-align: center;

    margin-bottom: 32px;

}


.tool-icon {

    width: 64px;
    height: 64px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 18px;

    font-size: 24px;
    font-weight: 700;

    background: rgba(212, 168, 40, 0.15);

    color: #d4a828;

}


.tool-hero h1 {

    margin: 0;

    font-size: clamp(
        32px,
        5vw,
        52px
    );

    line-height: 1.15;

    font-weight: 800;

}


.tool-description {

    max-width: 700px;

    margin: 14px auto 0;

    font-size: 17px;

    line-height: 1.7;

    opacity: 0.72;

}


/* =========================================================
   MAIN CARD
   ========================================================= */

.tool-card {

    width: 100%;

    padding: 32px;

    border-radius: 24px;

    background: var(
        --card-bg,
        #ffffff
    );

    border: 1px solid var(
        --border-color,
        #e5e7eb
    );

    box-shadow:
        0 15px 50px
        rgba(0, 0, 0, 0.08);

}


/* =========================================================
   INPUT GRID
   ========================================================= */

.tool-input-section {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 22px;

}


.tool-field {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.tool-field-full {

    grid-column:
        1 / -1;

}


.tool-field label {

    font-size: 14px;

    font-weight: 700;

    opacity: 0.8;

}


.tool-field-help {

    font-size: 12px;

    opacity: 0.55;

}


/* =========================================================
   INPUTS
   ========================================================= */

.tool-field input,
.tool-field select {

    width: 100%;

    min-height: 50px;

    padding: 0 15px;

    border-radius: 10px;

    border: 1px solid
        var(
            --input-border,
            #d1d5db
        );

    background:
        var(
            --input-bg,
            #ffffff
        );

    color:
        var(
            --input-text,
            #111827
        );

    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;

}


.tool-field input:focus,
.tool-field select:focus {

    border-color:
        #d4a828;

    box-shadow:
        0 0 0 3px
        rgba(
            212,
            168,
            40,
            0.12
        );

}


/* =========================================================
   ACTIONS
   ========================================================= */

.tool-actions {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 28px;

}


.tool-button {

    min-height: 48px;

    padding:
        0 22px;

    border-radius: 10px;

    border: 1px solid
        transparent;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;

}


.tool-button:hover {

    transform:
        translateY(-1px);

}


.tool-button-primary {

    background:
        #d4a828;

    color:
        #111111;

}


.tool-button-secondary {

    background:
        transparent;

    color:
        inherit;

    border-color:
        #cbd5e1;

}


/* =========================================================
   RESULT
   ========================================================= */

.tool-result {

    margin-top: 28px;

    padding: 28px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(
                212,
                168,
                40,
                0.12
            ),
            rgba(
                212,
                168,
                40,
                0.04
            )
        );

    border:
        1px solid
        rgba(
            212,
            168,
            40,
            0.35
        );

}


.tool-result-label {

    font-size: 14px;

    font-weight: 700;

    opacity: 0.7;

}


.tool-result-value {

    margin-top: 8px;

    font-size: clamp(
        32px,
        6vw,
        52px
    );

    font-weight: 800;

    line-height: 1.15;

    color:
        #c3971d;

}


.tool-result-details {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 12px;

    margin-top: 22px;

}


.tool-result-item {

    padding: 15px;

    border-radius: 12px;

    background:
        rgba(
            255,
            255,
            255,
            0.7
        );

    border:
        1px solid
        rgba(
            0,
            0,
            0,
            0.08
        );

}


.tool-result-item-label {

    display: block;

    font-size: 12px;

    opacity: 0.6;

    margin-bottom: 5px;

}


.tool-result-item-value {

    font-size: 16px;

    font-weight: 700;

}


/* =========================================================
   DISCLAIMER
   ========================================================= */

.tool-disclaimer {

    margin-top: 22px;

    padding: 16px;

    border-radius: 12px;

    font-size: 13px;

    line-height: 1.7;

    opacity: 0.65;

}


/* =========================================================
   RELATED TOOLS
   ========================================================= */

.related-tools {

    margin-top: 42px;

}


.related-tools h2 {

    margin-bottom: 18px;

    font-size: 24px;

}


.related-tools-grid {

    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 15px;

}


.related-tool-card {

    display: block;

    padding: 18px;

    border-radius: 16px;

    text-decoration: none;

    color: inherit;

    background:
        var(
            --card-bg,
            #ffffff
        );

    border:
        1px solid
        var(
            --border-color,
            #e5e7eb
        );

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.related-tool-card:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 10px 30px
        rgba(
            0,
            0,
            0,
            0.08
        );

}


.related-tool-icon {

    font-size: 22px;

    margin-bottom: 8px;

}


.related-tool-title {

    font-size: 15px;

    font-weight: 700;

}


/* =========================================================
   LOADING
   ========================================================= */

.tool-loading {

    opacity: 0.55;

    pointer-events: none;

}


/* =========================================================
   ERROR
   ========================================================= */

.tool-error {

    margin-top: 18px;

    padding: 14px 16px;

    border-radius: 10px;

    background:
        rgba(
            220,
            38,
            38,
            0.08
        );

    color:
        #b91c1c;

    font-size: 14px;

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .tool-page {

        padding:
            28px 14px 60px;

    }


    .tool-card {

        padding: 20px;

        border-radius: 18px;

    }


    .tool-input-section {

        grid-template-columns:
            1fr;

    }


    .tool-field-full {

        grid-column:
            auto;

    }


    .tool-result-details {

        grid-template-columns:
            1fr;

    }


    .related-tools-grid {

        grid-template-columns:
            1fr;

    }


    .tool-actions {

        flex-direction: column;

        align-items: stretch;

    }


    .tool-button {

        width: 100%;

    }

}