/* Bookmark Groups Styling */

.bookmark-groups-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bookmark-groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.create-group-btn {
    background: #2c5282;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.create-group-btn:hover {
    background: #2b6cb0;
}

.legacy-view-toggle a {
    color: #2c5282;
    text-decoration: none;
    font-size: 14px;
}

.legacy-view-toggle a:hover {
    text-decoration: underline;
}

/* Bookmark Group */
.bookmark-group {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.bookmark-group:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bookmark-group-header {
    background: #f7fafc;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.bookmark-group-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.bookmark-count {
    color: #718096;
    font-size: 14px;
    font-weight: normal;
}

.bookmark-group-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    background: white;
    border: 1px solid #cbd5e0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #f7fafc;
    border-color: #a0aec0;
}

.delete-group {
    color: #e53e3e;
}

.delete-group:hover {
    background: #fff5f5;
    border-color: #fc8181;
}

/* Bookmark Group Content */
.bookmark-group-content {
    padding: 10px;
    min-height: 60px;
    transition: background 0.2s;
}

.bookmark-group-content.drag-over {
    background: #edf2f7;
    border: 2px dashed #4299e1;
}

.bookmark-group-empty {
    padding: 20px;
    text-align: center;
    color: #a0aec0;
    font-style: italic;
}

/* Bookmark Item */
.bookmark-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: move;
    transition: all 0.2s;
}

.bookmark-item:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bookmark-item.dragging {
    opacity: 0.5;
    background: #edf2f7;
}

.bookmark-drag-handle {
    color: #cbd5e0;
    font-size: 16px;
    margin-right: 10px;
    cursor: grab;
    user-select: none;
}

.bookmark-drag-handle:active {
    cursor: grabbing;
}

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

.bookmark-link {
    color: #2c5282;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-link:hover {
    text-decoration: underline;
    color: #2b6cb0;
}

.bookmark-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f7fafc;
}

.toggle-favorite {
    color: #d69e2e;
}

.toggle-favorite:hover {
    background: #fefcbf;
}

.delete-bookmark {
    color: #e53e3e;
    font-size: 24px;
    line-height: 1;
}

.delete-bookmark:hover {
    background: #fff5f5;
}

/* Ungrouped Section */
.ungrouped-section {
    border-color: #cbd5e0;
}

.ungrouped-section .bookmark-group-header {
    background: #edf2f7;
}

/* Instructions */
.bookmark-instructions {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.bookmark-instructions h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 16px;
}

.bookmark-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.bookmark-instructions li {
    margin-bottom: 8px;
    color: #4a5568;
    line-height: 1.6;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bookmark-groups-container {
        color: #e2e8f0;
    }
    
    .bookmark-group {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .bookmark-group-header {
        background: #1a202c;
        border-bottom-color: #4a5568;
    }
    
    .bookmark-group-title {
        color: #e2e8f0;
    }
    
    .bookmark-count {
        color: #a0aec0;
    }
    
    .btn-small {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .btn-small:hover {
        background: #4a5568;
    }
    
    .bookmark-group-content.drag-over {
        background: #2d3748;
        border-color: #4299e1;
    }
    
    .bookmark-item {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .bookmark-item:hover {
        background: #374151;
    }
    
    .bookmark-link {
        color: #63b3ed;
    }
    
    .bookmark-link:hover {
        color: #90cdf4;
    }
    
    .btn-icon:hover {
        background: #374151;
    }
    
    .bookmark-instructions {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .bookmark-instructions h3 {
        color: #e2e8f0;
    }
    
    .bookmark-instructions li {
        color: #cbd5e0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .bookmark-groups-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .create-group-btn {
        width: 100%;
    }
    
    .legacy-view-toggle {
        text-align: center;
    }
    
    .bookmark-item {
        flex-wrap: wrap;
    }
    
    .bookmark-actions {
        flex-basis: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        margin-left: 0;
    }
}
