/**
 * Checkout Page Styles
 * 
 * @package MP_Subscription_Manager
 * @since 1.0.0
 */

/* ===================================
   Checkout Container
   =================================== */
.mpsub-checkout-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ===================================
   Progress Steps
   =================================== */
.mpsub-checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.progress-step.completed .step-number {
    background: #10b981;
    color: #ffffff;
}

.step-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #059669;
    font-weight: 600;
}

.progress-line {
    width: 100px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 10px;
    position: relative;
    top: -20px;
}

/* ===================================
   Checkout Steps
   =================================== */
.mpsub-checkout-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkout-step h2 {
    font-size: 28px;
    color: #111827;
    margin-bottom: 24px;
    font-weight: 600;
}

/* ===================================
   Order Summary Card
   =================================== */
.order-summary-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 2px solid #059669;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d1fae5;
}

.plan-header h3 {
    font-size: 24px;
    color: #065f46;
    margin: 0;
}

.plan-duration {
    background: #059669;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.plan-features h4 {
    font-size: 16px;
    color: #065f46;
    margin-bottom: 12px;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    padding: 8px 0;
    color: #047857;
    display: flex;
    align-items: center;
}

.feature-icon {
    color: #10b981;
    margin-right: 12px;
    font-weight: bold;
    font-size: 18px;
}

.trial-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    color: #92400e;
}

.order-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #d1fae5;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.total-final {
    font-size: 20px;
    color: #065f46;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d1fae5;
}

/* ===================================
   User Info Card
   =================================== */
.user-info-card {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.user-info-card h3 {
    font-size: 18px;
    color: #111827;
    margin-bottom: 12px;
}

.user-info-card p {
    margin: 8px 0;
    color: #6b7280;
}

/* ===================================
   Payment Form
   =================================== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
}

/* ===================================
   Payment Network Selection
   =================================== */
.payment-network-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.network-option {
    cursor: pointer;
}

.network-option input[type="radio"] {
    display: none;
}

.network-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #ffffff;
}

.network-card:hover {
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.1);
}

.network-option input[type="radio"]:checked + .network-card {
    border-color: #059669;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.network-card img {
    max-width: 100px;
    height: auto;
    margin-bottom: 12px;
}

.network-card span {
    display: block;
    font-weight: 600;
    color: #374151;
}

/* ===================================
   Payment Summary
   =================================== */
.payment-summary {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 4px;
}

.payment-summary p {
    margin: 0;
    font-size: 16px;
    color: #065f46;
}

/* ===================================
   Terms Acceptance
   =================================== */
.terms-acceptance {
    margin: 24px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

/* ===================================
   Checkout Actions
   =================================== */
.checkout-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: #ffffff;
    color: #059669 !important;
    border: 2px solid #059669;
}

.btn-outline:hover {
    background: #f0fdf4;
    color: #047857 !important;
}

.btn-back {
    color: #059669 !important;
}

.btn-back:hover {
    color: #047857 !important;
}

.btn-arrow {
    font-size: 18px;
}

/* ===================================
   Success Confirmation
   =================================== */
.checkout-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.checkout-success h2 {
    color: #065f46;
    margin-bottom: 16px;
}

.checkout-success p {
    color: #6b7280;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 24px;
}

.order-details {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
}

/* ===================================
   Alerts
   =================================== */
.alert {
    padding: 14px 20px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 15px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* ===================================
   Empty States
   =================================== */
.mpsub-checkout-empty,
.mpsub-checkout-login {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.mpsub-checkout-empty h2,
.mpsub-checkout-login h2 {
    color: #111827;
    margin-bottom: 16px;
}

.mpsub-checkout-empty p,
.mpsub-checkout-login p {
    color: #6b7280;
    margin-bottom: 24px;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .mpsub-checkout-content {
        padding: 24px 20px;
    }

    .mpsub-checkout-progress {
        padding: 20px 10px;
    }

    .progress-line {
        width: 50px;
    }

    .step-label {
        font-size: 12px;
    }

    .payment-network-options {
        grid-template-columns: 1fr;
    }

    .checkout-actions {
        flex-direction: column-reverse;
    }

    .checkout-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-summary-card {
        padding: 16px;
    }
}
