/* ============================================================
   GLENARM CASTLE DIGITAL ARCHIVE — clean fresh stylesheet
   Goals:
     1. Teal directory styling
     2. Popup card can extend past the table (not clipped)
     3. Text and image centred inside the card
   ============================================================ */

/* ---------- 1. TEAL DIRECTORY TABLE ---------- */
table[class*="stafflist"] {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    background: transparent !important;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}
table[class*="stafflist"] th {
    background: #17a2b8 !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 16px 18px !important;
    border: none !important;
    text-align: left !important;
}
table[class*="stafflist"] tbody tr {
    background: #fff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
table[class*="stafflist"] tbody tr:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    cursor: pointer !important;
}
table[class*="stafflist"] td {
    padding: 14px 18px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    color: #333 !important;
    vertical-align: middle !important;
}

/* Round photo thumbnails in the table */
table[class*="stafflist"] tbody td:last-child img {
    width: 52px !important;
    height: 52px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 2px solid #17a2b8 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15) !important;
}

/* Search box */
input[class*="stafflist"],
[class*="stafflist"] input[type="text"] {
    border: 1px solid #ddd !important;
    border-radius: 30px !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    outline: none !important;
}

/* ---------- 2. LET THE POPUP CARD EXTEND PAST THE TABLE ---------- */
/* Stops the table/containers from clipping the card when it opens */
.staffdirectory,
.stafflists,
.staffdirectory tbody,
.staffdirectory tr,
.staffdirectory td,
.stafflists tbody,
.stafflists tr,
.stafflists td,
table[class*="stafflist"],
table[class*="stafflist"] tbody,
table[class*="stafflist"] tr,
table[class*="stafflist"] td,
.wpb_wrapper,
.eltd-content,
.eltd-content-inner,
.eltd-container,
.eltd-container-inner {
    overflow: visible !important;
}

/* ---------- 3. THE POPUP CARD ---------- */
.tippy-box {
    background: #f1f1f1 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 50px rgba(0,0,0,0.30) !important;
    max-width: 360px !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 99999 !important;
}
.tippy-box .tippy-arrow {
    display: none !important;
}

/* Text and image CENTRED inside the card */
.tippy-content {
    background: #f1f1f1 !important;
    color: #333 !important;
    padding: 24px 28px !important;
    font-size: 18px !important;
    line-height: 1.7 !important;
    text-align: center !important;        /* centres the text */
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}
.tippy-content img {
    display: block !important;
    margin: 16px auto 0 !important;        /* centres the image */
    max-width: 200px !important;
    max-height: 220px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border: 1px solid #ccc !important;
    border-radius: 10px !important;
}

/* ---------- Welcome / no-results placeholder ---------- */
[class*="stafflist"] .no-results,
[class*="stafflist"] td:only-child,
.stafflist_no_results {
    text-align: center !important;
    font-size: 20px !important;
    color: #888 !important;
    padding: 48px 20px !important;
    font-style: italic !important;
}