/* =============================================== */
/* COMPONENTS / AUTH-POPUP.CSS
   Login/Register popup stilleri
/* =============================================== */

.auth-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-popup-overlay[style*="display: flex"] {
    opacity: 1;
}

.auth-popup {
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================ */
/* HEADER */
/* ============================================ */

.auth-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
    flex: 1;
}

.auth-tab {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.auth-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-tab i {
    font-size: 14px;
}

.close-popup {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 10px;
    flex-shrink: 0;
}

.close-popup:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transform: rotate(90deg);
}

/* ============================================ */
/* FORM */
/* ============================================ */

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.form-group {
    margin-bottom: 18px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.form-group-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input {
    width: auto;
    margin: 0;
}

.remember-me label {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* ============================================ */
/* BUTTONS */
/* ============================================ */

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: #e9ecef;
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: white;
    padding: 0 10px;
    color: #999;
    font-size: 14px;
}

.auth-google-btn {
    width: 100%;
    padding: 12px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-google-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

.auth-google-btn i {
    color: #dd4b39;
    font-size: 18px;
}

/* ============================================ */
/* TERMS AGREEMENT */
/* ============================================ */

.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}

.terms-agreement input {
    width: auto;
    margin-top: 3px;
}

.terms-agreement label {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.terms-agreement a {
    color: #667eea;
    text-decoration: none;
}

.terms-agreement a:hover {
    text-decoration: underline;
}

/* ============================================ */
/* SCROLLBAR */
/* ============================================ */

.auth-popup::-webkit-scrollbar {
    width: 6px;
}

.auth-popup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.auth-popup::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.auth-popup::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */

@media (max-width: 768px) {
    .auth-popup {
        padding: 20px;
        width: 95%;
        max-height: 90vh;
    }
    
    .auth-tab {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .auth-tab i {
        display: none;
    }
    
    .form-group-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-popup {
        padding: 15px;
    }
    
    .auth-popup-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .auth-tabs {
        gap: 5px;
    }
    
    .auth-tab {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
    
    .auth-submit-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* ============================================ */
/* DARK MODE */
/* ============================================ */

body.dark-mode .auth-popup {
    background: #1a1a1a;
}

body.dark-mode .auth-popup-header {
    border-bottom-color: #333;
}

body.dark-mode .auth-tabs {
    background: #2a2a2a;
}

body.dark-mode .auth-tab {
    color: #999;
}

body.dark-mode .auth-tab.active {
    background: #333;
    color: #8fb996;
}

body.dark-mode .close-popup {
    color: #999;
}

body.dark-mode .close-popup:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-mode .form-group label {
    color: #e0e0e0;
}

body.dark-mode .form-group input {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .form-group input:focus {
    border-color: #8fb996;
    box-shadow: 0 0 0 3px rgba(143, 185, 150, 0.2);
}

body.dark-mode .remember-me label {
    color: #ccc;
}

body.dark-mode .forgot-password {
    color: #8fb996;
}

body.dark-mode .auth-divider::before,
body.dark-mode .auth-divider::after {
    background: #404040;
}

body.dark-mode .auth-divider span {
    background: #1a1a1a;
    color: #999;
}

body.dark-mode .auth-google-btn {
    background: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-mode .auth-google-btn:hover {
    background: #333;
}

body.dark-mode .terms-agreement label {
    color: #ccc;
}

body.dark-mode .terms-agreement a {
    color: #8fb996;
}

