/* ==================== BOOKMARKS PAGE ==================== */

/* Bookmarks Header */
.bookmarks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
}

.bookmarks-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.bookmarks-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ai-gold-light);
    border-radius: var(--radius-lg);
    color: var(--ai-gold);
}

.bookmarks-icon svg {
    width: 24px;
    height: 24px;
}

.bookmarks-title-group h1 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.bookmarks-count {
    font-size: var(--text-sm);
    color: var(--text-dim);
    margin-top: 2px;
}

.bookmarks-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.bookmarks-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bookmarks-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-white);
    border-color: var(--border-hover);
}

.bookmarks-action-btn.danger:hover {
    background: rgba(229, 57, 53, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.bookmarks-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== BOOKMARKS SEARCH ==================== */
.bookmarks-search {
    position: relative;
    margin-bottom: var(--space-lg);
}

.bookmarks-search-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    padding-left: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    color: var(--text-white);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.bookmarks-search-input:focus {
    outline: none;
    border-color: var(--ai-gold);
    box-shadow: 0 0 0 3px var(--ai-gold-light);
}

.bookmarks-search-input::placeholder {
    color: var(--text-dim);
}

.bookmarks-search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.bookmarks-search-icon svg {
    width: 20px;
    height: 20px;
}

.bookmarks-search-clear {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-dim);
    cursor: pointer;
}

.bookmarks-search-clear:hover {
    background: var(--bg-active);
    color: var(--text-white);
}

.bookmarks-search-clear.visible {
    display: flex;
}

.bookmarks-search-clear svg {
    width: 14px;
    height: 14px;
}

/* ==================== BOOKMARKS FILTERS ==================== */
.bookmarks-filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bookmarks-filters::-webkit-scrollbar {
    display: none;
}

.bookmarks-filter {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-dim);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bookmarks-filter:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.bookmarks-filter.active {
    background: var(--ai-gold-light);
    border-color: var(--ai-gold);
    color: var(--ai-gold);
}

.bookmarks-filter svg {
    width: 16px;
    height: 16px;
}

.bookmarks-filter-count {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
}

.bookmarks-filter.active .bookmarks-filter-count {
    background: rgba(255, 215, 0, 0.2);
}

/* Platform-specific filter colors */
.bookmarks-filter[data-platform="soulmate"].active {
    background: var(--soulmate-red-light);
    border-color: var(--soulmate-red);
    color: var(--soulmate-red);
}

.bookmarks-filter[data-platform="creator"].active {
    background: var(--creator-orange-light);
    border-color: var(--creator-orange);
    color: var(--creator-orange);
}

.bookmarks-filter[data-platform="ai"].active {
    background: var(--ai-gold-light);
    border-color: var(--ai-gold);
    color: var(--ai-gold);
}

.bookmarks-filter[data-platform="professional"].active {
    background: var(--professional-yellow-light);
    border-color: var(--professional-yellow);
    color: var(--professional-yellow);
}

.bookmarks-filter[data-platform="fitness"].active {
    background: var(--fitness-teal-light);
    border-color: var(--fitness-teal);
    color: var(--fitness-teal);
}

/* ==================== BOOKMARKS SORT ==================== */
.bookmarks-sort {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.bookmarks-sort-label {
    font-size: var(--text-sm);
    color: var(--text-dim);
}

.bookmarks-sort-select {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bookmarks-sort-select:hover {
    border-color: var(--border-hover);
}

.bookmarks-sort-select svg {
    width: 14px;
    height: 14px;
    color: var(--text-dim);
}

/* ==================== BOOKMARKED POST CARD ==================== */
.bookmark-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-md);
    transition: all var(--transition-fast);
}

.bookmark-card:hover {
    border-color: var(--border-hover);
}

.bookmark-card.selected {
    border-color: var(--ai-gold);
    box-shadow: 0 0 0 3px var(--ai-gold-light);
}

/* Bookmark badge */
.bookmark-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 4px 10px;
    background: var(--ai-gold-light);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--ai-gold);
    z-index: 1;
}

.bookmark-badge svg {
    width: 12px;
    height: 12px;
    fill: var(--ai-gold);
}

/* Selection checkbox */
.bookmark-checkbox {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 2;
}

.bookmark-card:hover .bookmark-checkbox,
.bookmarks-selecting .bookmark-checkbox {
    display: flex;
}

.bookmark-checkbox.checked {
    background: var(--ai-gold);
    border-color: var(--ai-gold);
}

.bookmark-checkbox.checked svg {
    color: var(--bg-dark);
}

.bookmark-checkbox svg {
    width: 14px;
    height: 14px;
    color: transparent;
}

