/**
 * HyzenPro Featured Categories Widget - CSS
 * 
 * Mobile-first layout:
 * - Category pills at top (horizontal scroll)
 * - Ad slot below filter
 * - 2x2 tool grid on mobile, 4-col on desktop
 * - Fixed compare popup at bottom
 */

/* ========================================
   SECTION CONTAINER
   ======================================== */

.hyzen-fc {
    padding: 2rem 0.75rem;
    background: #f8f8f8;
    position: relative;
    overflow-x: hidden;
    /* Prevent horizontal scroll on page */
}

@media (min-width: 768px) {
    .hyzen-fc {
        padding: 3rem 2rem;
    }
}

.hyzen-fc .hyzen-container {
    max-width: 1216px;
    margin: 0 auto;
    padding: 0;
}

/* ========================================
   SECTION HEADER
   ======================================== */

.hyzen-fc-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.hyzen-fc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: #171717;
    color: #ffffff;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.hyzen-fc-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
}

@media (min-width: 768px) {
    .hyzen-fc-title {
        font-size: 2.25rem;
    }
}

.hyzen-fc-desc {
    font-size: 0.875rem;
    color: #404040;
    /* Darkened from #525252 for ultra-readability */
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .hyzen-fc-desc {
        font-size: 1rem;
    }
}

/* ========================================
   CATEGORY FILTER (Top Pills)
   ======================================== */

.hyzen-fc-categories {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0 1.25rem;
    margin-bottom: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
}

.hyzen-fc-categories::-webkit-scrollbar {
    display: none;
}

.hyzen-fc-cat-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #171717;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    user-select: none;
}

@media (min-width: 768px) {
    .hyzen-fc-cat-btn {
        padding: 0.625rem 1.125rem;
        font-size: 0.875rem;
    }
}

.hyzen-fc-cat-btn:hover {
    border-color: #171717;
    background: #fafafa;
    transform: translateY(-1px);
}

.hyzen-fc-cat-btn.active {
    background: #171717;
    border-color: #171717;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
}

.hyzen-fc-cat-btn svg {
    width: 16px;
    height: 16px;
}

.hyzen-fc-cat-btn span:first-child {
    font-size: 1rem;
}

.hyzen-fc-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.375rem;
    background: #f1f1f1;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #404040;
    /* Darkened for accessibility */
}

.hyzen-fc-cat-btn.active .hyzen-fc-cat-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ========================================
   AD SLOT
   ======================================== */

.hyzen-fc-ad-slot {
    width: 100%;
    min-height: 80px;
    background: #ffffff;
    border: 1px dashed #d1d1d1;
    /* Darkened dashed border */
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.hyzen-fc-ad-slot-label {
    font-size: 0.6875rem;
    color: #666666;
    /* Darkened for better contrast (was #a3a3a3) */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ========================================
   TOOLS GRID
   ======================================== */

.hyzen-fc-tools-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

@media (min-width: 480px) {
    .hyzen-fc-tools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.875rem;
    }
}

@media (min-width: 768px) {
    .hyzen-fc-tools-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hyzen-fc-tools-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ========================================
   TOOL CARD
   ======================================== */

.hyzen-fc-tool {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 1.25rem;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    animation: hyzenFadeIn 0.4s ease-out;
}

@keyframes hyzenFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hyzen-fc-tool:hover {
    transform: translateY(-4px);
    border-color: #d4d4d4;
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.08);
}

.hyzen-fc-tool.hyzen-comparing {
    border-color: #171717;
    box-shadow: 0 0 0 2px #171717, 0 12px 24px -10px rgba(0, 0, 0, 0.1);
    background: #fafafa;
}

/* Tool Icon */
.hyzen-fc-tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.875rem;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .hyzen-fc-tool-icon {
        width: 56px;
        height: 56px;
    }
}

.hyzen-fc-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tool Name and Meta */
.hyzen-fc-tool-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: #171717;
    margin: 0 0 0.375rem;
    line-height: 1.3;
}

.hyzen-fc-tool-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.hyzen-fc-tool-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #171717;
}

.hyzen-fc-tool-rating svg {
    width: 14px;
    height: 14px;
    fill: #f59e0b;
}

.hyzen-fc-tool-price {
    font-size: 0.8125rem;
    color: #525252;
    /* Darkened for accessibility (was #737373) */
    font-weight: 500;
}

/* Tool Description */
.hyzen-fc-tool-desc {
    font-size: 0.875rem;
    color: #404040;
    /* Darkened for accessibility (was #525252) */
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    flex-grow: 1;
}

/* Tool Tags */
.hyzen-fc-tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.hyzen-fc-tool-tag {
    display: inline-block;
    padding: 0.3125rem 0.75rem;
    background: #171717;
    color: #ffffff;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tool Footer */
.hyzen-fc-tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f1f1;
}

