/* HSN/SAC Code Finder - Tool Styles */
/* All classes prefixed with hf- to avoid collisions */

/* Finder Section */
.hf-finder-section {
    padding: 40px 0 80px;
}

.hf-finder-section .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Reveal Animation */
.hf-reveal {
    animation: hfReveal 0.4s ease-out;
}

@keyframes hfReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Input */
.hf-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.hf-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary, #6b6560);
    pointer-events: none;
}

.hf-search-icon svg {
    width: 22px;
    height: 22px;
}

.hf-search-input {
    width: 100%;
    padding: 18px 18px 18px 54px;
    border: 2px solid var(--border-color, #e2e0dc);
    border-radius: 14px;
    font-size: 17px;
    font-family: 'Hanken Grotesk', sans-serif;
    color: var(--text-primary, #1a1715);
    background: var(--bg-card, #fff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.hf-search-input::placeholder {
    color: var(--text-secondary, #6b6560);
    opacity: 0.7;
}

.hf-search-input:focus {
    border-color: var(--primary, #f1643f);
    box-shadow: 0 0 0 4px rgba(241, 100, 63, 0.1);
}

.hf-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary, #6b6560);
    padding: 4px;
    border-radius: 50%;
    display: none;
    transition: color 0.2s ease;
}

.hf-search-clear:hover {
    color: var(--text-primary, #1a1715);
}

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

/* Filter Row */
.hf-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* Type Filter Tabs */
.hf-type-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.hf-type-tab {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    cursor: pointer;
    border: none;
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #6b6560);
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.hf-type-tab:not(:last-child) {
    border-right: 1px solid var(--border-color, #e2e0dc);
}

.hf-type-tab:hover {
    color: var(--primary, #f1643f);
    background: rgba(241, 100, 63, 0.03);
}

.hf-type-tab.active {
    background: var(--primary, #f1643f);
    color: #fff;
}

/* GST Rate Filter Chips */
.hf-rate-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hf-rate-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color, #e2e0dc);
    color: var(--text-secondary, #6b6560);
    background: var(--bg-card, #fff);
    transition: all 0.2s ease;
    user-select: none;
    font-family: 'Hanken Grotesk', sans-serif;
    white-space: nowrap;
}

.hf-rate-chip:hover {
    border-color: var(--primary, #f1643f);
    color: var(--primary, #f1643f);
}

.hf-rate-chip.active {
    background: var(--primary, #f1643f);
    border-color: var(--primary, #f1643f);
    color: #fff;
}

/* Result Count */
.hf-result-count {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    margin-bottom: 16px;
    font-weight: 500;
}

.hf-result-count strong {
    color: var(--text-primary, #1a1715);
}

/* Result Cards */
.hf-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.hf-result-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 12px;
    background: var(--bg-card, #fff);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hf-result-card:hover {
    border-color: var(--primary, #f1643f);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hf-result-code {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    letter-spacing: 0.5px;
    min-width: 90px;
    flex-shrink: 0;
}

.hf-result-info {
    flex: 1;
    min-width: 0;
}

.hf-result-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1a1715);
    line-height: 1.4;
    margin-bottom: 4px;
}

.hf-result-chapter {
    font-size: 12px;
    color: var(--text-secondary, #6b6560);
}

.hf-result-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* GST Rate Badges - Color coded */
.hf-gst-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.hf-gst-badge.rate-0 {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.hf-gst-badge.rate-5 {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.hf-gst-badge.rate-12 {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.hf-gst-badge.rate-18 {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.hf-gst-badge.rate-28 {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Type Badge */
.hf-type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.hf-type-badge.hsn {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.hf-type-badge.sac {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Copy Button */
.hf-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    cursor: pointer;
    color: var(--text-secondary, #6b6560);
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.hf-copy-btn:hover {
    border-color: var(--primary, #f1643f);
    color: var(--primary, #f1643f);
    background: rgba(241, 100, 63, 0.03);
}

.hf-copy-btn.copied {
    border-color: #16a34a;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.05);
}

.hf-copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Load More Button */
.hf-load-more {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: var(--primary, #f1643f);
    border: 2px solid var(--primary, #f1643f);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Hanken Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.hf-load-more:hover {
    background: var(--primary, #f1643f);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(241, 100, 63, 0.3);
}

/* Empty State */
.hf-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #6b6560);
}

.hf-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-secondary, #6b6560);
}

.hf-empty-icon svg {
    width: 28px;
    height: 28px;
}

.hf-empty-state h3 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 8px;
}

.hf-empty-state p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Popular Codes Section */
.hf-popular-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color, #e2e0dc);
}

.hf-popular-title {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 14px;
}

.hf-popular-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hf-popular-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color, #e2e0dc);
    color: var(--text-primary, #1a1715);
    background: var(--bg-card, #fff);
    transition: all 0.2s ease;
    font-family: 'Hanken Grotesk', sans-serif;
    white-space: nowrap;
}

.hf-popular-chip:hover {
    border-color: var(--primary, #f1643f);
    color: var(--primary, #f1643f);
    background: rgba(241, 100, 63, 0.03);
}

.hf-popular-chip .hf-chip-code {
    font-weight: 700;
    margin-right: 4px;
}

/* ===== SEO CONTENT ===== */
.hf-seo-content {
    padding: 80px 0;
    background: rgba(0, 0, 0, 0.02);
}

.hf-seo-content h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 12px;
    text-align: center;
}

.hf-seo-content > .container > p {
    text-align: center;
    color: var(--text-secondary, #6b6560);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-size: 15px;
}

.hf-seo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.hf-seo-card {
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e0dc);
    background: var(--bg-card, #fff);
}

.hf-seo-card h3 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary, #1a1715);
}

.hf-seo-card p {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    line-height: 1.6;
    margin: 0;
}

/* ===== FAQ SECTION ===== */
.hf-faq-section {
    padding: 80px 0;
}

.hf-faq-section .container {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hf-faq-section h2 {
    font-family: 'Bricolage Grotesque', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1a1715);
    margin-bottom: 32px;
    text-align: center;
}

.hf-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hf-faq-item {
    border: 1px solid var(--border-color, #e2e0dc);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card, #fff);
}

.hf-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1715);
    text-align: left;
    transition: background 0.2s ease;
}

.hf-faq-question:hover {
    background: rgba(0, 0, 0, 0.02);
}

.hf-faq-question i,
.hf-faq-question svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary, #6b6560);
    transition: transform 0.2s ease;
}

.hf-faq-item.open .hf-faq-question i,
.hf-faq-item.open .hf-faq-question svg {
    transform: rotate(180deg);
}

.hf-faq-answer {
    display: none;
    padding: 0 20px 18px;
}

.hf-faq-item.open .hf-faq-answer {
    display: block;
}

.hf-faq-answer p {
    font-size: 14px;
    color: var(--text-secondary, #6b6560);
    line-height: 1.7;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 809px) {
    .hf-finder-section {
        padding: 24px 0 60px;
    }

    .hf-search-input {
        font-size: 15px;
        padding: 14px 14px 14px 46px;
    }

    .hf-search-icon {
        left: 14px;
    }

    .hf-search-icon svg {
        width: 18px;
        height: 18px;
    }

    .hf-filter-row {
        gap: 10px;
    }

    .hf-result-card {
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 10px;
    }

    .hf-result-code {
        font-size: 16px;
        min-width: auto;
    }

    .hf-result-info {
        flex-basis: calc(100% - 120px);
    }

    .hf-result-badges {
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .hf-seo-grid {
        grid-template-columns: 1fr;
    }

    .hf-seo-content {
        padding: 60px 0;
    }

    .hf-faq-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hf-finder-section {
        padding: 0 0 48px;
    }

    .hf-search-input {
        font-size: 14px;
        padding: 12px 12px 12px 42px;
        border-radius: 10px;
    }

    .hf-type-tab {
        padding: 7px 14px;
        font-size: 12px;
    }

    .hf-rate-chip {
        padding: 5px 10px;
        font-size: 12px;
    }

    .hf-result-card {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .hf-result-code {
        font-size: 15px;
    }

    .hf-result-desc {
        font-size: 13px;
    }

    .hf-seo-content h2,
    .hf-faq-section h2 {
        font-size: 22px;
    }

    .hf-faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }

    .hf-faq-answer {
        padding: 0 16px 14px;
    }

    .hf-popular-chips {
        gap: 6px;
    }

    .hf-popular-chip {
        font-size: 12px;
        padding: 5px 10px;
    }
}
