﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

/* ===== Explore page consistency fix (public + user layout) ===== */

/* Keep the original clean card layout */
.apis-explore-page .filters-panel {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.apis-explore-page .page-header {
    margin-bottom: 1.5rem;
}

.apis-explore-page .filter-toggle-btn {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

/* Search input structure */
.apis-explore-page .search-wrapper {
    position: relative;
}

.apis-explore-page .search-input-group {
    position: relative;
}

.apis-explore-page .search-input-group .search-icon {
    position: absolute !important;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 2;
    pointer-events: none;
}

.apis-explore-page .search-input-group .filter-search-input {
    height: 52px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    padding-left: 2.75rem;
    padding-right: 2.75rem;
    font-size: 1.05rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.apis-explore-page .search-input-group .filter-search-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.15);
}

/* Clear button (hide by default, show only when JS adds .visible) */
.apis-explore-page .search-input-group .clear-search {
    position: absolute !important;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

.apis-explore-page .search-input-group .clear-search.visible {
    display: inline-flex;
}

.apis-explore-page .search-input-group .clear-search:hover {
    background: #eef2ff;
    color: #1f2937;
}

/* Autocomplete dropdown */
.apis-explore-page .autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}

.apis-explore-page .autocomplete-dropdown.show {
    display: block;
}

/* Hide "Saved Info" heading to match previous clean look */
.apis-explore-page .autocomplete-header {
    display: none;
}

/* Category chips: revert to cleaner previous style */
.apis-explore-page .category-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.apis-explore-page .filter-chip {
    border: none;
    border-radius: 999px !important;
    background: #f8fafc;
    color: #0f172a;
    padding: 0.5rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.apis-explore-page .filter-chip.active {
    background: #4f46e5 !important;
    color: #fff !important;
}

/* Buttons area */
.apis-explore-page .filters-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.apis-explore-page .filters-actions .btn {
    min-width: 120px;
    height: 44px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
}

/* Sort control alignment */
.explore-sort-wrap .explore-sort-select {
    min-width: 170px;
    height: 40px;
    border-radius: 10px;
}

/* API card action buttons (consistent in both layouts) */
.api-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.api-card .api-action-btn {
    min-width: 120px;
    height: 38px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

/* Small screen */
@media (max-width: 767.98px) {
    .apis-explore-page .filters-actions {
        flex-wrap: wrap;
    }

    .apis-explore-page .filters-actions .btn {
        width: 100%;
    }

    .api-actions {
        flex-wrap: wrap;
    }

    .api-card .api-action-btn {
        width: 100%;
    }
}

.filter-section[hidden] {
    display: none !important;
}