.hyzen-fc-tool-source {
    font-size: 0.625rem;
    color: #666666;
    /* Finalized for maximum accessibility */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.hyzen-fc-tool-visit {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    background: #171717;
    color: #ffffff;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hyzen-fc-tool-visit:hover {
    background: #262626;
}

.hyzen-fc-tool-visit svg {
    width: 12px;
    height: 12px;
}

/* Add to Compare Button */
.hyzen-fc-add-compare {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.hyzen-fc-add-compare:hover {
    background: #171717;
    border-color: #171717;
    color: #ffffff;
}

.hyzen-fc-add-compare svg {
    width: 14px;
    height: 14px;
}

.hyzen-fc-tool.hyzen-comparing .hyzen-fc-add-compare {
    background: #171717;
    border-color: #171717;
    color: #ffffff;
}

/* ========================================
   VIEW ALL BUTTON
   ======================================== */

.hyzen-fc-view-all {
    text-align: center;
}

.hyzen-fc-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 1px solid #171717;
    color: #171717;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hyzen-fc-view-all-btn:hover {
    background: #171717;
    color: #ffffff;
}

.hyzen-fc-view-all-btn svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   COMPARE POPUP
   ======================================== */

.hyzen-fc-compare-popup {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 1rem);
    /* More width on mobile */
    max-width: 680px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .hyzen-fc-compare-popup {
        width: calc(100% - 3rem);
    }
}

.hyzen-fc-compare-popup.active {
    bottom: 0;
}

/* Popup Header */
.hyzen-fc-compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f1f1;
    background: #ffffff;
    border-radius: 1.25rem 1.25rem 0 0;
}

.hyzen-fc-compare-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hyzen-fc-compare-header-left svg {
    width: 22px;
    height: 22px;
    color: #171717;
}

.hyzen-fc-compare-count {
    font-weight: 700;
    font-size: 1rem;
    color: #171717;
}

.hyzen-fc-compare-clear {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: none;
    border-radius: 50px;
    color: #171717;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hyzen-fc-compare-clear:hover {
    background: #ededed;
}

/* Popup Content Wrapper */
.hyzen-fc-compare-content {
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 2rem;
}

/* Popup Tools Grid */
.hyzen-fc-compare-tools {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 cols on mobile */
    gap: 0.75rem;
    padding: 1.25rem;
    border-bottom: 1px solid #f1f1f1;
}

@media (min-width: 480px) {
    .hyzen-fc-compare-tools {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hyzen-fc-compare-tool {
    text-align: center;
    position: relative;
    padding: 0.75rem;
    border: 1px solid #f1f1f1;
    border-radius: 1rem;
    background: #fafafa;
    transition: all 0.2s ease;
}

.hyzen-fc-compare-tool:hover {
    border-color: #d4d4d4;
    background: #ffffff;
}

.hyzen-fc-remove-compare {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    width: 22px;
    height: 22px;
    background: #171717;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.hyzen-fc-remove-compare:hover {
    transform: scale(1.1);
    background: #f43f5e;
}

.hyzen-fc-compare-tool-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.625rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hyzen-fc-compare-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hyzen-fc-compare-tool-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #171717;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hyzen-fc-compare-tool-price {
    font-size: 0.75rem;
    color: #737373;
    font-weight: 500;
}

.hyzen-fc-compare-tool-rating {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 700;
    margin-top: 0.125rem;
}

/* Features Comparison */
.hyzen-fc-compare-features {
    padding: 1.5rem 1.25rem;
}

.hyzen-fc-features-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #737373;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.hyzen-fc-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .hyzen-fc-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hyzen-fc-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #171717;
    padding: 0.75rem 1rem;
    background: #f8f8f8;
    border-radius: 0.75rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.hyzen-fc-feature-item.has-all {
    background: #ffffff;
    border-color: #171717;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hyzen-fc-feature-check {
    color: #171717;
    font-weight: 800;
    font-size: 1.125rem;
}

.hyzen-fc-feature-info {
    font-size: 0.75rem;
    color: #737373;
    background: #ffffff;
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    border: 1px solid #f1f1f1;
}

.hyzen-fc-feature-item.has-all .hyzen-fc-feature-info {
    background: #171717;
    color: #ffffff;
    border-color: #171717;
}

@media (max-width: 480px) {
    .hyzen-fc-compare-popup {
        width: 100%;
        border-radius: 1.5rem 1.5rem 0 0;
    }

    .hyzen-fc-compare-tools {
        padding: 1rem 0.75rem;
    }

    .hyzen-fc-compare-tool-icon {
        width: 36px;
        height: 36px;
    }

    .hyzen-fc-compare-tool-name {
        font-size: 0.75rem;
    }

    .hyzen-fc-feature-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* ========================================
   HINT TEXT
   ======================================== */

.hyzen-fc-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    color: #525252;
}

.hyzen-fc-hint-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #171717;
    color: #ffffff;
    border-radius: 50%;
}

.hyzen-fc-hint-icon svg {
    width: 12px;
    height: 12px;
}