/* Shared styling for /register/school, /register/teacher, /directory, /school/{id},
   /teacher/{id}. Not scoped CSS because five separate Razor files share the same look. */

.provider-page .provider-hero h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.provider-kind-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.provider-kind {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.provider-kind:hover { background: #fff; color: #111827; }

.provider-kind.active {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.provider-kind i { font-size: 1.1rem; }

/* ── Directory layout ─────────────────────────────────────── */
.directory-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    .directory-layout { grid-template-columns: 380px 1fr; }
}

.directory-filter .card-body > * + * { margin-top: 0.75rem; }

.directory-map {
    height: 520px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.directory-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.directory-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 0.75rem;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.directory-card:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
    color: inherit;
    text-decoration: none;
}

.directory-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #f3f4f6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.directory-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.directory-card__avatar i {
    font-size: 1.8rem;
    color: #9ca3af;
}

.directory-card__body { flex-grow: 1; min-width: 0; }

.directory-card__title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.directory-card__meta {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.directory-card__kind {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.5rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    border-radius: 999px;
    font-weight: 600;
}

.directory-card__kind--teacher { background: #ecfdf5; color: #047857; }

.directory-card__langs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.4rem;
}

.directory-card__lang {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #374151;
}
/* Learning variant — emerald tint to distinguish from the neutral "Speaks" chips. */
.directory-card__lang--learning {
    background: #ecfdf5;
    color: #047857;
}
/* The .flag glyph (from PSC.Blazor.Components.ImageSelect/css/flags.css) defaults
   to inline-block with a width tied to its background sprite — let it shrink to
   the chip height so the row stays compact. */
.directory-card__lang .flag {
    flex-shrink: 0;
    transform: scale(0.7);
    transform-origin: left center;
    margin-right: -4px;
}

/* Custom Leaflet pins using divIcon — circular pins with a centred icon, no
   counter-rotation gymnastics. The previous teardrop variant rotated the parent
   -45deg and counter-rotated the <i> back, which left the icon visually off-centre
   because the rotated parent's transform-origin doesn't match the flex centre. */
.dir-pin {
    background: #2563eb;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    color: #fff;
    border: 2px solid #fff;
    line-height: 0;
}
/* Make the <i> itself a flex centring container so the Bootstrap-icon glyph
   lands exactly at the geometric centre regardless of the .bi::before
   vertical-align / line-height defaults. Width/height match the parent so the
   flex children fill the circle with the icon centred. */
.dir-pin i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    line-height: 1;
}
.dir-pin .bi::before {
    display: block;
    vertical-align: 0;
    line-height: 1;
}

.dir-pin--teacher    { background: #10b981; } /* emerald */
.dir-pin--translator { background: #06b6d4; } /* cyan */
.dir-pin--user       { background: #8b5cf6; } /* violet — distinct from the three provider hues */

/* ── Detail page ───────────────────────────────────────────── */
.provider-detail { max-width: 920px; margin: 0 auto; padding: 2.5rem 1rem 3rem; }

.provider-detail__header {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.provider-detail__avatar {
    width: 128px;
    height: 128px;
    border-radius: 14px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.provider-detail__avatar img { width: 100%; height: 100%; object-fit: cover; }
.provider-detail__avatar i { font-size: 3.5rem; color: #9ca3af; }

.provider-detail__title { font-weight: 700; margin: 0 0 0.25rem; letter-spacing: -0.02em; }
.provider-detail__subtitle { color: #6b7280; margin: 0 0 0.5rem; }

.provider-detail__facts { margin-top: 1.5rem; }
.provider-detail__facts dl { margin: 0; }
.provider-detail__facts dt { color: #6b7280; font-weight: 500; }
.provider-detail__facts dd { color: #1f2937; margin-bottom: 0.75rem; }

.provider-detail__map {
    height: 320px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-top: 1.5rem;
}

/* "Add your school / teacher listing" CTA on /directory. Subtle gradient against the
   default page background so it reads as an opportunity, not a system alert. */
.directory-cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.06));
    border-radius: 12px;
}

.directory-cta h5 { font-weight: 700; color: #1f2937; }

[data-theme="dark"] .directory-cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(124, 58, 237, 0.12));
}

[data-theme="dark"] .directory-cta h5 { color: #f3f4f6; }
