/* Payment Method Cards */
.payment-method-cards {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    width: 120px;
    min-height: 100px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.payment-method-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

.payment-method-card.selected {
    border-color: #3B82F6;
    background: #EFF6FF;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.18);
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.payment-method-card.selected .payment-method-label {
    color: #1D4ED8;
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin: 0 0 1.5rem 0;
    direction: rtl;
}

/* Custom Amount Input */
#customAmountContainer {
    display: none;
}

.custom-amount {
    margin-bottom: 1.5rem;
}

.custom-amount input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    direction: rtl;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.custom-amount input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

/* Donation Amount Buttons */
.donation-amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1em 0;
    justify-content: space-between;
}

.donation-amount-buttons.single {
    justify-content: center;
}

.donation-amount-btn {
    min-width: 80px;
    width: 30%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
}

.donation-amount-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.donation-amount-btn.selected {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

/* Form Styles */
.donation-form {
    direction: rtl;
}

.form-group-wrapper {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Side-by-side field rows */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

/* Required field asterisk */
label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #10b981;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:valid {
    border-color: #10b981;
}

#months-container {
    animation: slideDown 0.3s ease-out;
}

#months-container.show {
    display: block;
}

/* Total Donation Display */
.total-donation {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 16px;
    border: 2px solid #0ea5e9;
    margin: 1rem 0;
    color: #0ea5e9;
}

.total-donation p {
    margin: 0.25rem 0;
}

.total-donation p:first-child {
    font-size: 1rem;
    font-weight: 500;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0ea5e9;
    text-shadow: 0 2px 4px rgba(14, 165, 233, 0.1);
}

/* HOK Summary (Standing Order) */
.hok-summary .hok-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}

.hok-summary .coin,
.hok-summary #monthlyAmount {
    font-weight: 700;
    color: #0ea5e9;
}

/* Submit Button */
.submit-btn-container {
    display: flex;
    justify-content: center;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loader */
.loader {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.loader.show {
    display: block;
}

.loader-container {
    position: relative;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding: initial;
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .donation-amount-buttons {
        margin: 1em;
    }
    .donation-amount-btn {
        padding: 0.875rem 0;
        font-size: 0.95rem;
    }
    .submit-btn {
        margin: 1.2em 1em 0 1em;
    }
    .subtitle {
        font-size: 1.1rem;
    }

    .form-group-wrapper {
        margin-bottom: 0;
        padding: 1rem;
         background: unset;
        border-radius: 0;
        border: unset;
    }
    .total-donation {
        margin: 0;
    }

    .payment-method-cards {
        gap: 8px;
    }

    .payment-method-card {
        width: 100px;
        min-height: 85px;
        padding: 12px 8px;
    }

    .payment-method-label {
        font-size: 0.8rem;
    }

    /* Stack side-by-side fields on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row .form-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }
    .form-group-wrapper {
        margin-bottom: 0;
        padding: 0.75rem;
        background: unset;
        border-radius: 0;
        border: unset;
    }

    .donation-amount-buttons {
        margin: 0.875rem;
    }
    .submit-btn {
        margin: 2em 0.875rem;
    }
}

/* RTL Support */
[dir="rtl"] input,
[dir="rtl"] select {
    text-align: right;
}

/* Accessibility */
.donation-amount-btn:focus,
.submit-btn:focus,
input:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Security Badges */
.security-info {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.5rem;
    color: #92700c;
    font-size: 0.9rem;
    line-height: 1.6;
}
