/* assets/css/modal.css */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal-container {
    background: #fff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal-overlay.open .auth-modal-container {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: #333;
}

.auth-form-container {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form-container.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary); /* Uses variables.css */
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
}

/* Social Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-social:hover {
    background: #f7f7f7;
}

.auth-separator {
    margin: 20px 0;
    text-align: center;
    font-size: 12px;
    color: #999;
    position: relative;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #eee;
}

.auth-separator::before { left: 0; }
.auth-separator::after { right: 0; }

/* Form Inputs */
.input-group {
    margin-bottom: 15px;
}

.input-row {
    display: flex;
    gap: 10px;
}
.input-row .input-group {
    flex: 1;
}

.auth-modal-container input,
.auth-modal-container select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s;
}

.auth-modal-container input:focus,
.auth-modal-container select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.btn-auth-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Per user screenshot nice blue gradient */
    /* Or stick to brand? User said 'like the photo' which has blue/purple logic. 
       But current brand is Green. I'll stick to USER REQUESTED PHOTO STYLE mostly but maybe tweak to variable if needed.
       The photo shows a purple header and blue button. My existing site is Green.
       I should probably use my --gradient-brand (Green) to match MY site, but the user said "like the photo". 
       "The photo is only demonstrative". This means I should MAINTAIN my logic and style but use the layout.
       So I will use MY PRIMARY COLOR.
    */
    background: var(--color-primary); 
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: opacity 0.2s;
}

.btn-auth-submit:hover {
    opacity: 0.9;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.auth-footer a {
    color: var(--color-primary); /* was #7f5af0 in example */
    text-decoration: none;
    font-weight: 600;
}

.auth-message {
    font-size: 13px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 6px;
    display: none;
}
.auth-message.error {
    background: #fee2e2;
    color: #b91c1c;
    display: block;
}
.auth-message.success {
    background: #dcfce7;
    color: #15803d;
    display: block;
}
