.nikatia-calculator-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 900px;
    margin: 40px auto;
    background: transparent;
    border: 1px solid #000;
    border-radius: 6px;
    overflow: hidden;
    font-family: "PeydaWeb", sans-serif;
    direction: rtl;
}

.nikatia-calculator-form {
    flex: 1;
    padding: 30px;
    min-width: 300px;
    background: transparent;
}

.form-col {
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
justify-content: space-around;
align-items: center;
}

.form-row {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-row label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

.form-row input,
.form-row select {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.form-row select {
    background-color: #fff;
}

.nikatia-calculate-button {
    background-color: #fcd36f;
    color: #000;
    padding: 12px 20px;
    font-family: "PeydaWeb", sans-serif;
    letter-spacing: 0;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nikatia-calculate-button:hover {
    background-color: #f5c940;
}

.nikatia-result {
    flex: 1;
    padding: 30px;
    min-width: 300px;
    background-color: #fff;
    border-right: 1px solid #eee;
}

.nikatia-result h3 {
    margin-top: 0;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.nikatia-result-table {
    width: 100%;
    margin-top: 20px;
}

.nikatia-result-table th,
.nikatia-result-table td {
    padding: 10px;
    text-align: right;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.nikatia-result-table .final-price td {
    font-weight: bold;
    font-size: 18px;
    color: #000;
    background: #f9f9f9;
}

.nikatia-error {
    margin-top: 20px;
    background-color: #f44336;
    padding: 10px;
    border-radius: 6px;
    color: white;
}

.nikatia-loading {
    margin-top: 20px;
    font-style: italic;
    color: #777;
    text-align: center;
}
        .container {
            width: 750px;
            max-width: 95%;
            height: auto;
            padding: 25px;
            background-color: #ffffff;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .calculator {
            width: 100%;
            height: 100%;
            display: flex;
            /* Mobile-first: layout is a single column */
            flex-direction: column-reverse;
            gap: 20px;
            font-family: "PeydaWeb", sans-serif;
        }
        #nikatia-country {
            font-size: 15px;
            font-weight: normal;
            color: black;
            width: 100%;
        }
        #nikatia-calculator-form > div.form-col > label {
            font-size: 15px;
            font-weight: bold;
             color: black;
        }
        #nikatia-country, #nikatia-price, #nikatia-weight {
        background-color: #F5F5F5;
        border-radius: 20px;
        }
        /* --- Input Section --- */
        #nikatia-price, #nikatia-weight {
            max-width: 80%;
        }
        .cal__input {
            /* On mobile, this section appears first */
            order: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
            direction: rtl; /* Right-to-left for Persian */
        }

        .input-group {
            display: flex;
            flex-direction: column;
        }

        .input-group label {
            font-size: 14px;
            color: #333;
            margin-bottom: 8px;
            font-weight: 700;
        }

        .input-with-unit, .select-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            background-color: #f7f7f7;
            border-radius: 8px;
            padding: 0 12px;
            padding-left: 40px; /* Add padding to the left for the flag */
        }

        .input-with-unit input, .select-wrapper select {
            width: 100%;
            height: 48px;
            border: none;
            background-color: transparent;
            font-size: 16px;
            outline: none;
            text-align: right;
            font-family: "PeydaWeb", sans-serif;
            -moz-appearance: none; /* Firefox */
            -webkit-appearance: none; /* Safari and Chrome */
            appearance: none;
        }

        .select-wrapper select {
            padding-right: 0; /* Remove previous padding-right */
        }

        .input-unit {
            color: #888;
            font-size: 14px;
            padding-right: 10px;
            border-right: 1px solid #ddd;
            margin-right: 10px;
            user-select: none;
        }

        .country-flag {
            position: absolute;
            left: 12px; /* Position to the left */
            top: 50%;
            transform: translateY(-50%);
            width: 20px;
            height: 15px;
            pointer-events: none; /* Allows clicking the select box */
            margin-left: 0; /* Remove previous margin-left */
            border-radius: 3px; /* Add a slight border-radius to the flag */
            overflow: hidden; /* Ensure flag corners are rounded */
        }

        /* .select-wrapper::after {
            content: '▼';
            font-size: 12px;
            color: #888;
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
        } 
        */

        .submit-group {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 10px;
        }

        .submit-group button {
            background-color: #e6c575;
            color: #333;
            border: none;
            border-radius: 8px;
            padding: 12px 25px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            font-family: "PeydaWeb", sans-serif;
            transition: background-color 0.3s;
        }

        .submit-group button:hover {
            background-color: #d8b665;
        }

        #success-message {
            font-size: 14px;
            color: #28a745;
        }

        /* --- Dashed Line --- */

        /* --- Result Section --- */
        .cal__result-container {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .cal__result {
            /* On mobile, this section appears second */
            order: 2;
            /* A dashed top border acts as the separator on mobile */
            border-top: 2px dashed #ccc;
            padding-top: 20px;
            direction: rtl; /* Right-to-left for Persian */
            font-family: "PeydaWeb", sans-serif;
        }

        .result__message h3 {
            font-size: 20px;
            margin-top: 0;
            margin-bottom: 10px;
        }

        .result__message p {
            font-size: 14px;
            color: #666;
            line-height: 1.6;
            margin-bottom: 25px;
        }

        .result__price-table {
            display: flex;
            flex-direction: column;
            gap: 15px;
            font-size: 16px;
        }

        .result-row {
            display: flex;
            justify-content: space-between;
        }

        .result-label {
            color: #333;
        }

        .result-value {
            font-weight: 700;
            color: #000;
        }

        .solid-horiz-line {
            height: 1px;
            background-color: #ddd;
            margin: 20px 0;
        }

        .final-price {
            display: flex;
            justify-content: space-between;
            font-size: 18px;
            font-weight: 700;
        }

        .hidden {
            display: none;
        }

        /* --- Desktop View --- */
        @media (min-width: 769px) {

            .calculator {
                /* On desktop, switch to a row layout */
                flex-direction: row;
                justify-content: space-between;
                align-items: flex-start;
            }

            .cal__input, .cal__result {
                /* Reset the order for desktop */
                order: initial;
                flex: 1;
            }

            .cal__result {
                /* Remove mobile separator and restore padding */
                border-top: none;
                padding-top: 0;
                padding-left: 20px;
            }
        .cal__result-container {
            justify-content: space-around;
        }

            /* Show vertical line on desktop */
            .dashed-vertical-line {
                display: block;
                width: 2px;
                background-image: linear-gradient(to bottom, #ccc 60%, rgba(255,255,255,0) 0%);
                background-position: right;
                background-size: 2px 10px;
                background-repeat: repeat-y;
                align-self: stretch;
                margin: 0 20px;
            }
        }



