.photo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans, system-ui, sans-serif);
    min-height: 2.5rem;
}

.photo-event {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-strong, #111);
}

.photo-source {
    font-size: 0.85rem;
    color: var(--text-muted, #374151);
}

.photo-source-member {
    font-style: italic;
    color: var(--text-muted, #374151);
}

.image-wrap {
    position: relative;
}

.img-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: img-spin 0.75s linear infinite;
    pointer-events: none;
}

.img-spinner.hidden { display: none; }

@keyframes img-spin {
    to { transform: rotate(360deg); }
}

:root {
    --nav-bg: #E8E9EB; /* slate-900 */
    --nav-fg: #111111; /* gray-200  */
    --nav-fg-dim: #cbd5e1; /* slate-300 */
    --nav-accent: #38bdf8; /* sky-400   */
}

* {
    box-sizing: border-box;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    border-bottom: 2px solid #000000;
    display: flex;
    justify-content: center;
}

.site-nav .nav-inner {
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center; /* center the menu */
}

.menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.menu li {
    display: flex;
    align-items: center;
}

.menu li form {
    margin: 0;
}

/* shared styles for links + logout button */
.menu a,
.menu-button-link {
    color: var(--nav-fg);
    text-decoration: none;
    font-weight: 700;
    font-size : inherit;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: inline-block;
}

/* make button look like a link */
.menu-button-link {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

/* shared hover/focus behavior */
.menu a:hover,
.menu a:focus,
.menu-button-link:hover,
.menu-button-link:focus {
    color: var(--nav-fg);
    text-decoration: underline;
    outline: none;
}

/* divider between groups */
.menu .divider {
    width: 1px;
    background: rgba(0,0,0,0.25);
    margin: 0 0.75rem;
}


@media (max-width: 700px) {
    .site-nav .nav-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .menu {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}


body {
    background: #E8E9EB;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16.5pt;
    color: #242424;

}


/* ── Page layout ─────────────────────────────────────────── */
.photo-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.viewer-area {
    flex: 1 1 auto;
    min-width: 0;
}

/* ── Viewer ───────────────────────────────────────────────── */
.viewer {
    position: relative;
    height: 75vh;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* The wrapper shrink-wraps to the rendered image size */
.image-wrap {
    position: relative;
    display: inline-block; /* shrink to content (the img) */
    /*max-width: 100%; */
    max-height: 100%;
}

    /* The image keeps your letterbox behavior */
    .image-wrap img {
        display: block; /* remove inline-gap */
        max-width: 100%;
        max-height: 75vh; /* matches .viewer height cap */
        object-fit: contain;
        border-radius: 8px;
        background: #000; /* optional letterbox color inside image box */
    }

/* The overlay sits exactly on top of the image area */
#tagLayer {
    position: absolute;
    inset: 0; /* left:0; top:0; right:0; bottom:0 */
    z-index: 2;
    pointer-events: none;
}

/* Optional: how each tag box looks */
.tag-box {
    position: absolute;
    border: 1px solid transparent;
    box-sizing: border-box;
    border-radius: 2px;
}

.tag-box span{
    position: absolute;
    top: -3em;          /* position label above box */
    left: 0;
    background: rgba(255,255,255,0.85); /* light background */
    color: #111;          /* dark text */
    font-size: 0.9rem;    /* smaller text */
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none; /* optional: prevent blocking hover */
    white-space: nowrap;
}

#photoDescription {
    /* max-width : 1500px; */
    margin-top: 0.5rem;
    font-size: 1.5rem;
    color: #242424; /* or whatever fits your theme */
    text-align: center;
    font-weight: bold; /* thicker �block letters� */
    letter-spacing: 0.6px; /* 0.3px*/
}
.arrow {
    border: none;
    background: #CCCCCC;
    color: #242424;
    font-size: 2rem;
    width: 56px;
    height: 35px;
    border-radius: 10%;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .arrow:hover {
        background: #B5B5B5;
    }

    .arrow:active {
        transform: scale(0.9);
    }

/* ── Controls bar ─────────────────────────────────────────── */
.viewer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.6rem 0 0.2rem;
}

.details-toggle {
    padding: 0.35rem 1.4rem;
    border-radius: 6px;
    background: var(--surface, #fff);
    border: 1.5px solid rgba(0,0,0,0.25);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    color: #242424;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.details-toggle:hover  { background: #eef2ff; }

.details-toggle.active {
    background: #38bdf8;
    color: #fff;
    border-color: #38bdf8;
}

/* ── Side panels ──────────────────────────────────────────── */
.photo-panels {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    width: 260px;
    flex-shrink: 0;
}

.photo-layout.panels-open .photo-panels {
    display: flex;
}

.panel {
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 1rem 1.2rem;
}

.panel-title {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #374151;
}

.panel-filters {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.panel-filters label {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    gap: 0.2rem;
}

.panel-filters select {
    font-size: 0.85rem;
    padding: 0.3rem 0.4rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
}

.checkbox-label {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* ── Info panel content ───────────────────────────────────── */
#photoDescription {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    text-align: left;
    font-weight: normal;
    letter-spacing: normal;
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.tag-list li {
    font-size: 0.875rem;
    color: #242424;
    padding: 0.3rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.tag-list li:last-child { border-bottom: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 820px) {
    .photo-layout {
        flex-direction: column;
    }
    .photo-panels {
        width: 100%;
    }
}

select {
  padding: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

/* Family Member Table */
#memberTable {
    width: auto;
    border-collapse: collapse;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    background-color: #ffffff;
}

/* Header */
#memberTable thead th {
    text-align: center;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb; /* light gray */
    background-color: #f9fafb;
}

/* Body cells */
#memberTable tbody td {
    text-align: center;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Zebra striping */
#memberTable tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Hover highlight */
#memberTable tbody tr:hover {
    background-color: #eef2ff; /* subtle blue */
}

/* Secondary name text (social name, birth last name) */
#memberTable .name-sub {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
}

/* Tight numeric columns (like birth year) */
#memberTable td:last-child {
    text-align: center;
    color: #374151;
}

svg {
  border: 2px solid #333;
  background: #f5f5f5;
}