/* Checkout Page Styles - Matching Homepage Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.checkout-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.checkout-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
}

.language-dropdown {
    position: relative;
}

.language-current {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    gap: 8px;
    transition: all 0.2s;
}

.language-current:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.lang-arrow {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
    display: inline-block;
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 901;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-height: 300px;
    overflow-y: auto;
}

.language-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background: none;
    color: white;
    text-align: left;
    transition: background 0.2s;
    gap: 8px;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option.active {
    background: rgba(139, 92, 246, 0.2);
}

.lang-arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}

.lang-arrow.open {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    min-width: 200px;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.language-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
    width: 100%;
    text-align: left;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option.active {
    background: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
}

.favorite-star {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.favorite-star:hover {
    color: #FFD700;
}

.favorite-star.favorited {
    color: #FFD700;
}

.language-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.checkout-mascot {
    width: 75px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 20px rgba(139, 92, 246, 0.3));
}

.checkout-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6366F1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-display {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Content */
.checkout-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* License Info */
.license-info {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
}

.license-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-group input[type="email"]:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.form-group input[type="email"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.813rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Stripe Card Element Container */
#card-element {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

#card-element:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

#card-element.StripeElement--focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

#card-errors {
    margin-top: 8px;
    font-size: 0.875rem;
    color: #ff4444;
    min-height: 20px;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 14px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover:not(:disabled)::before {
    left: 100%;
}

#spinner {
    display: inline-block;
}

.hidden {
    display: none !important;
}

/* Secure Notice */
.secure-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.secure-notice img {
    opacity: 0.6;
}

/* Success/Error Messages */
#success-message,
#error-message {
    text-align: center;
    padding: 40px;
}

#success-message h2 {
    color: #8B5CF6;
    font-size: 1.75rem;
    margin-bottom: 16px;
}

#error-message h2 {
    color: #ff4444;
    font-size: 1.75rem;
    margin-bottom: 16px;
}

#success-message p,
#error-message p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 16px;
}

#success-email {
    color: #EC4899;
    font-weight: 600;
}

#error-message button {
    padding: 12px 24px;
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    color: #ff4444;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#error-message button:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* Footer */
.checkout-footer {
    margin-top: 20px;
    text-align: center;
    padding: 15px 0;
}

.checkout-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.checkout-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkout-footer a:hover {
    color: #8B5CF6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .checkout-container {
        padding: 20px;
    }
    
    .checkout-content {
        padding: 24px;
    }
    
    .checkout-header h1 {
        font-size: 1.5rem;
    }
    
    .price-display {
        font-size: 1.125rem;
    }
    
    button[type="submit"] {
        font-size: 1rem;
        padding: 14px 28px;
    }
}

/* Stripe Elements Custom Styling Override */
.StripeElement {
    background: transparent !important;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#spinner::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #0f0f1e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}