/* ============================================================
   ACCOUNT.CSS — auth widget (#account-widget), sits in .main-header
   alongside the existing search controls.
   ============================================================ */

#account-widget {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.account-open-btn {
    background: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: #334155;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.account-open-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.account-signed-in {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.account-email {
    color: #334155;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-link-btn {
    background: none;
    border: none;
    color: #357d90;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.account-link-btn:hover {
    color: #2a6474;
}

.account-form {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 6000;
    width: 260px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.account-form-title {
    margin: 0 0 0.2rem 0;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}

.account-form input {
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
}

.account-form input:focus {
    border-color: #357d90;
}

.account-submit-btn {
    background-color: #357d90;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.account-submit-btn:hover {
    background-color: #2a6474;
}

.account-form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.account-cancel-btn {
    color: #64748b;
    text-decoration: none;
    align-self: flex-start;
}

.account-form-error {
    margin: 0;
    color: #b91c1c;
    font-size: 0.8rem;
}

.account-form-info {
    margin: 0;
    color: #15803d;
    font-size: 0.8rem;
}

@media screen and (max-width: 600px) {
    .account-form {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        border-radius: 16px 16px 0 0;
    }

    .account-email {
        max-width: 90px;
    }
}
