/* Bookmark Destination Selector Modal */
.bookmark-destination-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000000;
    align-items: center;
    justify-content: center;
}

.bookmark-destination-modal.active {
    display: flex;
}

.bookmark-destination-content {
    background: #1a1a1a;
    border-radius: 12px;
    width: 450px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.bookmark-destination-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bookmark-destination-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-family: 'Nunito', sans-serif;
}

.bookmark-preview {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    background: #0f0f0f;
}

.bookmark-preview-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.bookmark-preview-url {
    color: #7e8590;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-destination-tree {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Reuse hamburger menu tree styles */
.bookmark-destination-tree .file-tree {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
}

.bookmark-destination-tree ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bookmark-destination-tree li {
    margin: 2px 0;
}

.bookmark-destination-tree details {
    cursor: pointer;
    user-select: none;
}

.bookmark-destination-tree summary {
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    color: #9ca3af;
}

.bookmark-destination-tree summary:hover {
    background: #2a2a2a;
    color: #fff;
}

.bookmark-destination-tree .folder-icon,
.bookmark-destination-tree .file-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.bookmark-destination-tree .card-item {
    padding: 6px 10px 6px 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #7e8590;
}

.bookmark-destination-tree .card-item:hover {
    background: #5353ff;
    color: #fff;
    transform: translateX(2px);
}

.bookmark-destination-tree .card-item.selected {
    background: #5353ff;
    color: #fff;
}

.bookmark-destination-tree .item-count {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.6;
}

.bookmark-destination-footer {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.bookmark-destination-footer button {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.bookmark-destination-cancel {
    background: #333;
    color: #fff;
}

.bookmark-destination-cancel:hover {
    background: #444;
}

.bookmark-destination-add {
    background: #5353ff;
    color: #fff;
}

.bookmark-destination-add:hover {
    background: #4343ee;
}

.bookmark-destination-add:disabled {
    background: #555;
    opacity: 0.5;
    cursor: not-allowed;
}