/* ===========================================
   COLLECTIONS TABS & FRAMEWORK CARDS
   =========================================== */

@import url('/design-system/platform-tokens.css');

/* ===========================================
   TOPIC CARD ICON STYLING
   Red icon with light red background
   =========================================== */

.listing-card-icon.topic-icon {
    background: rgba(229, 77, 77, 0.1);
    color: var(--uh-property-color, var(--mainsite-primary));
}

.listing-card-icon.topic-icon .icon {
    color: var(--uh-property-color, var(--mainsite-primary));
}

/* Exercise count in topic card footer */
.listing-card-exercise-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--uh-color-gray-500, var(--color-ink-muted));
}

/* Tab Navigation Section */
.collections-tabs-section {
    background: transparent;
    border-bottom: 1px solid var(--ws-border-light, var(--gray-200));
}

.collections-tabs-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.collections-tabs {
    display: flex;
    gap: 0;
}

.collections-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--uh-color-gray-500, var(--color-ink-muted));
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 150ms ease;
    position: relative;
    margin-bottom: -1px;
}

.collections-tab:hover {
    color: var(--uh-color-navy, var(--color-navy));
    background: var(--uh-color-gray-50, var(--gray-50));
}

.collections-tab.active {
    color: var(--uh-property-color, var(--mainsite-primary));
    border-bottom-color: var(--uh-property-color, var(--mainsite-primary));
    font-weight: 600;
}

.collections-tab .icon {
    width: 20px; height: 20px;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    background: var(--uh-color-gray-100, var(--gray-100));
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--uh-color-gray-600, var(--color-ink-secondary));
}

.collections-tab.active .tab-count {
    background: rgba(229, 77, 77, 0.1);
    color: var(--uh-property-color, var(--mainsite-primary));
}

.tab-label {
    /* For mobile hiding */
}

/* ===========================================
   TAB DESCRIPTION SECTION
   =========================================== */

.tab-description-section {
    background: transparent;
    border-bottom: 1px solid var(--ws-border-light, var(--gray-200));
}

.tab-description-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px;
}

.tab-description {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    max-width: 75%;
    font-size: 14px;
    color: var(--uh-color-gray-600, var(--color-ink-secondary));
    line-height: 1.5;
}

.tab-description .icon {
    width: 20px; height: 20px;
    color: var(--uh-property-color, var(--mainsite-primary));
    flex-shrink: 0;
}

/* ===========================================
   FRAMEWORK CARDS
   Horizontal 2-column layout with logo left, content right
   =========================================== */

.frameworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.framework-card {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    text-align: left;
    padding: 20px 24px;
    background: var(--uh-color-white, var(--bg-surface));
    border: 1px solid var(--ws-border-light, var(--gray-200));
    border-radius: 16px;
    text-decoration: none;
    transition: all 200ms ease;
    position: relative;
}

.framework-card:hover {
    border-color: var(--uh-property-color, var(--mainsite-primary));
    box-shadow: 0 8px 24px rgba(229, 77, 77, 0.12);
    transform: translateY(-2px);
}

.framework-card:hover .framework-card-title {
    color: var(--uh-property-color, var(--mainsite-primary));
}

.framework-card:hover .framework-card-logo {
    transform: scale(1.05);
}

.framework-card:hover .framework-card-stats {
    border-top-color: rgba(229, 77, 77, 0.2);
}

/* Framework Logo */
.framework-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--uh-color-gray-50, var(--gray-50));
    transition: transform 200ms ease;
    flex-shrink: 0;
}

.framework-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.framework-card-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
    color: white;
}

.framework-card-logo-placeholder .icon {
    width: 36px; height: 36px;
}

/* Framework Content (middle column) */
.framework-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Framework Title */
.framework-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--uh-color-navy, var(--color-navy));
    margin: 0;
    line-height: 1.3;
    transition: color 200ms ease;
}

/* Framework Description */
.framework-card-description {
    font-size: 13px;
    color: var(--uh-color-gray-500, var(--color-ink-muted));
    line-height: 1.5;
    margin: 4px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Framework Stats */
.framework-card-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid var(--ws-border-light, var(--gray-200));
}

.framework-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--uh-color-gray-500, var(--color-ink-muted));
}

.framework-stat .icon {
    width: 16px; height: 16px;
    color: var(--uh-color-gray-400, var(--color-ink-faint));
}

.framework-stat-divider {
    color: var(--uh-color-gray-300, var(--gray-300));
    font-size: 12px;
}

/* ===========================================
   EMPTY STATE
   =========================================== */

.collections-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    background: var(--uh-color-gray-50, var(--gray-50));
    border: 2px dashed var(--ws-border-light, var(--gray-200));
    border-radius: 16px;
}

.collections-empty-state .icon {
    width: 56px; height: 56px;
    color: var(--uh-color-gray-300, var(--gray-300));
    margin-bottom: 16px;
}

.collections-empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--uh-color-navy, var(--color-navy));
    margin: 0 0 8px 0;
}

.collections-empty-state p {
    font-size: 15px;
    color: var(--uh-color-gray-500, var(--color-ink-muted));
    margin: 0 0 24px 0;
    max-width: 300px;
}

.collections-empty-state .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--uh-color-gray-700, var(--color-ink-secondary));
    background: white;
    border: 1px solid var(--uh-color-gray-300, var(--gray-300));
    border-radius: 8px;
    text-decoration: none;
    transition: all 150ms ease;
}

.collections-empty-state .btn:hover {
    border-color: var(--uh-property-color, var(--mainsite-primary));
    color: var(--uh-property-color, var(--mainsite-primary));
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 768px) {
    .collections-tabs-inner {
        padding: 0 16px;
    }

    .collections-tab {
        padding: 12px 16px;
        font-size: 14px;
        gap: 6px;
    }

    .collections-tab .icon {
        width: 18px; height: 18px;
    }

    .tab-count {
        min-width: 22px;
        height: 20px;
        font-size: 11px;
        padding: 0 6px;
    }

    .tab-description-inner {
        padding: 12px 16px;
    }

    .tab-description {
        font-size: 13px;
    }

    .frameworks-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .framework-card {
        padding: 16px;
        gap: 12px;
    }

    .framework-card-logo {
        width: 56px;
        height: 56px;
    }

    .framework-card-content {
        min-width: 0;
    }

    .framework-card-stats {
        display: none;
    }

    .framework-card-logo-placeholder .icon {
        width: 28px; height: 28px;
    }

    .framework-card-title {
        font-size: 15px;
    }

    .framework-card-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .framework-card-stats {
        padding-top: 12px;
    }

    .framework-stat {
        font-size: 12px;
    }

    .collections-empty-state {
        padding: 40px 20px;
    }

    .collections-empty-state .icon {
        width: 48px; height: 48px;
    }

    .collections-empty-state h3 {
        font-size: 18px;
    }

    .collections-empty-state p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .collections-tabs {
        gap: 0;
    }

    .collections-tab {
        flex: 1;
        justify-content: center;
        padding: 12px 8px;
    }

    /* Hide label text on very small screens, show only icon + count */
    .collections-tab .tab-label {
        display: none;
    }

    .tab-description-section {
        display: none;
    }

    .frameworks-grid {
        grid-template-columns: 1fr;
    }
}
