/* ---------------------------------------------------------------------------
 * Affinite Header Account — public styles
 * ------------------------------------------------------------------------- */

.header-account-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.header-account-inner {
    position: relative;
}

.header-account-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1E2727 !important;
    text-decoration: none;
    cursor: pointer;
}

.header-account-link:hover {
    text-decoration: none;
}

.header-account-link .header-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #1E2727;
}

.header-account-link .header-account-icon svg,
.header-account-link .header-account-icon img {
    display: block;
    width: 100%;
    height: 100%;
}

.header-account-link .header-account-label {
    line-height: 1;
}

/* Mobile: hide label, enlarge icon. Keep label accessible for screen readers. */
@media only screen and (max-width: 1024px) {
    .header-account-link .header-account-label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .header-account-link .header-account-icon,
    .header-account-link .header-account-icon svg,
    .header-account-link .header-account-icon img {
        width: 20px;
        height: 20px;
    }
}

/* ---------------------------------------------------------------------------
 * Login popup (guest mode)
 * ------------------------------------------------------------------------- */

.header-account-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-account-modal[hidden] {
    display: none;
}

.header-account-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.header-account-modal__dialog {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 36px 28px 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    color: #1E2727;
}

.header-account-modal__close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #1E2727;
    padding: 4px 8px;
}

.header-account-modal__close:hover {
    color: #000;
}

.header-account-modal__title {
    margin: 0 0 16px;
    font-size: 1.25rem;
    text-align: center;
}

.header-account-modal__form p {
    margin: 0 0 12px;
}

.header-account-modal__form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
}

.header-account-modal__form .input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d4d8;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.header-account-modal__form .input:focus {
    outline: none;
    border-color: #1E2727;
    box-shadow: 0 0 0 2px rgba(30, 39, 39, 0.15);
}

.header-account-modal__form .login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.header-account-modal__form .button {
    width: 100%;
    padding: 11px;
    background: #1E2727;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.header-account-modal__form .button:hover {
    background: #000;
}

.header-account-modal__actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 13px;
}

.header-account-modal__actions a {
    color: #1E2727;
    text-decoration: underline;
}

body.header-account-modal-open {
    overflow: hidden;
}
