/* Checkout Pages - Light & Dark Theme Styling */

/* ============================================
   LIGHT MODE STYLES (Default)
   ============================================ */

/* Checkout Container */
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: calc(100vh - 400px);
}

.checkout-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 2rem;
}

/* Checkout Grid */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Checkout Sections */
.checkout-section {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.checkout-section .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Customer Information */
.checkout-section>div[style*="margin-bottom: 1rem"] strong {
    color: #4b5563;
    font-weight: 600;
}

/* Payment Gateway Options */
.payment-gateway-option {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.payment-gateway-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-gateway-option:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.payment-gateway-option:hover::before {
    opacity: 1;
}

.payment-gateway-option.selected {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.payment-gateway-option.selected::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.payment-gateway-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    position: relative;
    z-index: 1;
}

.payment-gateway-option input[type="radio"] {
    margin-right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #2563eb;
}

.payment-gateway-option .payment-icon {
    font-size: 1.75rem;
    margin-right: 0.75rem;
}

.payment-gateway-option .payment-details {
    flex: 1;
}

.payment-gateway-option .payment-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: #111827;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-gateway-option .payment-description {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Payment Info / Security Messages */
.payment-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-left: 4px solid #2563eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.payment-info p {
    margin: 0.5rem 0;
    color: #1e40af;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.payment-info p:first-child {
    margin-top: 0;
}

.payment-info p:last-child {
    margin-bottom: 0;
}

.payment-info i {
    font-size: 1.125rem;
    color: #2563eb;
}

/* Security Badge */
.security-badge {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.security-badge i {
    font-size: 1.5rem;
    color: #059669;
}

.security-badge span {
    color: #065f46;
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Order Summary Panel */
.checkout-section:has(.tool-summary),
.checkout-section:has(.plan-summary) {
    position: sticky;
    top: 2rem;
}

/* Tool Summary */
.tool-summary {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.tool-summary-image {
    width: 100px;
    height: 100px;
    border-radius: 0.75rem;
    object-fit: cover;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    flex-shrink: 0;
}

.tool-summary-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #9ca3af;
}

.tool-summary-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.tool-summary-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Plan Summary */
.plan-summary {
    padding: 2rem;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 0.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 1px solid #93c5fd;
}

.plan-summary h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e40af;
    margin-bottom: 1rem;
}

.plan-summary-price {
    font-size: 3rem;
    font-weight: 900;
    color: #2563eb;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.plan-summary p {
    color: #3b82f6;
    font-weight: 600;
}

/* Order Summary Rows */
.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 1rem;
}

.order-summary-row:last-of-type {
    border-bottom: none;
}

.order-summary-row.total {
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 2px solid #d1d5db;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.order-summary-row.total span:last-child {
    color: #2563eb;
    font-size: 1.75rem;
}

.tool-summary-price {
    font-size: 1.75rem;
    font-weight: 900;
    color: #2563eb;
}

/* What's Included Section */
.checkout-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkout-section ul li {
    padding: 0.75rem 0;
    color: #4b5563;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.checkout-section ul li:last-child {
    border-bottom: none;
}

.checkout-section ul li i {
    color: #10b981;
    font-size: 1.125rem;
}

/* Submit Button Enhanced */
.checkout-section form .btn-primary {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border: none;
    border-radius: 0.75rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.checkout-section form .btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4);
}

.checkout-section form .btn-primary:active {
    transform: translateY(0);
}

.checkout-section form .btn-primary i {
    font-size: 1.25rem;
}

/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Checkout Container - Dark Mode */
.dark-theme .checkout-container {
    background: transparent;
}

