/* HQV Core - Shared styles */

/* Password toggle wrapper */
.password-wrapper {
    position: relative !important;
    display: block !important;
    width: 100%;
}

/* Fix input-group flex-wrap for password fields */
.input-group:has(.password-wrapper) {
    flex-wrap: unset !important;
}

/* Keep password input styling when type changes to text */
.password-wrapper input.password-input {
    padding-right: 45px !important;
    width: 100% !important;
}

/* Ensure .password-input inherits password field appearance */
input.password-input[type="text"] {
    -webkit-text-security: none;
}

.password-toggle {
    position: absolute !important;
    right: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 8px !important;
    margin: 0 !important;
    color: #6c757d;
    opacity: 0.6;
    transition: opacity 0.2s;
    z-index: 10 !important;
    line-height: 1;
    height: auto;
    min-height: 0;
}

.password-toggle:hover {
    opacity: 1;
    background: transparent !important;
}

.password-toggle:focus,
.password-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Password toggle icon using Roundcube's font */
.password-toggle:before {
    content: "\f06e"; /* eye icon */
    font-family: Icons;
    font-weight: 400;
    font-size: 14px;
}

.password-toggle.showing:before {
    content: "\f070"; /* eye-slash icon */
}

/* Back button z-index fix */
.back-list-button,
.back-sidebar-button {
    z-index: 100;
    position: relative;
}

/* Hide footer navigation for HQV plugins on mobile */
@media (max-width: 768px) {
    .task-domainadmin .content-frame-navigation,
    .task-superadmin .content-frame-navigation,
    .task-settings .content-frame-navigation,
    .task-domainadmin .footer.toolbar,
    .task-superadmin .footer.toolbar {
        display: none !important;
    }
}

/* ---- Threaded message list: flat "conversation line" instead of stair-step
   indent. In widescreen layout app.js stamps inline
   "padding-left: N !important" on td.subject of every thread child (root rows
   have no inline padding) - hqv_core.js overrides calculate_thread_padding()
   to a constant 20px, and these rules draw a vertical connector line with a
   node dot in that padding area so replies read as one related line. ---- */
.messagelist td.subject[style*="padding-left"] {
    position: relative;
}

/* vertical connector line (full row height so consecutive rows read as one line) */
.messagelist td.subject[style*="padding-left"]::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    border-left: 2px solid #c9d2d9;
}

/* node dot centered on the line */
.messagelist td.subject[style*="padding-left"]::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    margin-top: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aab6bf;
}

html.dark-mode .messagelist td.subject[style*="padding-left"]::before {
    border-left-color: #4d5a63;
}

html.dark-mode .messagelist td.subject[style*="padding-left"]::after {
    background: #5d6c76;
}
