/* =========================================
   LAYER 6: COMPONENTS -> NAVIGATION
   Radiant Rail & Mobile Dock
   ========================================= */

/* --- 1. RADIANT RAIL (Desktop Side Nav) --- */
.nav-rail {
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    z-index: 1020;
    height: 100vh;
    position: sticky;
    top: 0;
}

.r-logo-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    min-height: 50px;
    max-height: 50px;
    object-fit: contain;
    margin-bottom: 30px;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: grayscale(100%) opacity(0.4);
    transform: scale(0.95);
    display: block;
}

.r-logo-img:hover {
    filter: grayscale(0%) opacity(1) drop-shadow(0 5px 15px rgba(46, 255, 113, 0.3));
    transform: scale(1.05);
}

.nav-rail-item {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: #ccc;
    margin-bottom: 25px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    text-decoration: none;
}

.nav-rail-item:hover {
    color: var(--color-accent);
    background: rgba(0, 0, 0, 0.03);
}

.nav-rail-item.active {
    background: #252A34;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Tooltip Hint */
.hint {
    position: absolute;
    left: 50px;
    background: #252A34;
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    white-space: nowrap;
    z-index: 100;
}

.nav-rail-item:hover .hint {
    opacity: 1;
}

/* Create Trigger */
.nav-create-trigger {
    background: transparent !important;
    font-size: 2.5rem;
    color: #ccc;
    box-shadow: none !important;
    padding-bottom: 5px;
}

.nav-create-trigger:hover {
    transform: scale(1.1);
    color: var(--color-accent);
    background: transparent;
}

/* Secondary Menu Trigger */
.secondary-menu-trigger {
    position: relative;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0 !important;
    /* Override default margin */
}

/* Secondary Dropdown */
.secondary-dropdown {
    position: absolute;
    left: 60px;
    /* To the right of the rail */
    bottom: 20px;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    /* Firefox */
    width: 240px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom left;
    transition: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.secondary-dropdown.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Menu Items */
.sm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    color: #444;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.1s;
}

.sm-item:hover {
    background: #f5f5f7;
    color: #111;
}

.sm-icon {
    width: 20px;
    text-align: center;
    color: #888;
}

.sm-item:hover .sm-icon {
    color: var(--color-accent);
    /* Orange/Brand color */
}

.sm-item.text-danger {
    color: #ff3b30;
}

.sm-item.text-danger:hover {
    background: #fff2f1;
}

.sm-item.text-danger .sm-icon {
    color: #ff3b30;
}

/* Responsive Visibility (Matches hot.html 1024px breakpoint) */
@media (max-width: 1023px) {
    .nav-rail {
        display: none;
    }
}

/* --- PREMIUM WELCOME FLASH TOAST (Global Overlay) --- */
.premium-welcome-message {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    /* Elegant Pill shape */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
    padding: 12px 24px 12px 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 340px;
    max-width: 90vw;
    animation: slideDownToast 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
    color: #111;
}

.premium-welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f8f9fa;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.premium-welcome-icon svg {
    width: 24px;
    height: 24px;
}

.premium-welcome-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.premium-welcome-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.premium-welcome-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Force the parent CakePHP flash container to NOT break CSS grid layouts */
div.message:has(.premium-welcome-message) {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 99999;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

@keyframes slideDownToast {
    0% {
        opacity: 0;
        transform: translate(-50%, -40px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}