/* Checkout Page Styles */

.checkout-container {
    min-height: 100vh;
    background: #f7fafc;
    padding: 120px 0 60px;
}

.checkout-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a0aec0;
    font-size: 0.875rem;
    position: relative;
}

.step.active {
    color: #667eea;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.25rem;
    width: 1rem;
    height: 1px;
    background: #e2e8f0;
}

.step.active:not(:last-child)::after {
    background: #667eea;
}

.step-number {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.step.active .step-number {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Sidebar - Plan Summary */
.checkout-sidebar {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.plan-summary h3 {
    margin-bottom: 1.5rem;
    color: #1a202c;
    font-size: 1.25rem;
}

.selected-plan {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.plan-info h4 {
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.plan-price .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.plan-price .period {
    color: #718096;
    font-size: 0.875rem;
}

.change-plan {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.change-plan:hover {
    text-decoration: underline;
}

.plan-features {
    margin-bottom: 2rem;
}

.plan-features h5 {
    margin-bottom: 1rem;
    color: #1a202c;
    font-size: 1rem;
}

.plan-features ul {
    list-style: none;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #4a5568;
}

.plan-features i {
    color: #48bb78;
    font-size: 0.875rem;
}

.pricing-breakdown {
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #4a5568;
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #1a202c;
    font-size: 1.125rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.security-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
    font-size: 0.875rem;
}

.badge i {
    color: #48bb78;
    width: 16px;
}

/* Main Content - Form */
.checkout-main {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.checkout-form h2 {
    margin-bottom: 0.5rem;
    color: #1a202c;
}

.form-subtitle {
    color: #718096;
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: #1a202c;
    font-size: 1.125rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1a202c;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #718096;
    font-size: 0.875rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Stripe Card Element */
#card-element {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#card-element.StripeElement--focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#card-errors {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Submit Button */
#submit-payment {
    position: relative;
    overflow: hidden;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Guarantee Section */
.guarantee {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    margin-top: 2rem;
}

.guarantee-icon {
    background: #48bb78;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guarantee-content h4 {
    color: #1a202c;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.guarantee-content p {
    color: #4a5568;
    margin: 0;
    font-size: 0.875rem;
}

/* Trust Section */
.trust-section {
    background: white;
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
}

.trust-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #718096;
}

.trust-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.trust-item span {
    font-weight: 500;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .checkout-sidebar {
        order: 2;
        position: static;
    }

    .checkout-main {
        order: 1;
        padding: 2rem 1.5rem;
    }

    .checkout-steps {
        gap: 1rem;
    }

    .step-label {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .trust-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        padding: 100px 0 40px;
    }

    .checkout-main {
        padding: 1.5rem 1rem;
    }

    .checkout-sidebar {
        padding: 1.5rem;
    }

    .trust-indicators {
        grid-template-columns: 1fr;
    }
}