/*
 * Jacob Law Team Members – Frontend CSS v1.3.0
 * All rules prefixed .jltm- / #jltm- — zero global bleed.
 */

.jltm-wrapper {
    --jltm-navy:      #000733;
    --jltm-gold:      #b79b6d;
    --jltm-gold-dark: #9a7f52;
    --jltm-white:     #ffffff;
    --jltm-light:     #f4f4f6;
    --jltm-text:      #1a1a2e;
    --jltm-muted:     #6b6b7a;
    --jltm-radius:    10px;
    --jltm-shadow:    0 4px 20px rgba(0, 7, 51, 0.12);
    --jltm-trans:     0.3s ease;

    position: relative;
    font-family: inherit;
    padding-top: 20px;
    box-sizing: border-box;
}
.jltm-wrapper *,
.jltm-wrapper *::before,
.jltm-wrapper *::after { box-sizing: border-box; }



/* ════════════════════════════════════════
   STICKY FILTER BAR — Option C
════════════════════════════════════════ */
.jltm-filter-bar {
    background: #ffffff;
    border: 0.5px solid rgba(0,7,51,0.12);
    border-radius: var(--jltm-radius);
    padding: 20px 28px;
    display: flex;
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 32px;
    box-shadow: 0 2px 20px rgba(0,7,51,0.08);
    flex-wrap: nowrap;
    position: sticky;
    top: 80px;
    z-index: 9990;
}

.jltm-filter-field {
    flex: 1;
    min-width: 0;
}
.jltm-filter-field.jltm-filter-search { flex: 1.4; }

.jltm-filter-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--jltm-muted);
    margin-bottom: 8px;
    font-family: inherit;
}

.jltm-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid rgba(0,7,51,0.25);
    padding-bottom: 8px;
    transition: border-color var(--jltm-trans);
}
.jltm-filter-wrap:focus-within { border-bottom-color: var(--jltm-gold); }
.jltm-filter-wrap:focus-within .jltm-filter-icon { color: var(--jltm-gold); }

.jltm-filter-icon {
    font-size: 16px;
    color: var(--jltm-muted);
    flex-shrink: 0;
    transition: color var(--jltm-trans);
}

.jltm-filter-input,
.jltm-filter-select { display: none !important; }

.jltm-filter-input::placeholder { color: #bbb; font-weight: 300; }
.jltm-filter-input:focus { outline: none !important; box-shadow: none !important; border: none !important; }

.jltm-filter-caret {
    font-size: 11px;
    color: var(--jltm-muted);
    flex-shrink: 0;
    pointer-events: none;
    transition: transform var(--jltm-trans);
}
.jltm-filter-caret.open { transform: rotate(180deg); }

/* ── Custom dropdown ── */
.jltm-filter-value {
    flex: 1;
    font-size: 14px;
    font-weight: 300;
    color: var(--jltm-text);
    cursor: pointer;
    padding: 10px 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}
.jltm-filter-value.placeholder { color: #bbb; }

.jltm-custom-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: -1px;
    right: -1px;
    background: #ffffff;
    border: 0.5px solid rgba(0,7,51,0.15);
    box-shadow: 0 8px 32px rgba(0,7,51,0.10);
    z-index: 10000;
    max-height: 280px;
    overflow-y: auto;
    display: none;
}
.jltm-custom-dropdown.open { display: block; }

.jltm-dropdown-item {
    padding: 11px 16px;
    font-size: 13px;
    color: var(--jltm-text);
    border-bottom: 0.5px solid #f0e8d8;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background var(--jltm-trans), color var(--jltm-trans);
    font-family: inherit;
}
.jltm-dropdown-item:last-child { border-bottom: none; }
.jltm-dropdown-item:hover { background: #fdf6ee; color: #000733; }
.jltm-dropdown-item.active { color: #b79b6d; font-weight: 500; }
.jltm-dropdown-item .jltm-item-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #b79b6d; flex-shrink: 0;
    opacity: 0;
}
.jltm-dropdown-item.active .jltm-item-dot { opacity: 1; }

/* Wrap fields that have dropdowns */
.jltm-filter-field { position: relative; }

.jltm-filter-clear {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    outline: none !important;
    color: var(--jltm-muted);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    padding: 0 0 8px !important;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--jltm-trans);
    align-self: flex-end;
    flex-shrink: 0;
}
.jltm-filter-clear:hover { color: var(--jltm-navy) !important; }

.jltm-no-results {
    color: var(--jltm-muted);
    font-style: italic;
    padding: 20px 0;
    font-family: inherit;
}

/* Mobile: stack filters vertically */
@media (max-width: 700px) {
    .jltm-filter-bar {
        flex-wrap: wrap;
        gap: 20px;
        padding: 16px 18px;
        position: static;
    }
    .jltm-filter-field,
    .jltm-filter-field.jltm-filter-search { flex: 1 1 100%; }
}



/* ════════════════════════════════════════
   EMPLOYEE GRID
════════════════════════════════════════ */
.jltm-employees-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}
@media (max-width: 1400px) { .jltm-employees-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1100px) { .jltm-employees-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px)  { .jltm-employees-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (max-width: 600px)  { .jltm-employees-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 380px)  { .jltm-employees-grid { grid-template-columns: 1fr; } }

/* ── Employee Card ── */
.jltm-employee-card {
    background: var(--jltm-white);
    border-radius: var(--jltm-radius) !important;
    overflow: hidden;
    box-shadow: var(--jltm-shadow);
    transition: transform var(--jltm-trans), box-shadow var(--jltm-trans);
    text-align: center;
    display: flex;
    flex-direction: column;
}
.jltm-employee-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,7,51,.18);
}

