/**
 * Payment Resume Styles
 *
 * Styles for the payment recovery shortcode.
 *
 * @package CMS
 * @since 1.0.0
 */

.cms-payment-resume-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.cms-payment-resume-header {
    text-align: center;
    margin-bottom: 30px;
}

.cms-payment-resume-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

/* Payment Sections */
.cms-payment-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Loading State */
#cms-payment-loading {
    text-align: center;
}

.cms-loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.cms-payment-section.cms-error {
    border-left: 4px solid #e74c3c;
    text-align: center;
}

.cms-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.cms-payment-section.cms-error h3 {
    color: #e74c3c;
    margin: 0 0 15px 0;
}

.cms-payment-section.cms-error p {
    color: #666;
    margin-bottom: 20px;
}

/* Warning State (Expired) */
.cms-payment-section.cms-warning {
    border-left: 4px solid #f39c12;
    text-align: center;
}

.cms-warning-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.cms-payment-section.cms-warning h3 {
    color: #f39c12;
    margin: 0 0 15px 0;
}

.cms-payment-section.cms-warning p {
    color: #666;
    margin-bottom: 15px;
}

/* Success State */
.cms-payment-section.cms-success {
    border-left: 4px solid #27ae60;
    text-align: center;
}

.cms-success-icon {
    font-size: 64px;
    color: #27ae60;
    margin-bottom: 15px;
    font-weight: bold;
}

.cms-payment-section.cms-success h3 {
    color: #27ae60;
    margin: 0 0 15px 0;
}

.cms-success-details {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.cms-success-details p {
    margin: 5px 0;
    color: #333;
}

/* Booking Summary */
.cms-booking-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.cms-booking-summary h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.cms-summary-grid {
    display: grid;
    gap: 15px;
}

.cms-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cms-summary-item:last-child {
    border-bottom: none;
}

.cms-summary-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.cms-summary-value {
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.cms-summary-value.cms-amount {
    color: #27ae60;
    font-weight: 700;
    font-size: 20px;
}

.cms-summary-item.cms-expiry-warning {
    background: #fff3cd;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ffc107;
}

.cms-expiry-warning .cms-summary-label {
    color: #856404;
}

.cms-expiry-warning .cms-summary-value {
    color: #856404;
    font-weight: 600;
}

/* Payment Form */
.cms-payment-form h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.cms-form-description {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

.cms-form-group {
    margin-bottom: 20px;
}

.cms-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Stripe Element */
.cms-stripe-element {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
    transition: border-color 0.3s ease;
}

.cms-stripe-element:hover {
    border-color: #3498db;
}

.cms-stripe-element.StripeElement--focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cms-stripe-element.StripeElement--invalid {
    border-color: #e74c3c;
}

.cms-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

/* Form Actions */
.cms-form-actions {
    margin-top: 25px;
}

/* Buttons */
.cms-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cms-button-primary {
    background: #3498db;
    color: #fff;
    width: 100%;
}

.cms-button-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.cms-button-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cms-button-secondary {
    background: #95a5a6;
    color: #fff;
}

.cms-button-secondary:hover {
    background: #7f8c8d;
}

.cms-button-spinner {
    display: inline-block;
}

/* Payment Result */
.cms-payment-result {
    margin-top: 20px;
}

.cms-alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cms-alert-error {
    background: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.cms-alert-success {
    background: #efe;
    border-left: 4px solid #27ae60;
    color: #1e8449;
}

/* Responsive */
@media (max-width: 768px) {
    .cms-payment-resume-container {
        padding: 15px;
    }

    .cms-payment-section {
        padding: 20px;
    }

    .cms-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .cms-payment-resume-header h2 {
        font-size: 24px;
    }

    .cms-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Accessibility */
.cms-button:focus,
.cms-stripe-element:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Loading animation for button */
@keyframes button-loading {
    0%, 80%, 100% {
        opacity: 0.4;
    }
    40% {
        opacity: 1;
    }
}

.cms-button-spinner::after {
    content: '...';
    display: inline-block;
    animation: button-loading 1.4s infinite;
}
