/*======css*/
.custom-auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px 0;
    box-sizing: border-box;
}

.custom-auth-container {
    position: relative;
    background-color: #fff;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: auto;
}

.custom-auth-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.tab-button {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
    background-color: #fff;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
}

.auth-form {
    display: none;
    padding: 30px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

/* Added styling for checkbox and its label */
.form-group label[for="remember-me"] {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.form-group label[for="remember-me"] input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-top: 0;
    vertical-align: middle;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.auth-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-button:hover {
    background-color: #0069d9;
}

.form-links {
    text-align: center;
    margin-top: 15px;
}

.form-links a {
    color: #007bff;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

.auth-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.auth-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive adjustments for tablets */
@media (max-width: 992px) {
    .custom-auth-container {
        max-width: 90%;
        margin: 0 auto;
    }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .custom-auth-modal {
        padding: 10px 0;
    }
    
    .custom-auth-container {
        max-width: 95%;
        margin: 0 auto;
        border-radius: 8px;
        min-height: auto;
    }
    
    .auth-form {
        padding: 20px;
        max-height: calc(100vh - 100px);
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-button {
        font-size: 14px;
        padding: 12px 10px;
    }
    
    .close-modal {
        font-size: 20px;
        top: 8px;
        right: 10px;
    }
}

/* Responsive adjustments for small mobile devices */
@media (max-width: 480px) {
    .custom-auth-modal {
        padding: 0;
    }
    
    .custom-auth-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .auth-form {
        padding: 15px;
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }
    
    .custom-auth-tabs {
        flex-shrink: 0;
    }
    
    .tab-button {
        font-size: 13px;
        padding: 10px 5px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .auth-button {
        padding: 10px;
        font-size: 14px;
    }
    
    .auth-form h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* Extra small devices */
@media (max-width: 320px) {
    .auth-form {
        padding: 10px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .auth-button {
        padding: 8px;
        font-size: 13px;
    }
    
    .auth-form h3 {
        font-size: 16px;
    }
}