/* =========================
   SIGNUP OVERLAY & POPUP
========================= */

.visu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

.visu-popup {
    background: #ffffff;
    width: 100%;
    max-width: 560px;
    border-radius: 18px;
    font-family: inherit;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =========================
   HEADER
========================= */

.visu-headers {
    background: #f3f8ff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.visu-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.visu-close {
    background: none;
    border: 1px solid #000;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    color: #000;
    border-radius: 6px;
}

/* =========================
   BODY
========================= */

.visu-body {
    padding: 26px;
    overflow-y: auto;
    flex: 1;
}

.visu-body h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.visu-body p {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 15px;
}

/* =========================
   FORM FIELDS
========================= */

.visu-field {
    margin-bottom: 16px;
}

.visu-field label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}

.visu-input {
    position: relative;
    border: none;
    padding: 12px 0px;
}

.visu-input span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.visu-input input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    outline: none;
}

.visu-input input:focus {
    border-color: #5c7fff;
}

/* =========================
   LAYOUT
========================= */

.visu-rows {
    display: flex;
    gap: 12px;
}

.visu-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin: 16px 0;
    line-height: 1.4;
}

/* =========================
   BUTTONS & TEXT
========================= */

.visu-btn {
    width: 100%;
    background: #5b7cff !important;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.visu-btn:hover {
    background: #4a6df5;
}

.visu-note {
    text-align: center;
    margin-top: 10px;
    color: #6b7280;
    font-size: 14px;
}

.visu-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0;
    color: #9ca3af;
    font-size: 14px;
}

.visu-divider::before,
.visu-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.visu-footer {
    text-align: center;
    font-size: 14px;
}

.visu-footer a {
    color: #5b7cff;
    text-decoration: none;
}

.visu-open-popup {
    background: #5b7cff;
    color: #ffffff;
    padding: 14px 26px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px) {
    .visu-popup {
        max-height: 95vh;
        border-radius: 14px;
    }

    .visu-header {
        padding: 16px 18px;
    }

    .visu-body {
        padding: 20px;
    }

    .visu-body h2 {
        font-size: 20px;
    }

    .visu-row {
        flex-direction: column;
        gap: 16px;
    }

    .visu-input input {
        padding: 12px 12px 12px 42px;
    }
}

@media (max-width: 900px) {
    .visu-popup {
        max-width: 92%;
    }
}

/* =========================
   LOGIN OVERLAY & POPUP
========================= */

.visu-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

.visu-login-popup {
    background: #ffffff;
    width: 100%;
    max-width: 560px;
    border-radius: 18px;
    font-family: inherit;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.visu-login-header {
    background: #f3f8ff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.visu-login-logo img {
    height: 34px;
    width: auto;
    display: block;
}

.visu-login-close {
    background: none;
    border: 1px solid #000;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    color: #000;
    border-radius: 6px;
}

.visu-login-body {
    padding: 26px;
    overflow-y: auto;
    flex: 1;
}

.visu-login-field {
    margin-bottom: 16px;
}

.visu-login-field label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}

.visu-login-input {
    position: relative;
}

.visu-login-input span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.visu-login-input input {
    width: 100%;
    padding: 14px 44px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    outline: none;
}

.visu-login-btn {
    width: 100%;
    background: #5b7cff;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    cursor: pointer;
}

.visu-login-open {
    background: #ffffff;
    color: #111827;
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.visu-logout-link {
    background: #ffffff;
    color: #111827;
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   VISU POPUP SAFETY FALLBACK
========================= */

.visu-overlay.is-active,
.visu-login-overlay.is-active {
    display: flex;
}

/* =========================
   PASSWORD VISIBILITY TOGGLE
========================= */

.visu-login-input {
    position: relative;
}

/* override the generic span rule */
.visu-login-input .toggle-password {
    left: 15px;
    /* right: 14px; */
    z-index: 5;
    cursor: pointer;
    pointer-events: auto;
}

.visu-login-input .toggle-password i {
    font-size: 16px;
    color: #9ca3af;
}

.visu-login-input .toggle-password:hover i {
    color: #5b7cff;
}
