/**
 * Stripe Embedded Checkout Styles
 *
 * Styles for the Stripe Embedded Checkout component.
 *
 * @package OpenCalls
 * @since 6.51.0
 */

/* ========================================
   Container & Layout
   ======================================== */

.stripe-embedded-checkout-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   Payment Summary Card
   ======================================== */

.payment-summary-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.payment-summary-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.payment-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-details .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.payment-details .detail-row:last-child {
    border-bottom: none;
}

.payment-details .detail-row.total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #1a1a1a;
    border-bottom: none;
}

.payment-details .label {
    font-size: 14px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-details .value {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.payment-details .value.amount {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

/* ========================================
   Loading State
   ======================================== */

.checkout-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed #e5e5e5;
}

.checkout-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.checkout-loading p {
    margin: 16px 0 0;
    color: #666666;
    font-size: 14px;
}

/* ========================================
   Error State
   ======================================== */

.checkout-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.checkout-error p {
    margin: 0 0 16px;
    color: #dc2626;
    font-size: 14px;
}

.btn-retry {
    display: inline-block;
    padding: 12px 24px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-retry:hover {
    background: #333333;
}

/* ========================================
   Stripe Checkout Container
   ======================================== */

.stripe-checkout-container {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0;
    min-height: 400px;
    overflow: hidden;
}

/* ========================================
   Success State
   ======================================== */

.checkout-success {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 48px 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.checkout-success .success-icon {
    width: 80px;
    height: 80px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.checkout-success .success-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
}

.checkout-success h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.checkout-success > p {
    margin: 0 0 24px;
    color: #666666;
    font-size: 16px;
}

#success-details {
    margin-top: 16px;
}

#success-details p {
    margin: 0;
    color: #666666;
    font-size: 14px;
}

#success-details strong {
    color: #1a1a1a;
}

/* ========================================
   Continue Button
   ======================================== */

.continue-submission-wrapper {
    margin-top: 24px;
    text-align: center;
}

.btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-continue:hover {
    background: #333333;
    transform: translateX(4px);
    color: #ffffff;
    text-decoration: none;
}

.btn-continue svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Test Mode Helper
   ======================================== */

.test-mode-helper {
    margin-top: 24px;
    padding: 16px 20px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
}

.test-mode-helper h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.test-mode-helper p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #92400e;
}

.test-mode-helper code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.test-mode-helper a {
    color: #92400e;
    font-size: 13px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .stripe-embedded-checkout-wrapper {
        padding: 16px;
    }

    .payment-summary-card {
        padding: 16px;
    }

    .payment-details .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .payment-details .detail-row.total {
        flex-direction: row;
        align-items: center;
    }

    .checkout-success {
        padding: 32px 16px;
    }

    .btn-continue {
        width: 100%;
        justify-content: center;
    }
}
