/* Customer Login Modal CSS */

/* Modal Overlay */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Content */
.login-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.login-modal.show .login-modal-content {
    transform: scale(1);
}

/* Modal Header */
.login-modal-header {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.login-modal-close {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-modal-close:hover {
    background: white;
    color: #333;
    transform: scale(1.1);
}

/* Login Steps */
.login-step {
    display: none;
}

.login-step.active {
    display: block;
}

/* Login Hero Section */
.login-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.login-landmarks {
    display: flex;
    justify-content: space-around;
    align-items: center;
    opacity: 0.3;
    margin-bottom: 20px;
}

.landmark {
    font-size: 2rem;
    color: white;
    animation: float 3s ease-in-out infinite;
}

.landmark:nth-child(2) { animation-delay: 0.5s; }
.landmark:nth-child(3) { animation-delay: 1s; }
.landmark:nth-child(4) { animation-delay: 1.5s; }
.landmark:nth-child(5) { animation-delay: 2s; }
.landmark:nth-child(6) { animation-delay: 2.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Login Content */
.login-content {
    padding: 30px;
}

.login-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.login-content > p {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
}

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

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.login-form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.login-btn-primary {
    width: 100%;
    background: #4f46e5;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.login-btn-primary:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.login-btn-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-btn-google {
    width: 100%;
    background: white;
    color: #333;
    border: 2px solid #e1e5e9;
    padding: 15px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.login-btn-google:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-2px);
}

.login-btn-google i {
    font-size: 1.1rem;
    color: #ea4335;
}

/* Divider */
.login-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.login-divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 0.9rem;
    position: relative;
}

/* Checkbox */
.login-checkbox {
    margin-bottom: 25px;
}

.login-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.login-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.login-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #4f46e5;
    border-color: #4f46e5;
}

.login-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Stats Section */
.login-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.login-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 500;
}

.login-stat-item i {
    color: #10b981;
    font-size: 1.1rem;
}

.login-recent-activity {
    color: #666;
    font-size: 0.9rem;
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

/* Footer */
.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
}

.login-footer a {
    color: #4f46e5;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Verification Step */
.verification-content {
    padding: 40px 30px;
    text-align: center;
}

.verification-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.verification-content > p {
    color: #666;
    margin-bottom: 8px;
}

.verification-email {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.verification-note {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 20px;
}

.change-email-btn {
    background: none;
    border: none;
    color: #4f46e5;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 30px;
    transition: color 0.3s ease;
}

.change-email-btn:hover {
    color: #4338ca;
}

.verification-form-group {
    margin-bottom: 25px;
}

.verification-form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: #333;
}

.verification-form-group input {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.verification-form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.resend-code-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 20px;
    transition: color 0.3s ease;
}

.resend-code-btn:hover {
    color: #4f46e5;
}

.resend-code-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .login-modal-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .login-content {
        padding: 20px;
    }
    
    .verification-content {
        padding: 30px 20px;
    }
    
    .login-landmarks {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .landmark {
        font-size: 1.5rem;
    }
    
    .login-content h2,
    .verification-content h2 {
        font-size: 1.5rem;
    }
}

/* Loading States */
.login-btn-primary.loading {
    position: relative;
    color: transparent;
}

.login-btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Login Alerts */
.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

.login-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.login-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.login-alert i {
    font-size: 1rem;
    flex-shrink: 0;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Alert Popup */
.custom-alert-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

.custom-alert-popup.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert-content {
    background: white;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    padding: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
    max-height: 90vh;
    position: relative;
}

.custom-alert-popup.show .custom-alert-content {
    transform: scale(1);
}

.custom-alert-header {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.custom-alert-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.custom-alert-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 8px;
}

.custom-alert-subtitle {
    font-size: 0.9rem;
    color: #d97706;
    margin: 0;
    font-weight: 500;
}

.custom-alert-body {
    padding: 24px;
    text-align: center;
    max-height: 50vh;
    overflow-y: auto;
}

.custom-alert-message {
    font-size: 1rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 24px;
}

.custom-alert-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-alert-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.custom-alert-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.custom-alert-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    color: white;
}

.custom-alert-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.custom-alert-btn-secondary:hover {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-2px);
}

.custom-alert-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
    font-size: 14px;
}

.custom-alert-close:hover {
    background: white;
    color: #374151;
    transform: scale(1.1);
}

/* Order Required Alert Specific Styles */
.order-required-alert .custom-alert-header {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.order-required-alert .custom-alert-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.order-required-alert .custom-alert-title {
    color: #92400e;
}

.order-required-alert .custom-alert-subtitle {
    color: #d97706;
}

/* Success Alert Styles */
.success-alert .custom-alert-header {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.success-alert .custom-alert-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.success-alert .custom-alert-title {
    color: #065f46;
}

.success-alert .custom-alert-subtitle {
    color: #059669;
}

/* Error Alert Styles */
.error-alert .custom-alert-header {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.error-alert .custom-alert-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.error-alert .custom-alert-title {
    color: #991b1b;
}

.error-alert .custom-alert-subtitle {
    color: #dc2626;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .custom-alert-content {
        width: 95%;
        margin: 20px;
    }
    
    .custom-alert-actions {
        flex-direction: column;
    }
    
    .custom-alert-btn {
        width: 100%;
        justify-content: center;
    }
}
