/* Modern Directory Style Country List Widget */
* {
    box-sizing: border-box;
}

.fg-country-widget {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}

/* Header Section */
.fg-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.fg-header-content {
    flex: 1;
}

.fg-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.fg-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Compact Search */
.fg-search-container {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.fg-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    background: #f9fafb;
    transition: all 0.2s ease;
    color: #111827;
    font-family: inherit;
}

.fg-search-input:focus {
    outline: none;
    background: #fff;
    border-color: #E30613;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.fg-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Country Tabs (Pills) */
.fg-country-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
    /* Scrollbar spacing if needed */
    -webkit-overflow-scrolling: touch;
}

.fg-country-tab {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    font-family: inherit;
}

.fg-country-tab:hover {
    background: #f3f4f6;
    color: #111827;
}

.fg-country-tab.active {
    background: #E30613;
    border-color: #E30613;
    color: #fff;
    box-shadow: 0 2px 6px rgba(227, 6, 19, 0.25);
}

.fg-country-flag {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
}

.fg-country-flag svg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Circular flags */
    object-fit: cover;
}

/* Results Bar */
.fg-results-bar {
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}

/* Directory List Grid */
.fg-city-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.fg-city-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.15s ease;
    background: transparent;
    border: 1px solid transparent;
}

.fg-city-item:hover {
    background: #fef2f2;
    color: #E30613;
    border-color: #fecaca;
    transform: translateX(2px);
}

.fg-city-icon {
    color: #d1d5db;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.fg-city-item:hover .fg-city-icon {
    color: #E30613;
}

.fg-city-icon svg {
    width: 16px;
    height: 16px;
}

.fg-city-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty State */
.fg-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #9ca3af;
}

.fg-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.fg-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .fg-widget-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .fg-search-container {
        max-width: 100%;
    }

    .fg-city-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}