.dark-theme .checkout-container h1 {
    color: var(--text-primary, #ffffff);
    background: linear-gradient(135deg, #ffffff 0%, #F6E3A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Checkout Sections - Dark Mode */
.dark-theme .checkout-section {
    background: linear-gradient(135deg, rgba(30, 37, 80, 0.4) 0%, rgba(26, 32, 69, 0.5) 100%);
    border: 1px solid rgba(246, 227, 168, 0.1);
    box-shadow: 0 10px 40px rgba(32, 41, 116, 0.3);
    backdrop-filter: blur(10px);
}

.dark-theme .checkout-section .section-title {
    color: var(--text-primary, #ffffff);
    border-bottom-color: rgba(246, 227, 168, 0.1);
}

.dark-theme .checkout-section>div[style*="margin-bottom: 1rem"] {
    color: var(--text-secondary, #d1d5db);
}

.dark-theme .checkout-section>div[style*="margin-bottom: 1rem"] strong {
    color: var(--brand-accent-1, #F6E3A8);
}

/* Payment Gateway Options - Dark Mode */
.dark-theme .payment-gateway-option {
    background: linear-gradient(135deg, rgba(26, 32, 69, 0.4) 0%, rgba(30, 37, 80, 0.4) 100%);
    border: 1px solid rgba(246, 227, 168, 0.15);
    backdrop-filter: blur(10px);
}

.dark-theme .payment-gateway-option::before {
    background: linear-gradient(135deg, rgba(246, 227, 168, 0.08) 0%, rgba(237, 189, 89, 0.08) 100%);
}

.dark-theme .payment-gateway-option:hover {
    border-color: rgba(246, 227, 168, 0.3);
    box-shadow: 0 12px 32px rgba(32, 41, 116, 0.4);
}

.dark-theme .payment-gateway-option.selected {
    border-color: var(--brand-accent-2, #EDBD59);
    background: linear-gradient(135deg, rgba(32, 41, 116, 0.6) 0%, rgba(42, 53, 144, 0.6) 100%);
    box-shadow: 0 12px 32px rgba(237, 189, 89, 0.3);
}

.dark-theme .payment-gateway-option.selected::after {
    background: linear-gradient(135deg, var(--brand-accent-2, #EDBD59) 0%, var(--brand-accent-3, #E3BC17) 100%);
    color: #0f1224;
    box-shadow: 0 4px 16px rgba(237, 189, 89, 0.5);
}

.dark-theme .payment-gateway-option input[type="radio"] {
    accent-color: var(--brand-accent-2, #EDBD59);
}

.dark-theme .payment-gateway-option .payment-name {
    color: var(--text-primary, #ffffff);
}

.dark-theme .payment-gateway-option .payment-description {
    color: var(--text-secondary, #d1d5db);
}

/* Payment Info - Dark Mode */
.dark-theme .payment-info {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-left-color: rgba(34, 197, 94, 0.6);
}

.dark-theme .payment-info p {
    color: #86efac;
}

.dark-theme .payment-info i {
    color: #6ee7b7;
}

/* Security Badge - Dark Mode */
.dark-theme .security-badge {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
    border-color: rgba(34, 197, 94, 0.4);
}

.dark-theme .security-badge i {
    color: #6ee7b7;
}

.dark-theme .security-badge span {
    color: #86efac;
}

/* Tool Summary - Dark Mode */
.dark-theme .tool-summary {
    background: linear-gradient(135deg, rgba(26, 32, 69, 0.4) 0%, rgba(30, 37, 80, 0.4) 100%);
    border: 1px solid rgba(246, 227, 168, 0.1);
}

.dark-theme .tool-summary-image {
    background: linear-gradient(135deg, rgba(32, 41, 116, 0.3) 0%, rgba(26, 32, 69, 0.5) 100%);
}

.dark-theme .tool-summary-info h3 {
    color: var(--text-primary, #ffffff);
}

.dark-theme .tool-summary-info p {
    color: var(--text-muted, #9ca3af);
}

/* Plan Summary - Dark Mode */
.dark-theme .plan-summary {
    background: linear-gradient(135deg, rgba(32, 41, 116, 0.5) 0%, rgba(42, 53, 144, 0.5) 100%);
    border: 1px solid rgba(246, 227, 168, 0.2);
    backdrop-filter: blur(10px);
}

.dark-theme .plan-summary h3 {
    color: var(--brand-accent-1, #F6E3A8);
}

.dark-theme .plan-summary-price {
    background: linear-gradient(135deg, #F6E3A8 0%, #EDBD59 50%, #E3BC17 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(246, 227, 168, 0.3);
}

.dark-theme .plan-summary p {
    color: var(--text-secondary, #d1d5db);
}

/* Order Summary Rows - Dark Mode */
.dark-theme .order-summary-row {
    border-bottom-color: rgba(246, 227, 168, 0.1);
    color: var(--text-secondary, #d1d5db);
}

.dark-theme .order-summary-row.total {
    border-top-color: rgba(246, 227, 168, 0.2);
    color: var(--text-primary, #ffffff);
}

.dark-theme .order-summary-row.total span:last-child,
.dark-theme .tool-summary-price {
    background: linear-gradient(135deg, #F6E3A8 0%, #EDBD59 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* What's Included - Dark Mode */
.dark-theme .checkout-section ul li {
    color: var(--text-secondary, #d1d5db);
    border-bottom-color: rgba(246, 227, 168, 0.05);
}

.dark-theme .checkout-section ul li i {
    color: #6ee7b7;
}

/* Submit Button - Dark Mode */
.dark-theme .checkout-section form .btn-primary {
    background: linear-gradient(135deg, var(--brand-primary, #202974) 0%, rgba(42, 53, 144, 1) 100%);
    border: 1px solid var(--brand-accent-2, #EDBD59);
    box-shadow: 0 8px 32px rgba(32, 41, 116, 0.5);
}

.dark-theme .checkout-section form .btn-primary:hover {
    background: linear-gradient(135deg, rgba(42, 53, 144, 1) 0%, rgba(32, 41, 116, 1) 100%);
    border-color: var(--brand-accent-3, #E3BC17);
    box-shadow: 0 12px 48px rgba(237, 189, 89, 0.4);
}

/* Form Labels - Dark Mode */
.dark-theme .checkout-section label[style*="color: #111827"] {
    color: var(--text-primary, #ffffff) !important;
}

/* Headings - Dark Mode */
.dark-theme .checkout-section h4 {
    color: var(--text-primary, #ffffff);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .checkout-section:has(.tool-summary),
    .checkout-section:has(.plan-summary) {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        padding: 2rem 1rem;
    }

    .checkout-container h1 {
        font-size: 2rem;
    }

    .checkout-section {
        padding: 1.5rem;
    }

    .tool-summary {
        flex-direction: column;
        text-align: center;
    }

    .tool-summary-image {
        width: 120px;
        height: 120px;
    }

    .plan-summary-price {
        font-size: 2.5rem;
    }

    .payment-gateway-option {
        padding: 1rem;
    }

    .payment-gateway-option .payment-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .checkout-container h1 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .checkout-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .plan-summary {
        padding: 1.5rem;
    }

    .plan-summary-price {
        font-size: 2rem;
    }

    .order-summary-row.total span:last-child {
        font-size: 1.5rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkout-container {
    animation: fadeInUp 0.6s ease-out;
}

.checkout-section {
    animation: fadeInUp 0.6s ease-out backwards;
}

.checkout-section:nth-child(1) {
    animation-delay: 0.1s;
}

.checkout-section:nth-child(2) {
    animation-delay: 0.2s;
}

.checkout-section:nth-child(3) {
    animation-delay: 0.3s;
}

.payment-gateway-option {
    animation: fadeInUp 0.4s ease-out backwards;
}

.payment-gateway-option:nth-child(1) {
    animation-delay: 0.1s;
}

.payment-gateway-option:nth-child(2) {
    animation-delay: 0.2s;
}

.payment-gateway-option:nth-child(3) {
    animation-delay: 0.3s;
}