/* =====================================================
   Locations Search Directory Widget — Styles
   ===================================================== */

.nlw-wrapper {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1a2742;
    box-sizing: border-box;
}

.nlw-wrapper *,
.nlw-wrapper *::before,
.nlw-wrapper *::after {
    box-sizing: border-box;
}

/* ---- Header ---- */
.nlw-header {
    margin-bottom: 30px;
    text-align: center;
}
.nlw-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a2742;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.nlw-subtitle {
    font-size: 1rem;
    color: #6b7a99;
    margin: 0;
}

/* ---- Count Badge ---- */
.nlw-count-wrap {
    text-align: center;
    margin-bottom: 20px;
}
.nlw-count-badge {
    display: inline-block;
    background: #1a2742;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

/* ---- Search Bar ---- */
.nlw-search-wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 32px auto;
}
.nlw-search-inner {
    position: relative;
    display: flex;
    align-items: center;
}
.nlw-search-icon {
    position: absolute;
    left: 18px;
    color: #9aa5bf;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
}
.nlw-search-input {
    width: 100%;
    height: 54px;
    padding: 0 48px 0 48px;
    font-size: 1rem;
    color: #1a2742;
    background: #ffffff;
    border: 2px solid #dde3f0;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: inherit;
}
.nlw-search-input:focus {
    border-color: #1a2742;
    box-shadow: 0 4px 24px rgba(26,39,66,0.15);
}
.nlw-search-input::placeholder {
    color: #9aa5bf;
}
.nlw-search-clear {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #9aa5bf;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s;
    z-index: 2;
}
.nlw-search-clear:hover { color: #1a2742; }

/* ---- A–Z Filter Bar ---- */
.nlw-alphabar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 28px;
}
.nlw-alpha-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #f0f4ff;
    color: #1a2742;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.12s;
    line-height: 1;
    letter-spacing: 0.01em;
}
.nlw-alpha-btn:hover {
    background: #dde3f0;
    transform: translateY(-1px);
}
.nlw-alpha-btn.active {
    background: #1a2742;
    color: #fff;
}
.nlw-alpha-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* ---- Alpha Group Title ---- */
.nlw-alpha-group-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a2742;
    border-bottom: 2px solid #dde3f0;
    padding-bottom: 8px;
    margin: 32px 0 16px 0;
}
.nlw-alpha-group:first-child .nlw-alpha-group-title {
    margin-top: 0;
}

/* ---- Grid ---- */
.nlw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.nlw-layout-list {
    grid-template-columns: 1fr !important;
}

/* ---- Card ---- */
.nlw-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #edf0f8;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    cursor: pointer;
}
.nlw-card:hover {
    background: #f0f4ff;
    border-color: #1a2742;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.nlw-card.nlw-hidden {
    display: none !important;
}

/* ---- Card Inner ---- */
.nlw-card-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}
.nlw-card-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    background: #eef1fb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    transition: background 0.2s;
}
.nlw-card-icon i {
    font-size: 1.1rem;
    color: #1a2742;
    transition: color 0.2s;
}
.nlw-card-icon svg {
    width: 18px;
    height: 18px;
    color: #1a2742;
}
.nlw-card:hover .nlw-card-icon i,
.nlw-card:hover .nlw-card-icon svg {
    color: #4a7ef5;
}

.nlw-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.nlw-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2742;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    transition: color 0.2s;
}
.nlw-card-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    width: fit-content;
}

.nlw-card-arrow {
    color: #9aa5bf;
    font-size: 0.8rem;
    margin-left: 10px;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.2s;
}
.nlw-card:hover .nlw-card-arrow {
    color: #1a2742;
    transform: translateX(3px);
}

/* ---- No Results ---- */
.nlw-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #9aa5bf;
    font-size: 1rem;
}
.nlw-no-results-icon {
    display: block;
    font-size: 2.2rem;
    margin-bottom: 10px;
}
.nlw-no-results p {
    margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .nlw-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .nlw-grid { grid-template-columns: 1fr; }
    .nlw-search-input { height: 48px; font-size: 0.95rem; }
    .nlw-alphabar { gap: 4px; }
    .nlw-alpha-btn { min-width: 28px; height: 28px; font-size: 0.72rem; }
    .nlw-title { font-size: 1.5rem; }
}