/* Bookmark date saved */
.bookmark-saved-date {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--border-default);
    font-size: var(--text-xs);
    color: var(--text-dim);
}

.bookmark-saved-date svg {
    width: 14px;
    height: 14px;
}

/* Quick remove button */
.bookmark-remove-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-white);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
}

.bookmark-card:hover .bookmark-remove-btn {
    display: flex;
}

.bookmark-remove-btn:hover {
    background: var(--error);
}

.bookmark-remove-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== BULK ACTIONS BAR ==================== */
.bulk-actions-bar {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 100;
}

.bulk-actions-bar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.bulk-actions-count {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-white);
}

.bulk-actions-divider {
    width: 1px;
    height: 24px;
    background: var(--border-default);
}

.bulk-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-dim);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.bulk-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.bulk-action-btn.danger {
    border-color: var(--error);
    color: var(--error);
}

.bulk-action-btn.danger:hover {
    background: rgba(229, 57, 53, 0.1);
}

.bulk-action-btn svg {
    width: 16px;
    height: 16px;
}

.bulk-cancel-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-dim);
    cursor: pointer;
}

.bulk-cancel-btn:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.bulk-cancel-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== COLLECTIONS ==================== */
.bookmarks-collections {
    margin-bottom: var(--space-lg);
}

.collections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.collections-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.collections-add-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: 1px dashed var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-dim);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.collections-add-btn:hover {
    border-color: var(--ai-gold);
    color: var(--ai-gold);
}

.collections-add-btn svg {
    width: 14px;
    height: 14px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.collection-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.collection-card:hover {
    border-color: var(--ai-gold);
    transform: translateY(-2px);
}

.collection-card.active {
    border-color: var(--ai-gold);
    background: var(--ai-gold-light);
}

.collection-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    font-size: var(--text-xl);
}

.collection-card.active .collection-icon {
    background: rgba(255, 215, 0, 0.2);
}

.collection-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-white);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-count {
    font-size: var(--text-xs);
    color: var(--text-dim);
}

/* ==================== EMPTY STATE ==================== */
.bookmarks-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
}

.bookmarks-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ai-gold-light);
    border-radius: var(--radius-full);
    color: var(--ai-gold);
}

.bookmarks-empty-icon svg {
    width: 40px;
    height: 40px;
}

.bookmarks-empty-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

.bookmarks-empty-text {
    font-size: var(--text-sm);
    color: var(--text-dim);
    max-width: 400px;
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

.bookmarks-empty-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* No results state */
.bookmarks-no-results {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.bookmarks-no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    color: var(--text-dim);
}

.bookmarks-no-results-icon svg {
    width: 100%;
    height: 100%;
}

.bookmarks-no-results-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--space-xs);
}

.bookmarks-no-results-text {
    font-size: var(--text-sm);
    color: var(--text-dim);
}

/* ==================== LOADING SKELETON ==================== */
.bookmark-skeleton {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.bookmark-skeleton-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.bookmark-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.bookmark-skeleton-info {
    flex: 1;
}

.bookmark-skeleton-name {
    height: 16px;
    width: 140px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.bookmark-skeleton-username {
    height: 12px;
    width: 100px;
    border-radius: var(--radius-sm);
}

.bookmark-skeleton-content {
    height: 14px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.bookmark-skeleton-content:nth-child(2) {
    width: 90%;
}

.bookmark-skeleton-content:nth-child(3) {
    width: 75%;
}

.bookmark-skeleton-footer {
    height: 12px;
    width: 120px;
    margin-top: var(--space-md);
    border-radius: var(--radius-sm);
}

/* ==================== CLEAR ALL MODAL ==================== */
.clear-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.clear-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.clear-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.clear-modal-overlay.active .clear-modal {
    transform: scale(1);
}

.clear-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 57, 53, 0.1);
    border-radius: var(--radius-full);
    color: var(--error);
}

.clear-modal-icon svg {
    width: 28px;
    height: 28px;
}

.clear-modal-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.clear-modal-text {
    font-size: var(--text-sm);
    color: var(--text-dim);
    text-align: center;
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.clear-modal-actions {
    display: flex;
    gap: var(--space-md);
}

.clear-modal-actions .btn {
    flex: 1;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .bookmarks-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .bookmarks-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .bulk-actions-bar {
        left: var(--space-md);
        right: var(--space-md);
        transform: translateX(0) translateY(100px);
        width: auto;
    }

    .bulk-actions-bar.visible {
        transform: translateX(0) translateY(0);
    }
}

@media (max-width: 480px) {
    .bookmarks-filters {
        gap: var(--space-xs);
    }

    .bookmarks-filter {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
    }

    .bookmarks-sort {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .bulk-actions-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .bulk-actions-divider {
        display: none;
    }
}
