/* Login Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    max-width: 450px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: #666;
}

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

.modal-content {
    padding: 30px;
    font-family: 'YekanBakhFaNum2', sans-serif;
}

/* Login Form Styles */
.login-form-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Override search-container styles for login modal */
.login-form-container .search-container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.search-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.modal-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
    width: 100%;
}

.modal-title i {
    color: #3498db;
    font-size: 32px;
}

.modal-desc {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
    width: 100%;
}

/* Form Styles */
.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    width: 100%;
}

.form-group input {
    width: 95%;
    margin: 0 auto 10px auto;
    display: block;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'YekanBakhFaNum2', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
    text-align: center;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder {
    color: #bdc3c7;
}

/* Button Styles */
.btn {
    width: 95%;
    margin: 0 auto 0 auto;
    display: block;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'YekanBakhFaNum2', sans-serif;
    margin-top: 15px;
    text-align: center;
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

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

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

/* Error Messages */
.text-danger {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    display: block;
    text-align: center;
}

/* Link Styles */
.edit-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    justify-content: center;
}

.edit-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Success/Error Messages */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-box {
        width: 95vw;
        margin: 20px;
    }
    
    .modal-content {
        padding: 25px 20px;
    }
    
    .modal-title {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .modal-title i {
        font-size: 28px;
    }
    
    .form-group input {
        padding: 14px;
        font-size: 16px;
    }
    
    .btn {
        padding: 14px;
        font-size: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .login-form-container {
        color: #ecf0f1;
    }
    
    .modal-title {
        color: #ecf0f1;
        border-bottom-color: #34495e;
    }
    
    .form-group label {
        color: #ecf0f1;
    }
    
    .form-group input {
        border-color: #4a5f7a;
        color: blabk;
    }
    
    .form-group input:focus {
        border-color: #3498db;
    }
} 