/* ============================================
   Ajaxified AI Tools by Category
   ============================================ */

/* Wrapper */
.toolboxsaas-atbc-wrapper {
    max-width: 100%;
}

/* ---- Tabs ---- */
.toolboxsaas-atbc-tabs {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.toolboxsaas-atbc-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolboxsaas-atbc-tab:hover {
    color: #333;
}

.toolboxsaas-atbc-tab.active {
    color: #3B82F6;
    border-bottom-color: #3B82F6;
}

.toolboxsaas-atbc-tab i {
    font-size: 14px;
}

/* Sponsored tab premium star */
.toolboxsaas-atbc-tab[data-sort="sponsored"] {
    position: relative;
}
@media (max-width: 767px) {
    .toolboxsaas-atbc-wrapper .toolboxsaas-atbc-tab[data-sort="sponsored"]::after {
        top: 2px;
        right: -9px;
    }

}
.toolboxsaas-atbc-tab[data-sort="sponsored"]::after {
    content: '\f005';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 9px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    right: -2px;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.4);
}

.toolboxsaas-atbc-tab[data-sort="sponsored"].active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

/* ---- Two-Column Layout ---- */
.toolboxsaas-atbc-columns {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ---- Sidebar ---- */
.toolboxsaas-atbc-sidebar {
    flex: 0 0 220px;
    min-width: 200px;
}

.toolboxsaas-atbc-sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #1a1a2e;
    line-height: 1.4;
}

.toolboxsaas-atbc-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toolboxsaas-atbc-cat-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.toolboxsaas-atbc-cat-item a:hover {
    background: #f0f4ff;
    color: #3B82F6;
}

.toolboxsaas-atbc-cat-item.active a {
    background: #EEF2FF;
    color: #3B82F6;
    font-weight: 600;
}

.toolboxsaas-atbc-cat-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.4;
}

.toolboxsaas-atbc-cat-item.active .toolboxsaas-atbc-cat-count {
    color: #3B82F6;
    background: #dbeafe;
}

.toolboxsaas-atbc-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.toolboxsaas-atbc-cat-icon i {
    font-size: 16px;
    color: inherit;
}

.toolboxsaas-atbc-cat-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
}

/* ---- Content / Tools Container ---- */
.toolboxsaas-atbc-content {
    flex: 1;
    min-width: 0;
}

.toolboxsaas-atbc-tools-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 200px;
    transition: opacity 0.3s;
}

.toolboxsaas-atbc-tools-container.toolboxsaas-atbc-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ---- Tool Card (List Layout) ---- */
.toolboxsaas-atbc-tool-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #d8d6d6;
    border-radius: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s, background 0.2s;
}

.toolboxsaas-atbc-tool-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    background: #EEF2FF;
}

/* Logo */
.toolboxsaas-atbc-tool-left {
    flex-shrink: 0;
}

.toolboxsaas-atbc-tool-left a {
    display: block;
}

.toolboxsaas-atbc-tool-left img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #eee;
}

/* Center: Title + Description + Tags */
.toolboxsaas-atbc-tool-center {
    flex: 1;
    min-width: 0;
}

.toolboxsaas-atbc-tool-center h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolboxsaas-atbc-tool-center h4 a {
    color: #1a1a2e;
    text-decoration: none;
}

.toolboxsaas-atbc-tool-center h4 a:hover {
    color: #3B82F6;
}

.toolboxsaas-atbc-tool-center p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tags */
.toolboxsaas-atbc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolboxsaas-atbc-tags a {
    font-size: 13px;
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
}

.toolboxsaas-atbc-tags a:hover {
    text-decoration: underline;
}

/* Right: Bookmark + Views */
.toolboxsaas-atbc-tool-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolboxsaas-atbc-tool-right .mt-add-like {
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f0f4ff;
    transition: background 0.2s, border-color 0.2s;
}

.toolboxsaas-atbc-tool-right .mt-add-like:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.toolboxsaas-atbc-tool-right .thumbs-rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 2px;
}

.toolboxsaas-atbc-tool-right .thumbs-rating-up {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    color: #3B82F6;
    line-height: 1;
}

.toolboxsaas-atbc-tool-right .thumbs-rating-up i {
    font-size: 18px;
    line-height: 1;
}

.toolboxsaas-atbc-tool-right .thumbs-rating-up .like-count {
    font-size: 12px;
    line-height: 1;
}

.toolboxsaas-atbc-views {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #22c55e;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    width: 60px;
    height: 60px;
    text-align: center;
    border: 1px solid #e0f5e0;
    border-radius: 10px;
    background: #f8fdf8;
}

.toolboxsaas-atbc-views i {
    font-size: 14px;
    line-height: 1;
}

/* ---- View More Button ---- */
.toolboxsaas-atbc-view-more {
    margin-top: 4px;
}

