/* ============================================
   🎨 PREMIUM PAYMENT FORM - 2025 LYNQ Design
   Stripe Payment Element with A+ UX
   ============================================ */

/* 🎯 CHECKOUT SECTION - UNIFIED WIDTH WITH PLAN SELECTION */
.checkout-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* 💳 PAYMENT CARD WRAPPER - PROMINENT CONTAINER */
.payment-card-wrapper {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

/* Flowing gradient top accent */
.payment-card-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        rgba(59, 130, 246, 0) 0%,
        rgba(59, 130, 246, 0.8) 50%,
        rgba(59, 130, 246, 0) 100%);
    animation: paymentBorderFlow 3s ease-in-out infinite;
}

@keyframes paymentBorderFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Payment Card Header - Clear Label */
.payment-card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.payment-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
    letter-spacing: -0.025em;
}

.payment-card-header p {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* 💳 PAYMENT ELEMENT CONTAINER - PROMINENT & CLEAR */
.payment-element-clean {
    margin-bottom: 24px;
    padding: 28px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 250, 252, 0.95) 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: visible;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Flowing gradient top border on focus */
.payment-element-clean::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        rgba(59, 130, 246, 0) 0%,
        rgba(59, 130, 246, 0.8) 50%,
        rgba(59, 130, 246, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-element-clean:focus-within::before {
    opacity: 1;
    animation: paymentBorderFlow 2s ease-in-out infinite;
}

/* Stripe iframe styling - make it more visible */
.payment-element-clean iframe {
    min-height: 80px !important;
    background: white !important;
    border: none !important;
}

/* Payment element label styling */
.payment-element-clean .StripeElement {
    padding: 16px 0 !important;
    font-size: 16px !important;
    color: #1f2937 !important;
    line-height: 1.6 !important;
}

/* Focus state for payment element */
.payment-element-clean:focus-within {
    border-color: #3b82f6;
    box-shadow:
        0 8px 24px rgba(59, 130, 246, 0.15),
        0 4px 12px rgba(59, 130, 246, 0.1);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(239, 246, 255, 0.98) 100%);
    transform: translateY(-1px);
}

/* Payment element label - make it prominent */
.payment-element-clean label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Card number field - extra visibility */
.payment-element-clean [data-testid="card-number-field"],
.payment-element-clean [data-testid="card-expiry-field"],
.payment-element-clean [data-testid="card-cvc-field"] {
    padding: 14px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    background: white !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

/* Placeholder text - make it visible */
.payment-element-clean::placeholder {
    color: #9ca3af !important;
    font-size: 14px !important;
}

/* Input focus state */
.payment-element-clean [data-testid="card-number-field"]:focus,
.payment-element-clean [data-testid="card-expiry-field"]:focus,
.payment-element-clean [data-testid="card-cvc-field"]:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Loading State */
.payment-loading {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* Trust Badges - Inline Below Payment Form */
.trust-badges-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: rgba(249, 250, 251, 0.5);
    border-radius: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.trust-badge-item svg {
    color: #10b981;
    flex-shrink: 0;
}

.trust-badge-item:last-child {
    color: #9ca3af;
}

.trust-badge-item:last-child svg {
    color: #635BFF;
}

/* Submit Button - Clean Design */
.checkout-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.checkout-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.checkout-submit:active {
    transform: translateY(0);
}

.checkout-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-text {
    flex: 1;
    text-align: left;
}

.submit-price {
    font-size: 18px;
    font-weight: 700;
}

/* Development Mode Section */
.dev-payment-section {
    margin-top: 20px;
    padding: 16px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    text-align: center;
}

.dev-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
}

.dev-payment-btn {
    padding: 10px 20px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.dev-payment-btn:hover {
    background: #d97706;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Stack checkout section on tablet */
    .checkout-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .order-summary {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    /* Mobile optimization */
    .checkout-section {
        margin: 24px auto;
        padding: 0 16px;
    }
    
    .payment-card-wrapper {
        padding: 24px;
    }
    
    .payment-element-clean {
        padding: 20px;
        min-height: 120px;
    }
    
    .trust-badges-inline {
        gap: 12px;
    }
    
    .trust-badge-item {
        font-size: 11px;
    }
    
    .checkout-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .submit-price {
        font-size: 16px;
    }
    
    .order-summary {
        padding: 20px;
        margin-bottom: 24px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .checkout-submit {
        transition: none !important;
    }
}