/**
 * ePay OneTouch Frontend Styles
 * Responsive full-width forms with theme support
 */

/* Base Form Styles - Full Width */
.epay-donation-form,
.epay-payment-form,
.epay-subscription-form {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    padding: 30px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Default Theme */
.epay-donation-form,
.epay-payment-form,
.epay-subscription-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    color: #212529;
}

/* Form Headers */
.epay-form-title,
.epay-donation-form h3,
.epay-payment-form h3,
.epay-subscription-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.epay-form-description,
.epay-donation-form p,
.epay-payment-form p,
.epay-subscription-form p {
    text-align: center;
    margin-bottom: 25px;
    font-size: 16px;
    opacity: 0.8;
}

/* Amount Selection Grid */
.epay-amounts,
.epay-subscription-amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.epay-amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.epay-amount-option {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.epay-amount-option:hover {
    transform: translateY(-2px);
}

.epay-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.epay-amount-option span,
.epay-amount-button {
    display: block;
    padding: 15px 20px;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255,255,255,0.8);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.epay-amount-option input[type="radio"]:checked + span {
    background: rgba(255,255,255,1);
    border-color: currentColor;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

/* Subscription Intervals */
.epay-subscription-intervals {
    margin-bottom: 25px;
}

.epay-interval-option {
    display: block;
    margin: 10px 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.epay-interval-option:hover {
    transform: translateX(5px);
}

.epay-interval-option input[type="radio"] {
    margin-right: 10px;
}

.epay-interval-option span {
    font-weight: 500;
    font-size: 16px;
}

/* Custom Amount */
.epay-custom-amount {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
}

.epay-custom-amount-input,
.epay-custom-amount input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 12px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 6px;
    font-size: 16px;
    background: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.epay-custom-amount-input:focus,
.epay-custom-amount input[type="number"]:focus {
    outline: none;
    border-color: rgba(255,255,255,1);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Information Fields */
.epay-donor-info,
.epay-payer-info {
    margin-bottom: 25px;
}

.epay-donor-info h4,
.epay-payer-info h4 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.epay-donor-info input,
.epay-payer-info input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 6px;
    font-size: 16px;
    background: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.epay-donor-info input:focus,
.epay-payer-info input:focus {
    outline: none;
    border-color: rgba(255,255,255,1);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Subscription Terms */
.epay-subscription-terms {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255,255,255,0.4);
    border-radius: 8px;
    border-left: 4px solid currentColor;
}

.epay-subscription-terms h4 {
    margin-top: 0;
    margin-bottom: 15px;
}

.epay-subscription-terms ul {
    margin: 0;
    padding-left: 20px;
}

.epay-subscription-terms li {
    margin: 8px 0;
    opacity: 0.9;
}

/* Submit Buttons */
.epay-submit {
    text-align: center;
    margin-top: 30px;
}

.epay-donate-btn,
.epay-pay-btn,
.epay-subscribe-btn,
.epay-submit-button {
    display: inline-block;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.9);
    color: inherit;
}

.epay-donate-btn:hover,
.epay-pay-btn:hover,
.epay-subscribe-btn:hover,
.epay-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: rgba(255,255,255,1);
}

/* Fixed Amount Display */
.epay-amount-fixed {
    padding: 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.epay-amount-input {
    margin-bottom: 25px;
}

.epay-amount-input label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

/* Messages */
.epay-message {
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.epay-message.epay-success {
    background: rgba(212, 237, 218, 0.9);
    border-color: #28a745;
    color: #155724;
}

.epay-message.epay-error {
    background: rgba(248, 215, 218, 0.9);
    border-color: #dc3545;
    color: #721c24;
}

.epay-message h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Theme Variants */

/* Red Theme */
.epay-form-container.epay-theme-red,
.epay-donation-form.epay-theme-red,
.epay-payment-form.epay-theme-red,
.epay-subscription-form.epay-theme-red {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    border-color: #721c24;
}

.epay-theme-red .epay-donate-btn,
.epay-theme-red .epay-pay-btn,
.epay-theme-red .epay-subscribe-btn,
.epay-theme-red .epay-submit-button {
    background: #ffffff;
    color: #dc3545;
    font-weight: 700;
}

.epay-theme-red .epay-donate-btn:hover,
.epay-theme-red .epay-pay-btn:hover,
.epay-theme-red .epay-subscribe-btn:hover,
.epay-theme-red .epay-submit-button:hover {
    background: #f8f9fa;
    color: #c82333;
}

/* Blue Theme */
.epay-form-container.epay-theme-blue,
.epay-donation-form.epay-theme-blue,
.epay-payment-form.epay-theme-blue,
.epay-subscription-form.epay-theme-blue {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    border-color: #004085;
}

.epay-theme-blue .epay-donate-btn,
.epay-theme-blue .epay-pay-btn,
.epay-theme-blue .epay-subscribe-btn,
.epay-theme-blue .epay-submit-button {
    background: #ffffff;
    color: #007bff;
    font-weight: 700;
}

.epay-theme-blue .epay-donate-btn:hover,
.epay-theme-blue .epay-pay-btn:hover,
.epay-theme-blue .epay-subscribe-btn:hover,
.epay-theme-blue .epay-submit-button:hover {
    background: #f8f9fa;
    color: #0056b3;
}

/* Green Theme */
.epay-form-container.epay-theme-green,
.epay-donation-form.epay-theme-green,
.epay-payment-form.epay-theme-green,
.epay-subscription-form.epay-theme-green {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #ffffff;
    border-color: #155724;
}

.epay-theme-green .epay-donate-btn,
.epay-theme-green .epay-pay-btn,
.epay-theme-green .epay-subscribe-btn,
.epay-theme-green .epay-submit-button {
    background: #ffffff;
    color: #28a745;
    font-weight: 700;
}

.epay-theme-green .epay-donate-btn:hover,
.epay-theme-green .epay-pay-btn:hover,
.epay-theme-green .epay-subscribe-btn:hover,
.epay-theme-green .epay-submit-button:hover {
    background: #f8f9fa;
    color: #1e7e34;
}

/* Black Theme */
.epay-form-container.epay-theme-black,
.epay-donation-form.epay-theme-black,
.epay-payment-form.epay-theme-black,
.epay-subscription-form.epay-theme-black {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
    color: #ffffff;
    border-color: #121416;
}

.epay-theme-black .epay-donate-btn,
.epay-theme-black .epay-pay-btn,
.epay-theme-black .epay-subscribe-btn,
.epay-theme-black .epay-submit-button {
    background: #ffffff;
    color: #212529;
    font-weight: 700;
}

.epay-theme-black .epay-donate-btn:hover,
.epay-theme-black .epay-pay-btn:hover,
.epay-theme-black .epay-subscribe-btn:hover,
.epay-theme-black .epay-submit-button:hover {
    background: #f8f9fa;
    color: #000000;
}

/* Yellow Theme */
.epay-form-container.epay-theme-yellow,
.epay-donation-form.epay-theme-yellow,
.epay-payment-form.epay-theme-yellow,
.epay-subscription-form.epay-theme-yellow {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border-color: #b68500;
}

.epay-theme-yellow .epay-donate-btn,
.epay-theme-yellow .epay-pay-btn,
.epay-theme-yellow .epay-subscribe-btn,
.epay-theme-yellow .epay-submit-button {
    background: #212529;
    color: #ffc107;
    font-weight: 700;
}

.epay-theme-yellow .epay-donate-btn:hover,
.epay-theme-yellow .epay-pay-btn:hover,
.epay-theme-yellow .epay-subscribe-btn:hover,
.epay-theme-yellow .epay-submit-button:hover {
    background: #000000;
    color: #e0a800;
}

/* Single Option Display */
.epay-single-amount-display,
.epay-single-interval-display {
    padding: 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-left: 4px solid currentColor;
}

.epay-single-amount-display .epay-amount-value,
.epay-single-interval-display .epay-interval-value {
    font-size: 24px;
    font-weight: 700;
    color: inherit;
    display: block;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .epay-donation-form,
    .epay-payment-form,
    .epay-subscription-form {
        padding: 20px;
        margin: 15px 0;
    }
    
    .epay-amounts,
    .epay-subscription-amounts,
    .epay-amount-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .epay-amount-option span,
    .epay-amount-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .epay-form-title,
    .epay-donation-form h3,
    .epay-payment-form h3,
    .epay-subscription-form h3 {
        font-size: 20px;
    }
    
    .epay-donate-btn,
    .epay-pay-btn,
    .epay-subscribe-btn,
    .epay-submit-button {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .epay-amounts,
    .epay-subscription-amounts,
    .epay-amount-buttons {
        grid-template-columns: 1fr;
    }
    
    .epay-donation-form,
    .epay-payment-form,
    .epay-subscription-form {
        padding: 15px;
    }
}

/* Animation for form appearance */
.epay-donation-form,
.epay-payment-form,
.epay-subscription-form {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Loading state */
.epay-form.epay-loading {
    opacity: 0.7;
    pointer-events: none;
}

.epay-form.epay-loading .epay-submit-button {
    background: #6c757d;
    cursor: not-allowed;
}

.epay-form.epay-loading .epay-submit-button::after {
    content: " ⏳";
}