/**
 * EEZY Stripe Checkout - Frontend Styles
 * Colors sourced from eezy-design-suite brand-sync CSS variables
 */

.eezy-checkout-btn {
    background: var(--eezy-primary, #00A7E1);
    color: #fff;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eezy-checkout-btn:hover {
    background: var(--eezy-primary-dark, #0086B4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 167, 225, 0.3);
}

.eezy-checkout-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.eezy-pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.eezy-pricing-tier {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
}

.eezy-pricing-tier:hover {
    border-color: var(--eezy-primary, #00A7E1);
    box-shadow: 0 8px 24px rgba(0, 167, 225, 0.15);
    transform: translateY(-4px);
}

.eezy-pricing-tier.featured {
    border-color: var(--eezy-primary, #00A7E1);
    border-width: 3px;
    position: relative;
}

.eezy-pricing-tier.featured::before {
    content: "Most Popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--eezy-primary, #00A7E1);
    color: #fff;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.eezy-pricing-tier h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #1e293b;
}

.eezy-pricing-tier .price {
    font-size: 48px;
    font-weight: 700;
    color: var(--eezy-primary, #00A7E1);
    margin: 16px 0;
}

.eezy-pricing-tier .price-suffix {
    font-size: 16px;
    color: #64748b;
    font-weight: 400;
}

.eezy-pricing-tier ul {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.eezy-pricing-tier li {
    padding: 8px 0;
    position: relative;
    padding-left: 28px;
}

.eezy-pricing-tier li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--eezy-success, #4CAF50);
    font-weight: 700;
}

.eezy-checkout-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.eezy-checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
}

.eezy-checkout-form input[type="text"],
.eezy-checkout-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.eezy-checkout-form input:focus {
    outline: none;
    border-color: var(--eezy-primary, #00A7E1);
}

.payment-type-selector {
    display: flex;
    gap: 12px;
    margin: 24px 0;
}

.payment-type-option {
    flex: 1;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.payment-type-option:hover {
    border-color: var(--eezy-primary, #00A7E1);
}

.payment-type-option input[type="radio"] {
    display: none;
}

.payment-type-option input[type="radio"]:checked + label {
    color: var(--eezy-primary, #00A7E1);
    font-weight: 600;
}

.payment-type-option input[type="radio"]:checked ~ .payment-type-option {
    border-color: var(--eezy-primary, #00A7E1);
    background: var(--eezy-surface, #F5F5F5);
}

/* Responsive */
@media (max-width: 768px) {
    .eezy-pricing-table {
        grid-template-columns: 1fr;
    }

    .eezy-checkout-form {
        padding: 20px;
    }
}

/* ============================================
   Embedded Checkout Modal
   ============================================ */

#eezy-checkout-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

#eezy-checkout-overlay.active {
    display: flex;
}

#eezy-checkout-modal {
    background: #fff;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: eezySlideUp 0.3s ease;
}

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

#eezy-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: var(--eezy-primary, #00A7E1);
    border-radius: 12px 12px 0 0;
}

.eezy-checkout-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

#eezy-checkout-close {
    background: none;
    border: none;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

#eezy-checkout-close:hover {
    color: #fff;
}

#eezy-checkout-mount {
    min-height: 400px;
}

/* Stripe's embedded checkout iframe needs room */
#eezy-checkout-mount iframe {
    border-radius: 0 0 12px 12px;
}

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

.eezy-checkout-success {
    text-align: center;
    padding: 48px 32px;
}

.eezy-checkout-success .success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--eezy-success, #4CAF50);
    color: #fff;
    font-size: 36px;
    line-height: 72px;
    margin: 0 auto 24px;
}

.eezy-checkout-success h2 {
    color: #1e293b;
    margin: 0 0 12px;
    font-size: 24px;
}

.eezy-checkout-success p {
    color: #64748b;
    margin: 0 0 24px;
    font-size: 16px;
}

.success-next-steps {
    text-align: left;
    background: #f8fafc;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.success-next-steps h3 {
    margin: 0 0 12px;
    color: #1e293b;
    font-size: 16px;
}

.success-next-steps ol {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}

.success-next-steps li {
    padding: 4px 0;
}

.eezy-checkout-done-btn {
    background: var(--eezy-primary, #00A7E1);
    color: #fff;
    padding: 12px 48px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.eezy-checkout-done-btn:hover {
    background: var(--eezy-primary-dark, #0086B4);
}

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

@media (max-width: 640px) {
    #eezy-checkout-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }

    #eezy-checkout-header {
        border-radius: 0;
    }

    .eezy-checkout-success {
        padding: 32px 20px;
    }
}
