/* Guild Teacher Directory — .gtd namespace
   Matches Figma: Desktop 1435:10933, Mobile 1820:15820
   Card: vertical layout — circle avatar, centered name, details, teal footer */

.gtd,
.gtd * {
    font-family: "Heebo", Sans-serif !important;
}

.gtd {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Filter bar ── */
.gtd__filter-bar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

/* 4 dropdowns in a row */
.gtd__dropdowns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* ── Filter dropdowns (multi-select checkbox) ── */
.gtd__filter-dropdown {
    position: relative;
}

/* Toggle button — matches site-wide select/input style */
.gtd__filter-toggle {
    width: 100%;
    height: var(--guild-field-h, 60px);
    padding: 14px 16px;
    padding-left: 44px;
    border: 1px solid #2e404a;
    border-radius: 10px;
    font-family: inherit;
    font-size: inherit;
    font-weight: 400;
    color: #2e404a;
    background: #fff;
    cursor: pointer;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Chevron on the left side (RTL) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='12' viewBox='0 0 21 12'%3E%3Cpath d='M1 1l9.5 9.5L20 1' stroke='%23003944' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 18px 10px;
}

.gtd__filter-toggle[aria-expanded="true"] {
    border-color: #003944;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='12' viewBox='0 0 21 12'%3E%3Cpath d='M1 10.5l9.5-9.5L20 10.5' stroke='%23003944' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}

/* Hide the inline SVG chevron — using background-image instead */
.gtd__filter-toggle svg { display: none; }

/* Panel */
.gtd__filter-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #2e404a;
    border-radius: 10px;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Each checkbox row */
.gtd__filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
}

.gtd__filter-option:hover { background: #f0f3f5; }
.gtd__filter-option.is-checked { background: #e8f4f8; }

.gtd__filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #225D73;
}

.gtd__filter-option span:first-of-type { flex: 1; }

.gtd__filter-count {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Active selection + focus */
.gtd__filter-toggle.has-selection {
    border-color: #225D73;
    color: #225D73;
    font-weight: 600;
}

.gtd__filter-toggle:focus {
    border-color: #003944;
    outline: none;
}

/* Search row — single pill bar, button overlays the left (RTL) end */
.gtd__search-row {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.gtd__search {
    width: 100%;
    position: relative;
}

.gtd__search-input {
    width: 100%;
    max-width: 550px;
    height: var(--guild-field-h, 60px);
    padding: 0 60px 0 40px !important;
    border: 1px solid #2e404a;
    border-radius: 50px !important;
    font-size: inherit;
    font-weight: 400;
    color: #2e404a;
    outline: none;
    box-sizing: border-box;
}

.gtd__search-input:focus {
    border-color: #003944;
}

.gtd__search-icon {
    position: absolute;
    inset-inline-start: 22px;          /* right side visually in RTL */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.gtd__search-btn {
    position: absolute;
    inset-inline-end: 0;               /* left side visually in RTL */
    top: 0;
    height: var(--guild-field-h, 60px);
    padding: 0 36px;
    background: #225d73;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.5rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    z-index: 1;
}

.gtd__search-btn:hover {
    background: #1a4d60;
}

/* ── Active filters ── */
.gtd__active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1rem;
    color: #2e404a;
}

.gtd__clear-filters {
    color: #dc3232;
    text-decoration: underline;
    font-size: 0.875rem;
}

.gtd__clear-filters:hover {
    color: #a00;
}

/* ── Card grid — 2 columns ── */
.gtd__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ── Single card — vertical layout ── */
.gtd-card {
    border: 1px solid #003944;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Card header: avatar + name side by side ── */
.gtd-card__header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 24px 16px;
    text-decoration: none;
    color: inherit;
}

.gtd-card__header:hover {
    text-decoration: none;
    color: inherit;
}

.gtd-card__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 3px solid #003944;
}

.gtd-card__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder silhouette (transparent PNG) — show the whole figure
   instead of cropping it like we do for real headshots, and pull it
   in slightly so it doesn't touch the circular border. */
.gtd-card__avatar-img--placeholder {
    width: 85%;
    height: 85%;
    object-fit: contain;
}

.gtd-card__name {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #003944;
    text-align: right;
    line-height: 1.3;
}

/* ── Card body: details ── */
.gtd-card__body {
    padding: 0 24px 20px;
    flex: 1;
    text-align: right;
    min-height: 100px;
}

.gtd-card__detail {
    margin: 0 0 4px;
}

.gtd-card__detail strong {
    font-weight: 700;
}

/* ── Teal footer bar ── */
.gtd-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 34px;
    min-height: 67px;
    background: #003944;
    direction: ltr;
}

/* Social + Contact wrapper groups */
.gtd-card__social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gtd-card__contact-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* Social icon links (Facebook, Instagram) */
.gtd-card__social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    text-decoration: none;
    transition: opacity .15s;
    flex-shrink: 0;
}

.gtd-card__social-icon img {
    width: 35px;
    height: 35px;
    display: block;
}

.gtd-card__social-icon:hover {
    opacity: .75;
}

/* Contact links with white circle + text */
.gtd-card__contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    transition: opacity .15s;
}

.gtd-card__contact-link:hover {
    opacity: .8;
    color: #fff;
}

.gtd-card__contact-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
}

.gtd-card__contact-icon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    display: block;
}

.gtd-card__contact-text {
    direction: ltr;
    unicode-bidi: embed;
}

/* ── Load More ── */
.gtd__load-more-wrap {
    text-align: center;
    margin-top: 40px;
}

.gtd__load-more {
    padding: 4px 18px;
    background: #225D73;
    color: #fff;
    font-family: 'Heebo', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.2s;
}

.gtd__load-more:disabled { opacity: 0.6; cursor: wait; }

.gtd__load-more-count {
    display: block;
    margin-top: 12px;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ── Empty state ── */
.gtd__empty {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gtd__empty-title {
    margin: 8px 0 0;
    color: #003944;
}

.gtd__empty-sub {
    margin: 0;
    color: #5a6a72;
}

/* ── Tablet ── */
@media (max-width: 1024px) {
    .gtd__grid {
        grid-template-columns: 1fr;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }

    .gtd__dropdowns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Mobile ── */
@media (max-width: 767px) {
    .gtd {
        padding: 0 10px;
    }

    .gtd__dropdowns {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .gtd__select {
        height: 50px;
        font-size: 1.125rem;
        padding: 10px 12px;
        padding-left: 36px;
    }

    .gtd__search-row {
        max-width: 100%;
    }

    .gtd__search-input {
        height: var(--guild-field-h, 42px);
        font-size: 1rem;
        padding-inline-start: 40px;
        padding-inline-end: 110px;
    }

    .gtd__search-btn {
        height: var(--guild-field-h, 42px);
        font-size: 1rem;
        padding: 0 24px;
    }

    .gtd-card__avatar {
        width: 90px;
        height: 90px;
    }

    .gtd-card__name {
        font-size: 1.4rem;
    }

    .gtd-card__footer {
        gap: 10px;
        padding: 0.6rem 1rem;
    }

    .gtd-card__contact-text {
        font-size: 0.75rem;
    }

    .gtd-card__footer {
        flex-direction: column-reverse;
        align-items: stretch;
        padding: 12px 16px;
        gap: 12px;
    }

    .gtd-card__contact-links {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        margin-left: 0;
    }

    .gtd-card__contact-link {
        flex-direction: row-reverse;
    }

    .gtd-card__social-links {
        justify-content: center;
        gap: 12px;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    /* .gtd__load-more inherits base rule (4px 18px / 1rem) */
}
