/* Dropdown components */

/* Board dropdown menu */
.board-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #000000;
    border-radius: 9px;
    padding: 14px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    flex-direction: column;
    gap: 9px;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.4);
    z-index: 1000002;
    min-width: 180px;
}

#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;
    color: #7e8590;
    gap: 9px;
    transition: all 0.3s ease-out;
    padding: 4px 6px;
    border-radius: 5px;
    cursor: pointer;
}

.board-dropdown .element svg {
    width: 17px;
    height: 17px;
    transition: all 0.3s ease-out;
}

.board-dropdown .element .label {
    font-weight: 600;
    font-size: 12px;
    margin: 0;
}

.board-dropdown .element:hover {
    background-color: #5353ff;
    color: #ffffff;
    transform: translate(1px, -1px);
}

.board-dropdown .element:active {
    transform: scale(0.99);
}

.board-dropdown .element:hover svg {
    stroke: #ffffff;
}

.board-dropdown .element.active {
    background-color: rgba(83, 83, 255, 0.2);
    color: #bd89ff;
}

.board-dropdown .separator {
    border-top: 1.5px solid #42434a;
    margin: 0;
}


/* Settings Menu popup */
.settings-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #000;
    border-radius: 0.36rem;
    padding: 0.9rem;
    z-index: 1000002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    flex-direction: column;
    gap: 0.72rem;
    box-shadow: 0 0.45rem 0.9rem rgba(143, 142, 142, 0.15);
    min-width: 180px;
    display: flex;
}

.settings-container:hover .settings-menu {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.settings-option {
    padding: 0.72rem;
    border-radius: 0.27rem;
    cursor: pointer;
    transition: background 0.2s;
    color: #ddd;
    font-size: 0.81rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-option:hover {
    background: #2b2a2a;
}

.settings-option.active {
    background: #2b2a2a;
    font-weight: 600;
}

.settings-option.separator {
    border-top: 1px solid #2b2a2a;
    margin: 0.36rem 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 */
.customization-submenu {
    position: absolute;
    left: calc(100% + 2px);
    top: -0.9rem;
    background: #000;
    border-radius: 0.36rem;
    padding: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s 0.3s;
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    box-shadow: 0 0.45rem 0.9rem rgba(143, 142, 142, 0.15);
    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;
    transform: translateX(0);
    pointer-events: auto;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}

.bg-option {
    padding: 0.72rem;
    border-radius: 0.27rem;
    cursor: pointer;
    transition: background 0.2s;
    color: #ddd;
    font-size: 0.81rem;
    user-select: none;
    white-space: nowrap;
}

.bg-option:hover {
    background: #2b2a2a;
}

.bg-option.active {
    background: #2b2a2a;
    font-weight: 600;
}

/* File structure dropdown */
.file-structure-dropdown {
    position: absolute;
    left: 0;
    margin-top: 10px;
    width: 220px;
    background: #000000;
    border-radius: 9px;
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.4);
    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: 6px 12px;
    color: #7e8590;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease-out;
    border-radius: 5px;
    margin: 2px 0;
}

.file-structure-list li:hover {
    background-color: #5353ff;
    color: #ffffff;
    transform: translate(1px, -1px);
}

.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 */
.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: #000;
    border-radius: 0.36rem;
    padding: 0.9rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 0.45rem 0.9rem rgba(143, 142, 142, 0.15);
    z-index: 1000002;
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.add-dropdown-container:hover .add-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.72rem;
    background: transparent;
    border: none;
    color: #ddd;
    text-align: left;
    cursor: pointer;
    border-radius: 0.27rem;
    transition: all 0.2s;
    font-size: 0.81rem;
    height: auto;
    gap: 0.5rem;
    justify-content: flex-start;
}

.dropdown-item:hover {
    background-color: #5353ff;
    color: #ffffff;
    transform: translate(1px, -1px);
}

.dropdown-item:active {
    transform: scale(0.99);
}

/* Light mode dropdown styles */
.light-mode .add-dropdown-menu {
    background: #fff;
    border: 1px solid #e5e7eb;
}

.light-mode .dropdown-item {
    color: #333;
}

.light-mode .dropdown-item:hover {
    background-color: #5353ff;
    color: #ffffff;
}
