/**
 * IAS Bookmarks — Styles
 * Matches the IAS Portal design system (Plus Jakarta Sans, teal accents)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════
   BOOKMARK BUTTON (used on individual pages)
   ═══════════════════════════════════════════ */

.ias-bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid #E5E7EB;
    background: #ffffff;
    color: #6B7280;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.ias-bookmark-btn:hover {
    border-color: #0D9488;
    color: #0D9488;
    background: #F0FDFA;
}

.ias-bookmark-btn .ias-bk-icon {
    transition: all 0.2s ease;
}

/* Active/bookmarked state */
.ias-bookmark-btn.ias-bk-active {
    border-color: #0D9488;
    background: #F0FDFA;
    color: #0D9488;
    font-weight: 600;
}

.ias-bookmark-btn.ias-bk-active .ias-bk-icon {
    fill: #0D9488;
    stroke: #0D9488;
}

/* Saving animation */
.ias-bookmark-btn.ias-bk-saving {
    opacity: 0.6;
    pointer-events: none;
}


/* ═══════════════════════════════════════════
   BOOKMARKS PAGE LAYOUT
   ═══════════════════════════════════════════ */

.ias-bookmarks-page {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.ias-bk-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    min-height: 400px;
}

/* ── Sidebar ── */

.ias-bk-sidebar {
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid #E5E7EB;
    padding: 0;
    overflow: hidden;
    align-self: start;
}

.ias-bk-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #F3F4F6;
}

.ias-bk-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.ias-bk-add-cat-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1.5px solid #E5E7EB;
    background: #fff;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ias-bk-add-cat-btn:hover {
    border-color: #0D9488;
    color: #0D9488;
    background: #F0FDFA;
}

/* Category list items */
.ias-bk-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-left: 3px solid transparent;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.ias-bk-cat-item:hover {
    background: #F9FAFB;
}

.ias-bk-cat-item.active {
    background: #F0FDFA;
    color: #0D9488;
    font-weight: 600;
    border-left-color: #0D9488;
}

.ias-bk-cat-count {
    font-size: 11px;
    font-weight: 600;
    background: #F3F4F6;
    color: #6B7280;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.ias-bk-cat-item.active .ias-bk-cat-count {
    background: #CCFBF1;
    color: #0D9488;
}

/* Category actions (edit/delete) */
.ias-bk-cat-actions {
    display: none;
    gap: 4px;
    margin-left: 8px;
}

.ias-bk-cat-item:hover .ias-bk-cat-actions {
    display: flex;
}

.ias-bk-cat-action {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
}

.ias-bk-cat-action:hover {
    background: #F3F4F6;
    color: #374151;
}

.ias-bk-cat-action.delete:hover {
    background: #FEF2F2;
    color: #DC2626;
}

/* New category input */
.ias-bk-new-cat {
    display: none;
    padding: 10px 18px;
    border-top: 1px solid #F3F4F6;
}

.ias-bk-new-cat.visible {
    display: block;
}

.ias-bk-new-cat input {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #E5E7EB;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
}

.ias-bk-new-cat input:focus {
    border-color: #0D9488;
}


/* ── Toolbar ── */

.ias-bk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ias-bk-count {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}


/* ── Bookmarks Grid ── */

.ias-bk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* Individual bookmark card */
.ias-bk-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.ias-bk-card:hover {
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.ias-bk-card-thumb {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #0D9488, #06B6D4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ias-bk-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ias-bk-card-thumb .ias-bk-thumb-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
}

.ias-bk-card-body {
    padding: 14px 16px;
}

.ias-bk-card-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0D9488;
    margin-bottom: 4px;
}

.ias-bk-card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ias-bk-card-title a {
    color: inherit;
    text-decoration: none;
}

.ias-bk-card-title a:hover {
    color: #0D9488;
}

.ias-bk-card-excerpt {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ias-bk-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #F3F4F6;
}

.ias-bk-card-date {
    font-size: 11px;
    color: #9CA3AF;
}

.ias-bk-card-remove {
    border: none;
    background: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.ias-bk-card-remove:hover {
    background: #FEF2F2;
    color: #DC2626;
}

/* Move-to-category dropdown */
.ias-bk-card-move {
    border: none;
    background: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
    font-size: 11px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.ias-bk-card-move:hover {
    background: #F0FDFA;
    color: #0D9488;
}

/* Move-to-category dropdown */
.ias-bk-move-select {
    font-size: 11px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #6B7280;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 5px;
    padding: 3px 6px;
    cursor: pointer;
    outline: none;
    max-width: 120px;
    transition: all 0.15s ease;
}

.ias-bk-move-select:hover,
.ias-bk-move-select:focus {
    border-color: #0D9488;
    color: #0D9488;
}


/* ── Empty State ── */

.ias-bk-empty {
    text-align: center;
    padding: 60px 20px;
}

.ias-bk-empty svg {
    margin-bottom: 16px;
}

.ias-bk-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.ias-bk-empty-sub {
    font-size: 13px;
    color: #9CA3AF;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
    font-family: 'Plus Jakarta Sans', sans-serif;
}


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    .ias-bk-layout {
        grid-template-columns: 1fr;
    }

    .ias-bk-sidebar {
        order: -1;
    }

    .ias-bk-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .ias-bk-grid {
        grid-template-columns: 1fr;
    }

    .ias-bk-card-thumb {
        height: 120px;
    }
}
