/* ===============================
   Payment card (new design)
   =============================== */
.fd-download-card {
    max-width: 100%;
    margin: 30px auto;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    text-align: center;
    font-family: "IRANSans", sans-serif !important;
}

.fd-download-body {
    padding: 0 28px 24px 32px;
}

.fd-card-header {
    padding: 14px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin-bottom: 15px;
}

.fd-card-header .fd-title {
    color: #fff;
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
}

.fd-card-price {
    background: #eaf1fc;
    border-radius: 8px;
    padding: 10px 5px;
    font-weight: 700;
    font-size: 19px;
    color: #222;
    margin-bottom: 16px;
}


.fd-card-desc {
    padding: 5px;
    font-weight: 400;
    font-size: 14px;
    color: #222;
    margin-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
    text-align: justify;
    line-height: 2;
}

.fd-card-price span:last-child {
    font-weight: 500;
    font-size: 15px;
    margin-right: 5px;
    color: #444;
}

.fd-form-row {
    margin: 12px 0;
}

.fd-gateway-picker {
    margin: 18px 0 14px;
    text-align: right;
}

.fd-gateway-title {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
}

.fd-gateway-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 0;
    padding: 0;
    border: 1px solid #d7dee9;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
    isolation: isolate;
}

.fd-gateway-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    color: #475569;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease;
}

.fd-gateway-option + .fd-gateway-option {
    border-right: 1px solid #d7dee9;
}

.fd-gateway-option:first-child {
    border-radius: 0 6px 6px 0;
}

.fd-gateway-option:last-child {
    border-radius: 6px 0 0 6px;
}

.fd-gateway-option:hover {
    color: #1e293b;
    background: #f8fafc;
}

.fd-gateway-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fd-gateway-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.fd-gateway-option:has(input:checked) {
    color: #0f172a;
    background: #edf4ff;
    z-index: 1;
}

.fd-gateway-option:has(input:checked)::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid #6ea0ff;
    border-radius: inherit;
    pointer-events: none;
}

.fd-form-row input[type="tel"] {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    text-align: center;
}

.fd-form-note {
    font-size: 13px;
    margin-top: 6px;
    color: #666;
}

.fd-checkbox {
    margin: 12px 0 20px;
    text-align: right;
}

.fd-checkbox label {
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: right;
}

.fd-btn-pay {
    display: block;
    width: 100%;
    border: none !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.fd-btn-pay:disabled,
.fd-btn-pay.is-loading {
    cursor: wait;
    opacity: 0.78;
    transform: none;
    pointer-events: none;
}

.fd-btn-pay.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.fd-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fd-spin 0.75s linear infinite;
    flex: 0 0 16px;
}

@keyframes fd-spin {
    to {
        transform: rotate(360deg);
    }
}

.fd-btn-pay:hover {
    transform: translateY(-2px);
}

/* ===============================
   Messages (used in AJAX result)
   =============================== */
.paid-download-message {
    margin-top: 20px;
    display: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.paid-download-message.success {
    background: #cbf6de;
    color: #1b7d4a;
}

.paid-download-message.error {
    background: #ffd9d7;
    color: #c0392b;
}
