/* Minimized modals (global) */

/* Hide legacy dashboard FAB (links are exposed via mmMinimizedLauncher) */
#quick-fab {
    display: none !important;
}

/* Launcher wrapper (default bottom center) */
#mmMinimizedLauncher {
    position: fixed;
    z-index: 2050;
}

/* Vertical Positions */
#mmMinimizedLauncher.mm-pos-bottom {
    bottom: 12px;
}

#mmMinimizedLauncher.mm-pos-top {
    top: 60px;
    /* Below navbar typically */
}

/* Horizontal Positions */
#mmMinimizedLauncher.mm-pos-left {
    left: 20px;
    transform: none;
}

#mmMinimizedLauncher.mm-pos-center {
    left: 50%;
    transform: translateX(-50%);
}

#mmMinimizedLauncher.mm-pos-right {
    right: 20px;
    left: auto;
    transform: none;
}

/* Round button */
#mmLauncherBtn.mm-launcher-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: visible;
}

#mmLauncherBtn.mm-launcher-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

#mmLauncherBtn.mm-launcher-btn i {
    font-size: 20px;
    transition: transform 0.4s ease;
}

#mmMinimizedLauncher.mm-open #mmLauncherBtn i {
    transform: rotate(180deg);
}

/* Count badge */
#mmLauncherBtn .mm-count {
    position: absolute;
    top: -4px;
    right: -4px;
    border: 2px solid #fff;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* List/Bar relative position adjustment */
#mmMinimizedLauncher #minimizedBar {
    position: absolute;
    z-index: 2050;
    display: none;
    max-height: 80vh;
    padding: 2px;
}

/* Adjust Bar position based on Launcher vertical */
#mmMinimizedLauncher.mm-pos-bottom #minimizedBar {
    bottom: 62px;
}

#mmMinimizedLauncher.mm-pos-top #minimizedBar {
    top: 62px;
}

/* Adjust Bar horizontal centering if needed */
#mmMinimizedLauncher.mm-pos-center #minimizedBar {
    left: 50%;
    transform: translateX(-50%);
}

#mmMinimizedLauncher.mm-pos-left #minimizedBar {
    left: 0;
}

#mmMinimizedLauncher.mm-pos-right #minimizedBar {
    right: 0;
}

/* Two columns container */
#mmMinimizedLauncher .mm-inner-container {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

#mmMinimizedLauncher.mm-pos-top .mm-inner-container {
    align-items: flex-start;
}

/* Styles variations */

/* --- DARK MODERNE --- */
#mmMinimizedLauncher.mm-style-dark #mmLauncherBtn {
    background: #222 !important;
    border: 1px solid #444;
    color: #e0e0e0;
}

#mmMinimizedLauncher.mm-style-dark .minimized-item {
    background: #1a1a1a;
    border-color: #333;
    color: #eee;
}

#mmMinimizedLauncher.mm-style-dark .minimized-item:hover {
    background: #2a2a2a;
}

#mmMinimizedLauncher.mm-style-dark .mini-title {
    color: #bbb;
}

/* --- MINIMALISTE --- */
#mmMinimizedLauncher.mm-style-minimal #mmLauncherBtn {
    background: white !important;
    border: 1px solid #eee;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#mmMinimizedLauncher.mm-style-minimal #mmLauncherBtn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

#mmMinimizedLauncher.mm-style-minimal .minimized-item {
    border: none;
    border-bottom: 1px solid #fafafa;
    border-radius: 4px;
    box-shadow: none;
    transition: background 0.2s;
}

#mmMinimizedLauncher.mm-style-minimal .minimized-item:hover {
    background: #f9f9f9;
}

#mmMinimizedLauncher.mm-style-minimal #minimizedBar {
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 10px;
}

/* --- GLASSMORPHISM --- */
#mmMinimizedLauncher.mm-style-glass #mmLauncherBtn {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#mmMinimizedLauncher.mm-style-glass #mmLauncherBtn:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#mmMinimizedLauncher.mm-style-glass #minimizedBar {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

#mmMinimizedLauncher.mm-style-glass .minimized-item {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
    transition: all 0.3s ease;
}

#mmMinimizedLauncher.mm-style-glass .minimized-item:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

#mmMinimizedLauncher.mm-style-glass .mini-icon {
    opacity: 0.9;
}

#mmMinimizedLauncher.mm-style-glass .mini-title {
    font-weight: 500;
}

#mmMinimizedLauncher .mm-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 75vh;
    overflow-y: auto;
    padding: 4px;
}

/* Titles for columns (optional, keeping it clean for now) */
/* #mmQuickMenu::before { content: 'Menu Principale'; font-size: 11px; opacity: 0.7; color: #fff; text-align: center; } */

/* Show list on hover (desktop) or when toggled open (mobile) */
#mmMinimizedLauncher:hover #minimizedBar,
#mmMinimizedLauncher.mm-open #minimizedBar {
    display: flex;
}

/* Items */

#minimizedBar .minimized-item {
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    max-width: 340px;
}

/* Quick links inside the same list */
#minimizedBar a.minimized-item {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

#minimizedBar a.minimized-item:hover,
#minimizedBar a.minimized-item:focus {
    text-decoration: none;
}

#minimizedBar .minimized-item .mini-title {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

#minimizedBar .minimized-item .mini-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

html[dir="rtl"] #minimizedBar .minimized-item .mini-actions {
    margin-left: 0;
    margin-right: auto;
}

#minimizedBar .minimized-item .mini-actions button {
    padding: 4px 6px;
}

#minimizedBar .minimized-item .mini-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
}

#minimizedBar .minimized-item .mini-icon img {
    max-width: 28px;
    max-height: 28px;
    display: block;
}

#minimizedBar .minimized-item .mini-icon i {
    font-size: 16px;
}

/* Keep injected header buttons aligned nicely without overriding all .modal-header styles */
.modal-minimize-btn.mm-header-btn {
    margin-right: 6px;
}

html[dir="rtl"] .modal-minimize-btn.mm-header-btn {
    margin-right: 0;
    margin-left: 6px;
}