@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2 supports variations'),
    url('../fonts/vazirmatn/Vazirmatn[wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

.rdap-purchase-wrapper {
    font-family: Vazirmatn, sans-serif;
    width: 100%;
    max-width: 100%;
}

#rdap-order-summary p{
    margin: 5px 0;
}
#rdap-order-summary small {
    font-size:.8rem
}
#rdap-order-summary strong {
    font-size:.9rem;
    font-weight: 700;
}

.rdap-total {
    font-size: 1rem;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}
#rdap-pay-button {
    font-family: inherit;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    font-size: 1.1rem;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
#rdap-pay-button:hover:not(:disabled) {
    background: #005a87;
}
#rdap-pay-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.rdap-field {
    display: flex;
    flex-direction: column;
    width: 300px;
    height: 100%;
    text-align: right;
}
.rdap-field label {
    display: block;
    font-weight: 600;
    font-size:.8rem;
    margin-bottom: 4px;
}
.rdap-field input[type="text"],
.rdap-field input[type="tel"],
.rdap-field input[type="email"],
.rdap-field input[type="number"],
.rdap-field select {
    width: auto;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.rdap-field input:focus,
.rdap-field select:focus {
    border-color: #262d30;
    outline: none;
}
.rdap-field input[type="checkbox"] {
    margin-right: 6px;
}

.rdap-price {
    display: inline-flex;
    gap:5px;
    align-items: center;
}
.rdap-amount {
    font-weight: bold;
    direction: ltr;
    unicode-bidi: embed;
}
.rdap-symbol {
    margin-right: 3px;
    font-size: 0.9em;
    color: #555;
}


.rdap-custom-amount-number {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin:10px 0;
}
.rdap-custom-number-input {
    max-width: 40% !important;
    margin: 0 !important;
}
.rdap-custom-range,
.rdap-quantity-range {
    width: 100%;
    margin: 8px 0;
    accent-color: #0073aa;
    outline:none;
}
.rdap-range-value {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}
.rdap-range-hint {
    display: block;
    font-size: 0.8rem;
    opacity:.7;
    margin-top: 4px;
}

.rdap-operator-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.rdap-operator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.6;
    padding: 8px 4px;
}

.rdap-operator-name {
    font-size: 0.6rem;
    font-weight: 500;
    margin-top: 4px;
    color: #555;
}

.rdap-operator-item.active {
    filter: grayscale(0%);
    opacity: 1;
    border-color: #0073aa;
    background: #e8f0fe;
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.2);
    pointer-events: none;
}

.rdap-operator-item.active .rdap-operator-name {
    color: #0073aa;
}

.rdap-operator-item:hover:not(.active) {
    filter: grayscale(70%);
    opacity: 0.8;
    transform: scale(1.02);
}

.rdap-operator-item[data-operator="TALIYA"].active {
    border-color: #e60000;
    background: #ffe6e6;
}

.rdap-operator-item[data-operator="TALIYA"].active .rdap-operator-name {
    color: #e60000;
}

.rdap-operator-item[data-operator="MTN"].active {
    border-color: #ff8c00;
    background: #fff0e0;
}

.rdap-operator-item[data-operator="MTN"].active .rdap-operator-name {
    color: #ff8c00;
}

.rdap-operator-item[data-operator="MCI"].active {
    border-color: #00a651;
    background: #e5f4e5;
}

.rdap-operator-item[data-operator="MCI"].active .rdap-operator-name {
    color: #00a651;
}

.rdap-operator-item[data-operator="RIGHTEL"].active {
    border-color: #9b59b6;
    background: #f3e8f7;
}

.rdap-operator-item[data-operator="RIGHTEL"].active .rdap-operator-name {
    color: #9b59b6;
}

.rdap-mobile-input-wrapper {
    position: relative;
    width: 100%;
}

.rdap-mobile-input-wrapper input[type="tel"] {
    width: 100%;
    padding-right: 45px;
    direction: ltr;
    text-align: left;
    box-sizing: border-box;
}

.rdap-mobile-operator-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    line-height: 1;
}

.rdap-mobile-operator-icon img {
    display: block;
    width: 20px;
    height: 20px;
}

.rdap-error-box, .rdap-success-box {
    font-family: Vazirmatn, sans-serif;
    max-width:600px;
    margin:30px auto;
    padding:30px;
    border-radius:12px;
    text-align:center;
}
.rdap-error-box {
    background:#fef0f0;
}
.rdap-success-box {
    background:#f0f9f0;
}

.rdap-icon-large {
    font-size: 48px;
    margin-bottom: 15px;
}

.rdap-success-title {
    color: #2e7d32;
    margin: 0 0 10px 0;
}

.rdap-error-title {
    color: #c62828;
    margin: 0 0 10px 0;
}

.rdap-message-text {
    font-size: 16px;
    color: #333;
}

.rdap-transaction-details {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: right;
}

.rdap-error-text {
    font-size: 16px;
    color: #333;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    direction: rtl;
}

.rdap-button-wrapper {
    margin-top: 25px;
}

.rdap-back-success-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #2e7d32;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

.rdap-back-success-btn:hover {
    background: #1b5e20;
    color: #fff;
}

.rdap-back-error-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #555;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

.rdap-back-error-btn:hover {
    background: #333;
    color: #fff;
}

.rdap-gateway-selector {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    font-size: .9rem;
}
.rdap-gateway-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
}

.rdap-gateway-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 70px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.6;
    padding: 8px 4px;
}

.rdap-gateway-name {
    font-size: .6rem;
    font-weight: 500;
    margin-top: 4px;
    color: #555;
}

.rdap-gateway-item.active {
    filter: grayscale(0%);
    opacity: 1;
    border-color: #0073aa;
    background: #e8f0fe;
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.2);
    pointer-events: none;
}

.rdap-gateway-item.active .rdap-gateway-name {
    color: #0073aa;
}

.rdap-gateway-item:hover:not(.active) {
    filter: grayscale(70%);
    opacity: 0.8;
    transform: scale(1.02);
}

.rdap-gateway-item[data-gateway="zarinpal"] img {
    width: 60px;
}
.rdap-gateway-item[data-gateway="irkish"] img {
    width: 110px;
}
.rdap-gateway-item[data-gateway="irkish"].active {
    border-color: #e60000;
    background: #ffe6e6;
}
.rdap-gateway-item[data-gateway="zarinpal"].active {
    border-color: #f2c706;
    background: #f6f0d2;
}


#rdap-notification {
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    font-family: Vazirmatn, sans-serif;
    font-size: 0.85rem;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    direction: rtl;
    text-align: center;
    margin:10px auto;
}
#rdap-notification.rdap-notification-error {
    background: #d32f2f;
}
#rdap-notification.rdap-notification-success {
    background: #2e7d32;
}

@media (max-width: 400px) {
    .rdap-field input,
    .rdap-field select {
        font-size: 0.9rem;
    }
    .rdap-custom-amount-number {
        flex-direction: column;
    }
    .rdap-custom-number-input {
        max-width: 100% !important;
    }
    .rdap-field {
        width: 200px;
    }
}
