/* --- LOGIN BUTTON (Global) --- */
.chaaya-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    background: #f5f5f5;
    color: #333;
}
.chaaya-auth-btn:hover { background: #e0e0e0; color: #004e92; }
.chaaya-auth-btn.logged-in { background: #e6f0fa; color: #004e92; }

/* --- POPUP OVERLAY --- */
.ch-login-overlay {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
body.ch-login-open .ch-login-overlay { opacity: 1; visibility: visible; }
body.ch-login-open { overflow: hidden; } /* Lock scroll */

.ch-login-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

/* --- MODAL BOX --- */
.ch-login-modal {
    position: relative; z-index: 100000;
    background: #fff; width: 100%; max-width: 420px;
    border-radius: 16px; padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: translateY(20px); transition: transform 0.3s ease;
}
body.ch-login-open .ch-login-modal { transform: translateY(0); }

.ch-login-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; font-size: 24px; cursor: pointer; color: #999;
}

/* --- CONTENT --- */
.ch-login-header { text-align: center; margin-bottom: 25px; }
.ch-login-logo { height: 50px; margin-bottom: 15px; }
.ch-login-header h3 { font-size: 22px; margin: 0 0 5px; color: #1a1a1a; }
.ch-login-header p { margin: 0; color: #666; font-size: 14px; }

/* Google Button */
.google-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 8px; background: #fff; color: #333;
    font-weight: 600; text-decoration: none; transition: background 0.2s;
}
.google-btn:hover { background: #f9f9f9; border-color: #ccc; }
.google-btn img { width: 18px; height: 18px; }

/* Divider */
.ch-login-divider {
    text-align: center; margin: 20px 0; border-bottom: 1px solid #eee; line-height: 0.1em;
}
.ch-login-divider span { background: #fff; padding: 0 10px; color: #999; font-size: 12px; }

/* Form */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input {
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; /* 5px radius */
    font-size: 14px; transition: border-color 0.2s;
    background-color: #fff; /* White background */
    color: #333; /* Dark text */
}
.form-group input:focus { border-color: #004e92; outline: none; }

/* Pass Toggle */
.pass-wrapper { position: relative; }
.toggle-pass {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    cursor: pointer; font-size: 14px; opacity: 0.5;
}

.form-actions {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; margin-bottom: 20px;
}
.lost-pass { color: #004e92; text-decoration: none; }

/* Submit */
.submit-btn {
    width: 100%; padding: 12px; background: #004e92; color: #fff;
    border: none; border-radius: 5px; /* 5px radius */ font-weight: 700; cursor: pointer;
    font-size: 15px; transition: background 0.2s;
}
.submit-btn:hover { background: #003366; }

/* Loader */
.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-loader {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid #fff; border-top-color: transparent;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

.ch-status-message {
    font-size: 13px; color: #d32f2f; background: #ffebee;
    padding: 10px; border-radius: 6px; display: none; text-align: center;
}

.ch-login-footer { text-align: center; margin-top: 20px; font-size: 14px; }
.ch-login-footer a { color: #004e92; font-weight: 600; text-decoration: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 480px) {
    .ch-login-modal { padding: 30px 20px; max-width: 90%; }
}