/* ==========================================================
   Custom Styles — Hell Red Dark Theme for SnappyMail
   ========================================================== */

/* ---- Login form background (no transparency) ---- */
.LoginView form {
    background: #1a0e04 !important;
    border: 1px solid rgba(255, 0, 0, 0.35) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7) !important;
}

.LoginView form * {
    color: #e09090 !important;
}

.LoginView input {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 0, 0, 0.3) !important;
    color: #fff !important;
}

.LoginView input:focus,
.LoginView input:hover {
    border-color: #ff0000 !important;
}

.LoginView input::placeholder {
    color: rgba(255, 200, 120, 0.5) !important;
}

.LoginView .buttonLogin {
    background: linear-gradient(135deg, #cc0000, #ff0000) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.LoginView .buttonLogin:hover {
    background: linear-gradient(135deg, #ff0000, #ff3333) !important;
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.4) !important;
}

.LoginView .e-checkbox,
.LoginView .e-checkbox * {
    color: #d46a6a !important;
}

/* ---- Sidebar panel background ---- */
#rl-left {
    background: #120504 !important;
    border-right: 1px solid rgba(255, 45, 45, 0.45) !important;
    box-shadow: 4px 0 22px rgba(0, 0, 0, 0.65) !important;
    opacity: 1 !important;
}

/* ---- Message list (tengah) background ---- */
#rl-right .messageList {
    background: #130705 !important;
}

/* ---- Content / reading pane (kanan) background ---- */
#rl-right {
    background: #110604 !important;
}

#rl-right .b-content {
    background: #110604 !important;
}

/* ---- Top toolbar background ---- */
#rl-right .messageList .b-toolbar,
#rl-right .b-toolbar {
    background: #1a0706 !important;
    border-bottom: 1px solid rgba(255, 45, 45, 0.38) !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
}

/* ---- Message view background ---- */
.messageView {
    background: #0f0803 !important;
}

/* ---- Overall body/app background ---- */
#rl-app {
    background: #080402 !important;
}

/* ---- Toolbar ---- */
.b-folders .b-toolbar {
    background: #1a0706 !important;
    border-bottom: 1px solid rgba(255, 45, 45, 0.35) !important;
    padding: 12px 10px !important;
    opacity: 1 !important;
}

/* ---- Content area ---- */
.b-folders .b-content {
    background: #130705 !important;
    color: #d46a6a !important;
    padding: 8px 0 !important;
    opacity: 1 !important;
}

/* ---- Folder links (expanded) ---- */
.b-folders li a {
    background-color: #180706 !important;
    color: #d46a6a !important;
    border: 1px solid rgba(255, 45, 45, 0.2) !important;
    margin: 3px 8px !important;
    border-radius: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    transition: all 0.22s ease !important;
    position: relative !important;
    opacity: 1 !important;
}

.b-folders li a.selectable:hover {
    background: #240909 !important;
    color: #ff7a7a !important;
    border-color: rgba(255, 45, 45, 0.45) !important;
}

.b-folders li a.selectable.selected {
    background: #2a0b0b !important;
    color: #ff5b5b !important;
    border-color: rgba(255, 30, 30, 0.7) !important;
    font-weight: 600 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 30, 30, 0.45) !important;
}

.focused .b-folders a.focused {
    background: #2a0b0b !important;
    color: #ff9999 !important;
    border-color: rgba(255, 30, 30, 0.75) !important;
}

.b-folders li a.selectable.droppableHover {
    background: rgba(255, 0, 0, 0.25) !important;
    color: #ffcccc !important;
}

