/* Modal Styles for Login/Forgot Password/Register */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Modal Body */
.modal-body {
    padding: 20px;
}

/* Form Styles */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

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

/* Button Styles */
.modal-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.modal-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.modal-button:active {
    transform: translateY(0);
}

.modal-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.modal-button-secondary {
    background-color: #6c757d;
}

.modal-button-secondary:hover {
    background-color: #545b62;
}

/* Link Styles */
.modal-links {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.modal-links a {
    color: #007bff;
    text-decoration: none;
}

.modal-links a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

.error-message.active {
    display: block;
}

/* Success Message */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: none;
}

.success-message.active {
    display: block;
}

/* Social Login */
.social-login {
    margin: 20px 0;
    text-align: center;
}

.social-login p {
    color: #666;
    margin-bottom: 15px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #ddd;
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #bbb;
    transform: translateY(-2px);
}

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

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

/* Responsive Design */
@media (max-width: 480px) {
    .modal-container {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-button {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Animation for form elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-body .form-group,
.modal-body .modal-button,
.modal-body .modal-links,
.modal-body .social-login {
    animation: fadeInUp 0.5s ease forwards;
}

.modal-body .form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.modal-body .form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.modal-body .form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.modal-body .modal-button {
    animation-delay: 0.4s;
}

.modal-body .modal-links {
    animation-delay: 0.5s;
}

.modal-body .social-login {
    animation-delay: 0.6s;
}