/* Dropdown components */

/* Board dropdown menu - Hamburger menu style */
.board-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #131313;
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000002;
    min-width: 220px;
}

#whiteboardSwitcher:hover .board-dropdown {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.board-dropdown .list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 0 9px;
    margin: 0;
}

.board-dropdown .element {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ddd;
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.8rem;
    font-weight: 500;
}

.board-dropdown .element svg {
    width: 17px;
    height: 17px;
    transition: all 0.3s ease-out;
}

.board-dropdown .element .label {
    font-weight: 600;
    font-size: 0.8rem;
    margin: 0;
}

.board-dropdown .element:hover {
    background: #2a2a2a;
}

.board-dropdown .element:active {
    transform: scale(0.99);
}

.board-dropdown .element:hover svg {
    stroke: #ffffff;
}

/* Hide all separators in board dropdown */
.board-dropdown .separator,
.board-dropdown hr,
.board-dropdown [class*="separator"],
.board-dropdown [class*="divider"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}


/* Settings Menu popup - Hamburger menu style */
.settings-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #131313;
    border-radius: 12px;
    padding: 8px;
    z-index: 1000002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    flex-direction: column;
    min-width: 220px;
    display: flex;
}

.settings-container:hover .settings-menu {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.settings-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ddd;
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.80rem;
    font-weight: 500;
}

.settings-option:hover {
    background: #2a2a2a;
}

.settings-option.active {
    background: #2b2a2a;
    font-weight: 600;
}

.settings-option.separator {
    height: 1px;
    background: #2a2a2a;
    margin: 8px 0;
    padding: 0;
    cursor: default;
}

.settings-option.separator:hover {
    background: transparent;
}

/* Toggle indicator styling */
.toggle-indicator {
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.2s;
}

/* Customization submenu - Hamburger menu style */
.customization-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: #0a0a0a;
    border-radius: 8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 150px;
    pointer-events: none;
    z-index: 1001;
}

.customization-submenu::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 10px;
    height: 100%;
    background: transparent;
}

.settings-option.has-submenu {
    position: relative;
    padding-right: 2rem;
}

.settings-option.has-submenu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: -10px;
    bottom: 0;
    background: transparent;
    pointer-events: none;
}

.settings-option.has-submenu:hover .customization-submenu,
.customization-submenu:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease, visibility 0s;
}

.bg-option {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ddd;
    font-size: 0.75rem;
    user-select: none;
    white-space: nowrap;
}

.bg-option:hover {
    background: #2a2a2a;
}

.bg-option.active {
    background: #2b2a2a;
    font-weight: 600;
}

/* File structure dropdown - Hamburger menu style */
.file-structure-dropdown {
    position: absolute;
    left: 0;
    margin-top: 10px;
    width: 220px;
    background: #0a0a0a;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000002;
    max-height: 400px;
    overflow-y: auto;
    pointer-events: auto;
}

.file-structure-container:hover .file-structure-dropdown,
.file-structure-dropdown:hover {
    opacity: 1;
    visibility: visible;
}

.file-structure-list {
    padding: 16px;
    margin: 0;
    list-style: none;
}

.file-structure-list li {
    padding: 10px 12px;
    color: #ddd;
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.80rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
}

.file-structure-list li:hover {
    background: #2a2a2a;
}

.file-structure-list li.board-item {
    font-weight: 600;
}

.file-structure-list li.category-item {
    padding-left: 32px;
}

.file-structure-list li.header-item {
    padding-left: 32px;
    color: #6b7280;
}

.file-structure-list li.card-item {
    padding-left: 52px;
    font-size: 11px;
    color: #9ca3af;
}

.file-structure-list li.active {
    background-color: rgba(83, 83, 255, 0.2);
    color: #bd89ff;
}

/* Add dropdown styles - Board selector style */
.add-dropdown-container {
    position: relative;
}

.add-button {
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-button .dropdown-arrow {
    margin-left: 4px;
}

.add-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #131313;
    border-radius: 9px;
    padding: 14px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000002;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.add-dropdown-container:hover .add-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    width: calc(100% - 18px);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 6px;
    margin: 0 9px;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-out;
    color: #7e8590;
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: left;
    height: auto;
    justify-content: flex-start;
}

.dropdown-item:hover {
    background-color: #5353ff;
    color: #ffffff;
}

.dropdown-item:active {
    transform: scale(0.99);
}

/* Light mode dropdown overrides */
.light-mode .board-dropdown {
    background: #FFFFFF;
    border: 1px solid #F5F7FB;
}

.light-mode .settings-menu {
    background: #FFFFFF;
    border: 1px solid #F5F7FB;
}

.light-mode .customization-submenu {
    background: #FFFFFF;
    border: 1px solid #F5F7FB;
}

.light-mode .file-structure-dropdown {
    background: #FFFFFF;
    border: 1px solid #F5F7FB;
}

.light-mode .add-dropdown-menu {
    background: #FFFFFF;
    border: 1px solid #F5F7FB;
}

.light-mode .dropdown-item {
    color: #7f7f7f;
}

.light-mode .dropdown-item:hover {
    background-color: #F5F7FB;
    color: #7f7f7f;
}