/* ── Photo ── */
.jltm-photo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--jltm-light);
    display: block;
}
.jltm-photo-wrap::before {
    content: '';
    display: block;
    padding-top: 100%;
}
.jltm-photo-wrap > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
@supports (aspect-ratio: 1) {
    .jltm-photo-wrap::before { display: none; }
    .jltm-photo-wrap > * { position: static; width: 100%; height: 100%; }
}

.jltm-photo-wrap.has-reviews { cursor: pointer; }
.jltm-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.jltm-photo-wrap:hover .jltm-photo { transform: scale(1.05); }

.jltm-photo-overlay {
    position: absolute;
    inset: 0; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,7,51,.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--jltm-trans);
}
.jltm-photo-wrap.has-reviews:hover .jltm-photo-overlay,
.jltm-photo-wrap.has-reviews:focus  .jltm-photo-overlay { opacity: 1; }
.jltm-photo-wrap:focus-visible { outline: 2px solid var(--jltm-gold); outline-offset: 2px; }

.jltm-photo-overlay span {
    color: #ffffff;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: none;
    border: 1px solid rgba(255,255,255,0.6);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: inherit;
}

.jltm-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d0d4e8;
    color: #8890b0;
}
.jltm-photo-placeholder svg { width: 50%; height: 50%; }

