/**
 * Auth Modal CSS
 * Modern glassmorphism login/register modal
 */

/* ============================================
   MODAL OVERLAY
   ============================================ */

.almk-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.almk-auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */

.almk-auth-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.almk-auth-overlay.active .almk-auth-modal {
    transform: translateY(0) scale(1);
}

/* Close Button */
.almk-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #6b7280;
    transition: all 0.2s;
}

.almk-auth-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

/* ============================================
   HEADER
   ============================================ */

.almk-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.almk-auth-logo {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.almk-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.almk-auth-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ============================================
   SOCIAL BUTTONS
   ============================================ */

.almk-social-buttons {
    margin-bottom: 1.5rem;
}

.almk-btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s;
}

.almk-btn-google:hover {
    border-color: #4285f4;
    background: #f8fafc;
}

.almk-btn-google svg {
    width: 20px;
    height: 20px;
}

/* Divider */
.almk-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.875rem;
}

.almk-auth-divider::before,
.almk-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ============================================
   TABS
   ============================================ */

.almk-auth-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.almk-auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.almk-auth-tab.active {
    background: #fff;
    color: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FORM STYLES
   ============================================ */

.almk-auth-form {
    display: none;
}

.almk-auth-form.active {
    display: block;
}

.almk-form-group {
    margin-bottom: 1rem;
}

.almk-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.almk-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    color: #1f2937;
    background: #fff;
    transition: all 0.2s;
    box-sizing: border-box;
}

.almk-form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.almk-form-input::placeholder {
    color: #9ca3af;
}

.almk-form-input.error {
    border-color: #ef4444;
}

/* ============================================
   BUTTONS
   ============================================ */

.almk-btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.almk-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.almk-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   MESSAGES
   ============================================ */

.almk-auth-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

.almk-auth-message.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.almk-auth-message.success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ============================================
   FOOTER LINKS
   ============================================ */

.almk-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.almk-auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.almk-auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   LOADING STATE
   ============================================ */

.almk-btn-primary.loading {
    position: relative;
    color: transparent;
}

.almk-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: almk-spin 0.8s linear infinite;
}

@keyframes almk-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .almk-auth-modal {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .almk-auth-title {
        font-size: 1.25rem;
    }

    .almk-form-input,
    .almk-btn-primary,
    .almk-btn-google {
        padding: 0.75rem 1rem;
    }
}