/* ---- Unread badge ---- */
.b-folders .b-folders-system a[data-unread]::after,
.b-folders .b-folders-user a[data-unread]:not(.system)::after {
    background: linear-gradient(135deg, #cc0000, #ff0000) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 6px rgba(255, 0, 0, 0.45) !important;
    border: none !important;
    padding: 1px 5px !important;
}

/* ---- System folders ---- */
.b-folders .b-folders-system a {
    font-weight: 600 !important;
}

/* ---- Disabled folders ---- */
.b-folders li a:not(.selectable) {
    color: #7a6040 !important;
    opacity: 0.55 !important;
}

/* ---- Collapsed/Expanded signs ---- */
.b-folders li a .e-collapsed-sign {
    color: #a07840 !important;
    transition: color 0.22s ease !important;
}

.b-folders li a:hover .e-collapsed-sign {
    color: #ff6666 !important;
}

/* ---- Footer ---- */
.b-folders .b-footer {
    background: #1a0706 !important;
    border-top: 1px solid rgba(255, 45, 45, 0.35) !important;
    padding: 10px !important;
    opacity: 1 !important;
}

.b-folders .b-footer .btn {
    color: #d46a6a !important;
    transition: color 0.22s ease !important;
}

.b-folders .b-footer .btn:hover {
    color: #ff3333 !important;
}

/* ---- Flag icon ---- */
.b-folders .flag-icon::after {
    color: #c93030 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4) !important;
}

.b-folders .is-flagged .flag-icon::after {
    color: #ff3333 !important;
    text-shadow: 0 0 6px rgba(255, 50, 50, 0.5) !important;
}

/* ---- Toggle button: hidden, sidebar always open ---- */
.toggleLeft {
    display: none !important;
}

/* ---- Scrollbar ---- */
.b-folders .b-content::-webkit-scrollbar {
    width: 4px !important;
}

.b-folders .b-content::-webkit-scrollbar-track {
    background: transparent !important;
}

.b-folders .b-content::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.25) !important;
    border-radius: 2px !important;
}

.b-folders .b-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.45) !important;
}

/* ---- Compose button ---- */
.b-folders .buttonCompose {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.45), rgba(255, 0, 0, 0.55)) !important;
    border: 1px solid rgba(255, 40, 40, 0.6) !important;
    border-radius: 8px !important;
    color: #ffd8d8 !important;
    transition: all 0.22s ease !important;
    min-height: 38px !important;
    line-height: 1.2 !important;
    opacity: 1 !important;
}

.b-folders .buttonCompose:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.6), rgba(255, 0, 0, 0.72)) !important;
    border-color: rgba(255, 35, 35, 0.8) !important;
    color: #ff9999 !important;
    box-shadow: 0 2px 14px rgba(255, 0, 0, 0.35) !important;
}

/* ---- Contacts button ---- */
.b-folders .buttonContacts {
    color: #d46a6a !important;
    transition: color 0.22s ease !important;
}

.b-folders .buttonContacts:hover {
    color: #ff3333 !important;
}

/* ---- HR divider ---- */
.b-folders hr {
    border-color: rgba(255, 0, 0, 0.1) !important;
    margin: 6px 12px !important;
}


/* ---- Force sidebar always visible ---- */
html.rl-left-panel-disabled #rl-left {
    width: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
}

html.rl-left-panel-disabled #rl-left .b-content {
    opacity: 1 !important;
    overflow: visible !important;
}

#rl-right .b-toolbar .btn,
#rl-right .messageList .b-toolbar .btn {
    background: #240909 !important;
    border: 1px solid rgba(255, 45, 45, 0.38) !important;
    color: #ff8e8e !important;
    opacity: 1 !important;
}

#rl-right .b-toolbar .btn:hover,
#rl-right .messageList .b-toolbar .btn:hover {
    background: #2d0b0b !important;
    border-color: rgba(255, 45, 45, 0.65) !important;
    color: #ffd1d1 !important;
}

@keyframes refresh-glow {
    0% {
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 0, 0, 0.45);
        transform: translateY(-1px);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
        transform: translateY(0);
    }
}

#V-MailMessageList .buttonAutoRefresh {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #ff9a9a !important;
    border: 1px solid rgba(255, 0, 0, 0.35) !important;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.16), rgba(255, 0, 0, 0.25)) !important;
    border-radius: 8px !important;
    animation: refresh-glow 1.25s ease-in-out infinite !important;
}

#V-MailMessageList .buttonAutoRefresh .refreshText {
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
}

#V-MailMessageList .buttonAutoRefresh .icon-spinner {
    border-top-color: #ff7b7b !important;
}

#V-MailMessageList .buttonAutoRefresh.is-refreshing .icon-spinner.not-animated {
    border-color: transparent !important;
    border-top-color: #ff7b7b !important;
    animation: rotation 0.8s linear infinite !important;
}

#V-Settings-About .rl-logo {
    background-image: url("/logo-baru.png") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
