/* Checkout Modal */
.aethera-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.aethera-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.aethera-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.aethera-modal-overlay.active .aethera-modal {
    transform: scale(1) translateY(0);
}

.aethera-modal-header {
    padding: 32px 32px 0;
    text-align: center;
}

.aethera-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.aethera-modal-header p {
    color: #718096;
    margin: 8px 0 0;
    font-size: 15px;
}

.aethera-modal-body {
    padding: 24px 32px;
}

.aethera-form-group {
    margin-bottom: 20px;
}

.aethera-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.aethera-form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.aethera-form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.aethera-form-group input.error {
    border-color: #ef4444;
}

.aethera-coupon-section {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.aethera-coupon-section input {
    flex: 1;
}

.aethera-coupon-section button {
    padding: 14px 20px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.aethera-coupon-section button:hover {
    background: #e5e7eb;
}

.aethera-coupon-applied {
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aethera-price-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.aethera-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.aethera-price-row.total {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    border-top: 2px solid #e5e7eb;
    padding-top: 12px;
    margin-bottom: 0;
}

.aethera-submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.aethera-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.aethera-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.aethera-modal-footer {
    padding: 0 32px 32px;
    text-align: center;
}

.aethera-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
    margin-top: 16px;
}

.aethera-security-note svg {
    width: 16px;
    height: 16px;
    color: #10b981;
}

.aethera-close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.aethera-close-modal:hover {
    background: #e5e7eb;
}

/* Anti-spam notice */
.aethera-spam-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 20px;
}

/* Success state */
.aethera-success-state {
    text-align: center;
    padding: 40px 20px;
}

.aethera-success-icon {
    width: 64px;
    height: 64px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.aethera-success-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.aethera-success-state p {
    color: #718096;
    margin: 0;
}

/* Error state */
.aethera-error-state {
    text-align: center;
    padding: 40px 20px;
}

.aethera-error-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #ef4444;
}

.aethera-error-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
}

.aethera-error-state p {
    color: #ef4444;
    margin: 0 0 20px;
}

.aethera-retry-btn {
    padding: 14px 32px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}

.aethera-retry-btn:hover {
    background: #e5e7eb;
}

/* Mobile optimizations */
@media screen and (max-width: 480px) {
    .aethera-modal {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        position: fixed;
        bottom: 0;
    }

    .aethera-modal-header {
        padding: 24px 24px 0;
    }

    .aethera-modal-body {
        padding: 20px 24px;
    }

    .aethera-modal-footer {
        padding: 0 24px 24px;
    }
}

/* Instagram/WhatsApp browser fixes */
@supports (-webkit-touch-callout: none) {
    .aethera-modal {
        -webkit-overflow-scrolling: touch;
    }
}