/* ── Card Info ── */
.jltm-card-info {
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.jltm-emp-name { flex-shrink: 0; }
.jltm-emp-role { flex-shrink: 0; flex: 1; }
.jltm-reviews-btn { align-self: center; margin-top: auto; }

.jltm-emp-name {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: #000733;
    margin: 0 0 5px;
    line-height: 1.2;
}
.jltm-emp-role {
    font-size: 14px;
    color: var(--jltm-muted);
    margin: 0 0 16px;
    line-height: 1.4;
    font-family: inherit;
}

/* ── View Reviews button — navy bg, gold border, auto-width, no arrow ── */
.jltm-reviews-btn {
    display: inline-block;
    width: auto;
    background: var(--jltm-navy);
    color: #ffffff;
    border: 1.5px solid var(--jltm-gold);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.4px;
    text-transform: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    line-height: normal;
    text-decoration: none;
    text-align: center;
    transition: background var(--jltm-trans), color var(--jltm-trans), border-color var(--jltm-trans);
    white-space: nowrap;
    box-sizing: border-box;
}
.jltm-reviews-btn::after { content: none; display: none; }
.jltm-reviews-btn:hover {
    background: #b79b6d;
    color: #000733;
    border-color: #b79b6d;
}
.jltm-reviews-btn:focus-visible { outline: 2px solid var(--jltm-gold); outline-offset: 2px; }

/* ════════════════════════════════════════
   POPUP MODAL
════════════════════════════════════════ */
.jltm-popup-overlay {
    display: none;
    position: fixed;
    inset: 0; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 7, 51, 0.75);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.jltm-popup-overlay.open { display: flex; }

/* White background, clean card */
.jltm-popup {
    background: #ffffff;
    border-radius: 0 !important;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 48px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    animation: jltm-pop-in 0.3s cubic-bezier(0.175,0.885,0.32,1.275) both;
    font-family: inherit;
}
@media (max-width: 600px) {
    .jltm-popup-overlay { padding: 0 !important; align-items: flex-end !important; }
    .jltm-popup {
        padding: 48px 16px 28px !important;
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0 !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
        box-sizing: border-box !important;
        border-radius: 12px 12px 0 0 !important;
    }
    .jltm-popup-close {
        top: 12px !important;
        right: 12px !important;
        position: absolute !important;
        z-index: 10 !important;
    }
    .jltm-popup-header  { flex-direction: column !important; text-align: center !important; gap: 12px !important; }
    .jltm-popup-photo-wrap { width: 80px !important; height: 80px !important; }
    .jltm-popup-title   { font-size: 17px !important; }
    .jltm-popup-slider  { gap: 4px !important; }
    .jltm-slides-wrapper { width: 100% !important; }
    .jltm-slide         { padding: 20px 12px !important; width: 100% !important; box-sizing: border-box !important; }
    .jltm-slide-prev, .jltm-slide-next { font-size: 36px !important; width: 36px !important; min-width: 36px !important; }
    .jltm-read-more-btn { width: 100% !important; text-align: center !important; display: block !important; box-sizing: border-box !important; }
}

@keyframes jltm-pop-in {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

.jltm-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: var(--jltm-light);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--jltm-navy);
    transition: background var(--jltm-trans), color var(--jltm-trans);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    padding: 0;
}
.jltm-popup-close:hover { background: var(--jltm-navy); color: var(--jltm-gold); }
.jltm-popup-close:focus-visible { outline: 2px solid var(--jltm-gold); }

/* ── Popup header: larger photo ── */
.jltm-popup-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 12px;
}
.jltm-popup-photo-wrap {
    flex-shrink: 0;
    width: 120px;      /* enlarged from 80px */
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--jltm-gold);
    background: var(--jltm-light);
}
.jltm-popup-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.jltm-popup-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--jltm-navy);
    margin: 0;
    line-height: 1.3;
    font-family: inherit;
}
/* Name (span) in gold #b79b6d */
.jltm-popup-title span { color: #b79b6d; }

@media (max-width: 480px) {
    .jltm-popup-header  { flex-direction: column; text-align: center; }
    .jltm-popup-title   { font-size: 18px; }
    .jltm-popup-photo-wrap { width: 90px; height: 90px; }
}

/* ── Slider ── */
.jltm-popup-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 20px;
}
.jltm-slides-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 180px;
}

/* Slide: very light grey background, no border */
.jltm-slide {
    display: none;
    background: #f7f7f7;
    border: none;
    border-radius: 0 !important;
    padding: 32px 28px;
    text-align: center;
    animation: jltm-slide-in 0.35s ease both;
}
.jltm-slide.active { display: block; }
@keyframes jltm-slide-in {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

.jltm-stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 16px; }
.jltm-star       { font-size: 28px; color: #f4c430; line-height: 1; }
.jltm-star.empty { color: #ddd; }

.jltm-review-text {
    font-size: 15px;
    line-height: 1.75;
    color: var(--jltm-text);
    margin: 0 0 16px;
    font-style: italic;
    font-family: inherit;
}
.jltm-reviewer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--jltm-muted);
    font-family: inherit;
    margin: 0;
}

