/* SnapIT Analytics - Auth Modal Styles */

/* Toast Notifications */
.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    max-width: 500px;
    font-size: 0.9375rem;
}

.toast.show {
    top: 2rem;
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-success i {
    color: #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-error i {
    color: #ef4444;
}

.toast.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast.toast-info i {
    color: #3b82f6;
}

.toast i {
    font-size: 1.25rem;
}

/* Auth Modal Base */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    display: flex;
    opacity: 1;
}

.auth-modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
}

.auth-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.auth-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.auth-modal-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 2rem;
    margin: 1.5rem 0 0;
    border-bottom: 2px solid #f3f4f6;
}

.tab-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: #374151;
}

.tab-btn.active {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

/* Tab Content */
.auth-modal-body {
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-helper {
    font-size: 0.8125rem;
    color: #6b7280;
}

.form-error {
    font-size: 0.8125rem;
    color: #ef4444;
    display: none;
}

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

.form-input.error ~ .form-error {
    display: block;
}

/* Buttons */
.auth-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
}

.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(118, 75, 162, 0.3);
}

.auth-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.auth-btn-secondary:hover:not(:disabled) {
    border-color: #764ba2;
    color: #764ba2;
}

.auth-btn-google {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.auth-btn-google:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-btn-google img {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Links */
.auth-link {
    color: #764ba2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #5d3a7e;
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Password Strength Indicator */
.password-strength {
    display: flex;
    gap: 0.375rem;
    height: 4px;
    margin-top: 0.5rem;
}

.password-strength-bar {
    flex: 1;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.password-strength-bar.active {
    background: #10b981;
}

.password-strength-bar.active.medium {
    background: #f59e0b;
}

.password-strength-bar.active.weak {
    background: #ef4444;
}

/* User Menu */
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-trigger:hover {
    border-color: #764ba2;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9375rem;
}

.user-name {
    font-weight: 600;
    color: #374151;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

.user-menu a:first-child {
    border-radius: 12px 12px 0 0;
}

.user-menu a:last-child {
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #f3f4f6;
}

.user-menu a:hover {
    background: #f9fafb;
    color: #764ba2;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-modal-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }

    .auth-modal-header,
    .auth-modal-body,
    .auth-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .auth-tabs {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .user-name {
        display: none;
    }

    .user-menu-trigger {
        padding: 0.5rem;
    }
}

/* Loading States */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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