.toolboxsaas-atbc-view-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #3B82F6;
    background: #f0f4ff;
    border: 1px dashed #c4d5f7;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.toolboxsaas-atbc-view-more-btn:hover {
    background: #3B82F6;
    color: #fff;
    border-color: #3B82F6;
    border-style: solid;
}

.toolboxsaas-atbc-view-more-btn i {
    font-size: 12px;
    transition: transform 0.2s;
}

.toolboxsaas-atbc-view-more-btn:hover i {
    transform: translateX(3px);
}

/* ---- Sponsored Badge ---- */
.toolboxsaas-atbc-sponsored-badge {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #A044F4, #3B0B8C);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.5;
}

/* Sponsored card styling */
.toolboxsaas-atbc-tool-card--sponsored {
    border-color: #d8b4fe;
    background: linear-gradient(135deg, #faf5ff 0%, #fff 100%);
}

.toolboxsaas-atbc-tool-card--sponsored:hover {
    box-shadow: 0 2px 16px rgba(160, 68, 244, 0.12);
}

/* ---- Sidebar Hide/Show ---- */
.toolboxsaas-atbc-sidebar--hidden {
    display: none;
}

/* No tools message */
.toolboxsaas-atbc-no-tools {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 15px;
}

/* ---- Responsive ---- */

@media (max-width: 991px) {
    .toolboxsaas-atbc-columns {
        flex-direction: column;
        gap: 20px;
    }

    .toolboxsaas-atbc-sidebar {
        flex: none;
        width: 100%;
    }

    .toolboxsaas-atbc-sidebar-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    /* Horizontal scrollable category list - touch ready */
    .toolboxsaas-atbc-cat-list {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding-bottom: 8px;
        /* Hide scrollbar across browsers */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .toolboxsaas-atbc-cat-list::-webkit-scrollbar {
        display: none;
    }

    .toolboxsaas-atbc-cat-item {
        flex-shrink: 0;
    }

    .toolboxsaas-atbc-cat-item a {
        padding: 6px 14px;
        border: 1px solid #eee;
        border-radius: 20px;
        font-size: 13px;
        white-space: nowrap;
    }

    .toolboxsaas-atbc-cat-icon {
        width: 22px;
        height: 22px;
    }

    .toolboxsaas-atbc-cat-icon img {
        width: 18px;
        height: 18px;
    }

    .toolboxsaas-atbc-cat-icon i {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    /* Tabs: horizontally scrollable, compact */
    .toolboxsaas-atbc-tabs {
        gap: 0;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .toolboxsaas-atbc-tabs::-webkit-scrollbar {
        display: none;
    }

    .toolboxsaas-atbc-tab {
        font-size: 13px;
        padding: 10px 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .toolboxsaas-atbc-tab i {
        font-size: 13px;
    }

    /* Tool card: stack logo on top */
    .toolboxsaas-atbc-tool-card {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }

    .toolboxsaas-atbc-tool-left {
        width: 100%;
    }

    .toolboxsaas-atbc-tool-left img {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .toolboxsaas-atbc-tool-center h4 {
        font-size: 15px;
    }

    .toolboxsaas-atbc-tool-center p {
        font-size: 13px;
        margin-bottom: 0;
    }

    /* Tool right: inline with center */
    .toolboxsaas-atbc-tool-right {
        margin-left: auto;
        flex-shrink: 0;
        gap: 8px;
    }

    .toolboxsaas-atbc-tool-right .mt-add-like,
    .toolboxsaas-atbc-views {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }

    .toolboxsaas-atbc-tool-right .thumbs-rating-up i {
        font-size: 15px;
    }

    .toolboxsaas-atbc-tool-right .thumbs-rating-up {
        font-size: 11px;
    }

    .toolboxsaas-atbc-views {
        font-size: 11px;
    }

    .toolboxsaas-atbc-views i {
        font-size: 12px;
    }

    /* View more: smaller on mobile */
    .toolboxsaas-atbc-view-more-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .toolboxsaas-atbc-columns {
        gap: 16px;
    }

    /* Even more compact tabs on small phones */
    .toolboxsaas-atbc-tab {
        font-size: 12px;
        padding: 8px 10px;
        gap: 5px;
    }

    /* Compact card on small phones */
    .toolboxsaas-atbc-tool-card {
        padding: 12px;
        gap: 8px;
    }

    .toolboxsaas-atbc-tool-left img {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    .toolboxsaas-atbc-tool-center h4 {
        font-size: 14px;
    }

    .toolboxsaas-atbc-tool-center p {
        font-size: 12px;
    }

    .toolboxsaas-atbc-tool-right {
        width: 100%;
        justify-content: flex-start;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
    }

    .toolboxsaas-atbc-sponsored-badge {
        font-size: 10px;
        padding: 1px 8px;
    }
}
