/**
 * FCA Custom Menus - Shortcuts Sidebar
 *
 * Narrow, icon-based shortcuts sidebar — left side, like VS Code's activity bar.
 * Uses FC CSS variables throughout.
 *
 * @package FCA\CustomMenus
 */

:root {
    --fca-sc-width: 48px;
}

/* Desktop only */
@media (min-width: 769px) {

#fca-custom-menus-shortcuts.fca-sc-sidebar {
    position: fixed;
    left: 0;
    top: var(--fcom-header-height, 60px);
    bottom: 0;
    width: var(--fca-sc-width);
    background: var(--fcom-light-bg, #f5f5f5);
    border-right: 1px solid var(--fcom-primary-border, #e4e6eb);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    z-index: 100;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.fca-sc-sidebar::-webkit-scrollbar { width: 4px; }
.fca-sc-sidebar::-webkit-scrollbar-track { background: transparent; }
.fca-sc-sidebar::-webkit-scrollbar-thumb { background: var(--fcom-primary-border, #e4e6eb); border-radius: 2px; }

/* Item */
.fca-sc-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
    text-decoration: none;
    color: var(--fcom-menu-text, #65676b);
    font-size: 18px;
    background: transparent;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.fca-sc-item:hover {
    background: var(--fcom-text-link, #1877f2);
    color: #fff;
}

.fca-sc-item:focus-visible {
    outline: 2px solid var(--fcom-text-link, #1877f2);
    outline-offset: 2px;
}

/* Toggle button */
.fca-sc-toggle {
    margin-bottom: 4px;
}

.fca-sc-toggle[aria-pressed="true"] {
    background: var(--fcom-text-link, #1877f2);
    color: #fff;
}

/* Unpinned items - at top */
.fca-sc-unpinned {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

/* Pinned items container - at bottom */
.fca-sc-pinned {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding-bottom: 12px;
}

/* Divider between sections */
.fca-sc-divider {
    width: 24px;
    height: 1px;
    background: var(--fcom-primary-border, #e4e6eb);
    margin: 8px 0;
    flex-shrink: 0;
}

/* Icon */
.fca-sc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    line-height: 1;
    color: inherit;
}

.fca-sc-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* Tooltip */
.fca-sc-item[title]::after {
    content: attr(title);
    position: absolute;
    left: calc(var(--fca-sc-width) - 4px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--fcom-light-bg, #f5f5f5);
    border: 1px solid var(--fcom-primary-border, #e4e6eb);
    color: var(--fcom-primary-text, #050505);
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    transition-delay: 0s;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.fca-sc-item:hover::after {
    opacity: 1;
    transition-delay: 0.5s;
}

/* Layout shift for sidebar */
.fhr_home .feed_layout > .spaces,
.fluent_com .feed_layout > .spaces {
    margin-left: var(--fca-sc-width) !important;
}

/* Layout shift for portal content */
.fhr_home #fluent_com_portal,
.fluent_com #fluent_com_portal {
    margin-left: var(--fca-sc-width) !important;
}

/* Header padding */
.fhr_wrap .fcom_top_menu,
.fluent_com .fcom_top_menu {
    padding-left: var(--fca-sc-width);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fca-sc-item { transition: none; }
}

} /* end desktop media query */

/* Mobile - hide entirely */
@media (max-width: 768px) {
    #fca-custom-menus-shortcuts.fca-sc-sidebar { display: none !important; }

    .fhr_home .feed_layout > .spaces,
    .fluent_com .feed_layout > .spaces { margin-left: 0 !important; }

    .fhr_home #fluent_com_portal,
    .fluent_com #fluent_com_portal { margin-left: 0 !important; }

    .fhr_wrap .fcom_top_menu,
    .fluent_com .fcom_top_menu { padding-left: 0 !important; }
}
