/**
 * EasyDesktop - Bookmarks Widget Styles
 */

/* ============================================
   Bookmarks Widget Container - Fixed to Taskbar
   ============================================ */
#easydesktop-bookmarks {
    position: fixed;
    bottom: calc(var(--ed-taskbar-height) + 12px);
    right: 12px;
    width: 400px;
    max-height: 500px;
    background: var(--ed-bg-secondary);
    border-radius: 12px;
    box-shadow: var(--ed-shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 9500;
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
    transition: opacity var(--ed-transition-normal), 
                transform var(--ed-transition-normal),
                visibility var(--ed-transition-normal);
}

#easydesktop-bookmarks.easydesktop-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    pointer-events: none;
}

/* Header */
#bookmarks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--ed-border-color);
}

#bookmarks-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ed-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

#bookmarks-header i {
    color: var(--ed-primary);
}

#bookmarks-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--ed-text-secondary);
    cursor: pointer;
    transition: all var(--ed-transition-fast);
}

#bookmarks-close:hover {
    background: var(--ed-bg-hover);
    color: var(--ed-text-primary);
}

/* Content */
#bookmarks-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

/* ============================================
   Bookmarks Toolbar
   ============================================ */
.bookmarks-toolbar {
    padding: 12px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--ed-border-color);
}

.btn-bookmark {
    padding: 8px 16px;
    background: var(--ed-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background var(--ed-transition-fast);
}

.btn-bookmark:hover {
    background: var(--ed-primary-hover);
}

.bookmarks-search {
    flex: 1;
    padding: 8px 12px;
    background: var(--ed-bg-primary);
    border: 1px solid var(--ed-border-color);
    border-radius: 6px;
    color: var(--ed-text-primary);
    font-size: 13px;
}

.bookmarks-search:focus {
    outline: none;
    border-color: var(--ed-primary);
}

/* ============================================
   Bookmarks List
   ============================================ */
.bookmarks-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.bookmark-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 4px;
    background: var(--ed-bg-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--ed-transition-fast);
}

.bookmark-item:hover {
    background: var(--ed-bg-hover);
    transform: translateX(4px);
}

.bookmark-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ed-primary);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

.bookmark-info {
    flex: 1;
    min-width: 0;
}

.bookmark-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ed-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.bookmark-url {
    font-size: 12px;
    color: var(--ed-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--ed-transition-fast);
}

.bookmark-item:hover .bookmark-actions {
    opacity: 1;
}

.bookmark-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--ed-text-secondary);
    cursor: pointer;
    transition: all var(--ed-transition-fast);
}

.bookmark-actions button:hover {
    background: var(--ed-bg-active);
    color: var(--ed-text-primary);
}

.bookmark-delete:hover {
    background: var(--ed-danger) !important;
    color: white !important;
}

/* ============================================
   Empty State
   ============================================ */
.bookmarks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--ed-text-secondary);
}

.bookmarks-empty p {
    margin: 5px 0;
}

/* ============================================
   Scrollbar
   ============================================ */
.bookmarks-list::-webkit-scrollbar {
    width: 8px;
}

.bookmarks-list::-webkit-scrollbar-track {
    background: transparent;
}

.bookmarks-list::-webkit-scrollbar-thumb {
    background: var(--ed-border-color);
    border-radius: 4px;
}

.bookmarks-list::-webkit-scrollbar-thumb:hover {
    background: var(--ed-text-secondary);
}
