/* ===========================================
   Tıbbi Birimler Shortcode — tibbi-birimler.css
   Temaya göre CSS değişkenlerini düzenle
   =========================================== */

:root {
    --tb-primary:      #1a5fa8;
    --tb-primary-light:#e8f1fb;
    --tb-border:       #e2e8f0;
    --tb-text:         #1e293b;
    --tb-text-muted:   #64748b;
    --tb-card-bg:      #ffffff;
    --tb-card-hover:   #f0f6ff;
    --tb-card-shadow:  0 1px 4px rgba(0,0,0,.07);
    --tb-radius:       10px;
    --tb-font:         inherit;
}

/* Wrap */
.tb-wrap {
    font-family: var(--tb-font);
    color: var(--tb-text);
}

/* ---- Filtre Çubuğu ---- */
.tb-filters {
    margin-bottom: 2rem;
}

.tb-filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

/* Select */
.tb-select-wrap {
    position: relative;
    flex: 1 1 220px;
}

.tb-hospital-filter {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--tb-border);
    background: var(--tb-card-bg);
    cursor: pointer;
    transition: border-color .2s;
}

.tb-hospital-filter:focus {
    outline: none;
    border-color: var(--tb-primary);
    background: #ffffff!important;
}

.tb-select-arrow {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--tb-text-muted);
    font-size: 1.1rem;
}

/* Search */
.tb-search-wrap {
    position: relative;
    flex: 1 1 260px;
    display: flex;
    align-items: center;
}

.tb-search-wrap input {
    border: 1.5px solid var(--tb-border)!important;
    background: var(--tb-card-bg)!important;

}

.tb-search {
    width: 100%;
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: .65rem 2.5rem .65rem 1rem;
    font-size: .95rem;
    color: var(--tb-text);
    background: var(--tb-card-bg);
    transition: border-color .2s;
}

.tb-search:focus {
    outline: none;
    border-color: var(--tb-primary);
}

.tb-clear-btn {
    position: absolute;
    right: .75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tb-text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    transition: background .15s, color .15s;
}

.tb-clear-btn:hover {
    background: var(--tb-border);
    color: var(--tb-text);
}

/* ---- Harf Navigasyonu ---- */
.tb-alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .1rem;
    justify-content: center;
    padding: .5rem 0;
    border-top: 1px solid var(--tb-border);
    border-bottom: 1px solid var(--tb-border);
}

.tb-alpha-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--tb-primary);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.tb-alpha-link:hover {
    background: var(--tb-primary-light);
}

.tb-alpha-link.tb-alpha-disabled {
    color: var(--tb-border);
    pointer-events: none;
}

/* ---- Liste ---- */
.tb-list {
    margin-top: 1.5rem;
}

/* Harf Grubu */
.tb-letter-group {
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
}

.tb-letter-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--tb-primary);
    margin: 0 0 .4rem;
}

.tb-letter-divider {
    border: none;
    border-top: 1.5px solid var(--tb-border);
    margin: 0 0 1rem;
}

/* Grid */
.tb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

/* Kart */
.tb-card {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    background: var(--tb-card-bg);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    text-decoration: none;
    color: var(--tb-primary);
    font-size: .9rem;
    font-weight: 500;
    box-shadow: var(--tb-card-shadow);
    transition: background .18s, border-color .18s, transform .15s;
}

.tb-card:hover {
    background: var(--tb-card-hover);
    border-color: var(--tb-primary);
    transform: translateY(-2px);
    color: var(--tb-primary);
    text-decoration: none;
}

.tb-card-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--tb-primary);
    opacity: .65;
}

.tb-card-icon svg {
    width: 100%;
    height: 100%;
}

.tb-card-title {
    line-height: 1.35;
    font-weight: 600;
}

/* Sonuç yok */
.tb-no-result {
    text-align: center;
    color: var(--tb-text-muted);
    padding: 2rem 0;
    font-size: .95rem;
}

/* ---- Mobil ---- */
@media (max-width: 600px) {
    .tb-filter-row {
        flex-direction: column;
    }

    .tb-select-wrap,
    .tb-search-wrap {
        flex: 1 1 100%;
    }

    .tb-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .tb-alpha-link {
        width: 1.7rem;
        height: 1.7rem;
        font-size: .78rem;
    }
}