/* ── Arrows: gold, no background, medium size ── */
.jltm-slide-prev,
.jltm-slide-next {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #b79b6d !important;
    border-radius: 0 !important;
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 48px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-family: inherit;
    transition: opacity var(--jltm-trans);
    opacity: 0.85;
}
.jltm-slide-prev:hover,
.jltm-slide-next:hover  { opacity: 1; }
.jltm-slide-prev:disabled,
.jltm-slide-next:disabled { opacity: 0.2; cursor: not-allowed; }
.jltm-slide-prev:focus-visible,
.jltm-slide-next:focus-visible { outline: none; opacity: 1; }

/* ── Dots: removed ── */
.jltm-slide-dots { display: none !important; }

/* ── READ MORE REVIEWS: solid button ── */
.jltm-read-more-btn {
    display: block;
    width: fit-content;
    margin: 24px auto 0;
    background: var(--jltm-navy) !important;
    color: var(--jltm-gold) !important;
    border: 1.5px solid #b79b6d !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none !important;
    text-transform: uppercase;
    padding: 9px 28px !important;
    text-align: center;
    font-family: inherit;
    transition: background var(--jltm-trans), color var(--jltm-trans), border-color var(--jltm-trans);
}
.jltm-read-more-btn:hover,
.jltm-read-more-btn:focus,
.jltm-read-more-btn:active {
    background: #b79b6d !important;
    color: #000733 !important;
    border-color: #b79b6d !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.jltm-read-more-btn:focus-visible { outline: none !important; }

/* ── No employees ── */
.jltm-no-employees {
    color: var(--jltm-muted);
    font-style: italic;
    padding: 20px 0;
    font-family: inherit;
}

/* ════════════════════════════════════════
   PERSON CARD POPUP (search result)
════════════════════════════════════════ */
.jltm-person-overlay {
    display: none;
    position: fixed;
    inset: 0; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 7, 51, 0.75);
    z-index: 100002;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.jltm-person-overlay.open { display: flex; }
.jltm-person-popup {
    background: #ffffff;
    border-radius: 0 !important;
    width: 280px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    animation: jltm-pop-in 0.3s cubic-bezier(0.175,0.885,0.32,1.275) both;
    text-align: center;
    font-family: inherit;
}
.jltm-person-photo-wrap {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--jltm-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jltm-person-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    flex-shrink: 0;
}
.jltm-person-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d0d4e8;
    color: #8890b0;
}
.jltm-person-photo-placeholder svg { width: 50%; height: 50%; }
.jltm-person-info {
    padding: 18px 16px 20px;
}
.jltm-person-name {
    font-size: 20px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: var(--jltm-navy);
    margin: 0 0 5px;
    line-height: 1.2;
}
.jltm-person-role {
    font-size: 12px;
    color: var(--jltm-muted);
    margin: 0 0 16px;
    line-height: 1.4;
    font-family: inherit;
}
.jltm-person-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
}

@media (max-width: 400px) {
    .jltm-person-popup { width: 90vw; }
}

/* ════════════════════════════════════════
   SEARCH AUTOCOMPLETE DROPDOWN — Style A
════════════════════════════════════════ */
.jltm-name-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 0.5px solid rgba(0,7,51,0.10);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0,7,51,0.12);
    z-index: 10001;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 340px;
    overflow-y: auto;
    overflow: hidden;
}
.jltm-name-dropdown li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
    list-style: none;
}
.jltm-name-dropdown li:last-child { border-bottom: none; }
.jltm-name-dropdown li:hover,
.jltm-name-dropdown li.active { background: #fdf6ee; }

/* Circular photo — gold border */
.jltm-ac-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #b79b6d;
    background: #dde0ec;
}
.jltm-ac-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d0d4e0, #e8eaf2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b79b6d;
    color: #9098b8;
    overflow: hidden;
}
.jltm-ac-placeholder svg { width: 55%; height: 55%; }
.jltm-ac-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--jltm-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.jltm-ac-name strong { color: #9a7f52; font-weight: 700; }
.jltm-ac-no-results {
    padding: 14px 16px;
    color: var(--jltm-muted);
    font-size: 13px;
    font-style: italic;
    pointer-events: none;
}
