/* auth.css — dropdown-based auth UI */

/* Container: center-aligned in footer area */
.auth-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

.auth-buttons-wrapper {
    display: flex;
    gap: 12px;
}

.auth-trigger-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Segoe UI", system-ui, sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.auth-trigger-btn.login-btn {
    background-color: #f8f9fa;
    color: #555;
    border: 1px solid #ddd;
}

.auth-trigger-btn.login-btn:hover {
    background-color: #e9ecef;
    color: #333;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.auth-trigger-btn.register-btn {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.auth-trigger-btn.register-btn:hover {
    background-color: #d0e7ff;
    border-color: #aed1f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.auth-trigger-btn:focus-visible {
    outline: 2px solid #aeb5bc;
    outline-offset: 2px;
}

/* ── Dropdown panel ── */
.auth-dropdown {
    position: absolute;
    bottom: 100%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    z-index: 1000;
    width: 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    display: none;
}

.auth-dropdown.open {
    display: block;
}

/* ── Heading ── */
.auth-heading {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* ── Form ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.auth-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.auth-field input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

/* ── Password wrapper (for toggle overlay) ── */
.auth-password-wrapper {
    position: relative;
}

.auth-password-wrapper input {
    padding-right: 38px;
}

.auth-password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #888;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.auth-password-toggle:hover {
    color: #555;
}

.auth-password-toggle:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 1px;
    border-radius: 2px;
}

/* ── Hint text ── */
.auth-hint {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* ── Submit button ── */
.auth-submit-btn {
    padding: 9px 14px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
}

.auth-submit-btn:hover:not(:disabled) {
    background-color: #45a049;
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-submit-btn:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}



/* ── Messages ── */
.auth-error {
    color: #e55a50;
    font-size: 13px;
    margin: 0;
    min-height: 0;
}

.auth-success {
    color: #4CAF50;
    font-size: 13px;
    margin: 0;
}

/* ── Logged-in state ── */
.auth-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.auth-user-email {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-logout-btn {
    padding: 4px 12px;
    background-color: #e55a50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.auth-logout-btn:hover {
    background-color: #d04a40;
}

.auth-logout-btn:focus-visible {
    outline: 2px solid #e55a50;
    outline-offset: 2px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .auth-container {
        margin-top: 40px;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .auth-dropdown {
        width: calc(100% - 20px);
        max-width: 300px;
        border-radius: 8px;
        box-sizing: border-box;
    }
}
