/* ================================================
   Now Login Widget — Popup AJAX + Dropdown
================================================ */

/* ── WRAPPER ── */
.nlw-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ── BOTÃO TRIGGER ── */
.nlw-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 6px 0;
    transition: color .2s;
    white-space: nowrap;
}
.nlw-trigger:hover { color: var(--color-primary, #f5a623); }
.nlw-trigger svg   { flex-shrink: 0; }

/* Avatar (estado logado) */
.nlw-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary, #f5a623);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.nlw-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

.nlw-chevron {
    transition: transform .2s;
    margin-left: 2px;
}
.nlw-trigger[aria-expanded="true"] .nlw-chevron { transform: rotate(180deg); }

/* ── DROPDOWN (logado) ── */
.nlw-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid #e4e7ee;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    padding: 6px 0;
    z-index: 9999;
    animation: nlwDropIn .15s ease;
}
@keyframes nlwDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.nlw-dropdown[hidden] { display: none; }

.nlw-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: background .15s, color .15s;
    cursor: pointer;
}
.nlw-dd-item:hover { background: #f7f8fa; color: var(--color-primary, #f5a623); }
.nlw-dd-item svg   { flex-shrink: 0; color: #aaa; }
.nlw-dd-item:hover svg { color: var(--color-primary, #f5a623); }

.nlw-dd-separator {
    height: 1px;
    background: #f0f2f5;
    margin: 4px 0;
}
.nlw-dd-item--logout { color: #e53935; }
.nlw-dd-item--logout:hover { background: #fff5f5; color: #c62828; }
.nlw-dd-item--logout svg { color: #e53935; }

/* ── MODAL OVERLAY ── */
.nlw-modal {
    position: fixed;
    inset: 0;
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.nlw-modal[hidden] { display: none; }

.nlw-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
    animation: nlwFadeIn .2s ease;
}
@keyframes nlwFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── CAIXA DO MODAL ── */
.nlw-modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    padding: 36px 32px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: nlwSlideUp .22s ease;
    z-index: 1;
}
@keyframes nlwSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nlw-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f4f5f7;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: background .2s, color .2s;
}
.nlw-modal-close:hover { background: #ebebeb; color: #111; }

/* Logo / Nome do site */
.nlw-modal-logo {
    text-align: center;
    margin-bottom: 16px;
}
.nlw-logo-img { max-height: 48px; width: auto; }
.nlw-site-name { font-size: 18px; font-weight: 800; color: #222; }

.nlw-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 22px;
}

/* ── FORMULÁRIO ── */
.nlw-form { display: flex; flex-direction: column; gap: 14px; }

.nlw-field-row { display: flex; flex-direction: column; gap: 5px; }

.nlw-field-row label {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.nlw-input {
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    border: 1.5px solid #dde1ea;
    border-radius: 8px;
    background: #f9fafc;
    color: #222;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
    box-sizing: border-box;
}
.nlw-input:focus {
    border-color: var(--color-primary, #f5a623);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245,166,35,.12);
}

/* Campo senha com botão ver */
.nlw-pw-wrap { position: relative; }
.nlw-pw-wrap .nlw-input { padding-right: 42px; }
.nlw-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color .15s;
}
.nlw-toggle-pw:hover { color: #555; }

/* Lembrar / esqueci */
.nlw-row-remember {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}
.nlw-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.nlw-forgot {
    font-size: 12px;
    color: var(--color-link, #1a6db5);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.nlw-forgot:hover { text-decoration: underline; }

/* Subtítulo dos popups (recuperar senha) */
.nlw-modal-subtitle {
    text-align: center;
    font-size: 13px;
    color: #777;
    margin: -6px 0 16px;
}

/* Mensagem de erro/sucesso */
.nlw-msg {
    font-size: 13px;
    border-radius: 7px;
    padding: 10px 14px;
    background: #fff5f5;
    border: 1px solid #fcc;
    color: #c62828;
    line-height: 1.4;
}
.nlw-msg[hidden] { display: none; }
.nlw-msg--success { background: #f1fff4; border-color: #a5d6a7; color: #2e7d32; }

/* Botão de submit */
.nlw-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    background: var(--color-primary, #f5a623);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    width: 100%;
}
.nlw-submit:hover  { background: #e09515; transform: translateY(-1px); }
.nlw-submit:active { transform: translateY(0); }
.nlw-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* Link criar conta */
.nlw-register-link {
    text-align: center;
    font-size: 13px;
    color: #777;
    margin: 4px 0 0;
}
.nlw-register-link a { color: var(--color-link, #1a6db5); text-decoration: none; font-weight: 600; }
.nlw-register-link a:hover { text-decoration: underline; }
.nlw-link-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    color: var(--color-link, #1a6db5);
    text-decoration: none;
    font-weight: 600;
    font-size: inherit;
}
.nlw-link-btn:hover { text-decoration: underline; }

/* ── MOBILE ── */
@media (max-width: 480px) {
    .nlw-modal-box { padding: 28px 18px 22px; }
    .nlw-modal-title { font-size: 17px; }
}

/* Item com destaque (ex: Sair) � cor de alerta */
.nlw-dd-item--highlight {
    color: #e53935 !important;
}
.nlw-dd-item--highlight svg {
    color: #e53935 !important;
}
.nlw-dd-item--highlight:hover {
    background: #fff5f5 !important;
    color: #c62828 !important;
}
