/* profile_details component — colors via theme variables, font via global */

.pd-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    font-family: var(--font-family);
    color: var(--text-main);
}
.pd-header {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    background: var(--table-header-bg);
    border-bottom: 1px solid var(--border-color);
}
.pd-icon {
    width: 56px; height: 56px; flex-shrink: 0;
    object-fit: contain;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
}
.pd-icon[src=""], .pd-icon:not([src]) { visibility: hidden; }
.pd-titles { flex: 1; min-width: 0; }
.pd-title { margin: 0; color: var(--text-main); }
.pd-subtitle { color: var(--text-muted); margin-top: 2px; }
/* Icon button off the --icon-* ramp (fa.css). */
.pd-close {
    background: var(--icon-bg); border: 0;
    line-height: 1;
    cursor: pointer; color: var(--text-muted);
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2rem; min-height: 2rem;
    font-size: var(--fs-2xl);
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 120ms, color 120ms;
}
.pd-close:hover  { color: var(--primary-color); background: var(--icon-bg-hover); }
.pd-close:active { background: var(--icon-bg-active); }

.pd-section { padding: 14px 18px; border-top: 1px solid var(--border-color); }
.pd-section:first-of-type { border-top: none; }
.pd-section-title {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.pd-dl {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 4px 12px;
    margin: 0 0 10px;
}
.pd-dl dt { color: var(--text-muted); }
.pd-dl dd { margin: 0; color: var(--text-main); }

.pd-source-link {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
}
.pd-source-link:hover { background: rgba(59, 130, 246, 0.12); }

.pd-table-wrap {
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
.pd-meas-table {
    width: 100%;
    border-collapse: collapse;
}
.pd-meas-table thead th {
    position: sticky; top: 0;
    background: var(--table-header-bg);
    text-align: left;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}
.pd-meas-table tbody td {
    padding: 5px 10px;
    border-bottom: 1px solid var(--border-color);
}
.pd-meas-table .pd-num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-meas-table .pd-flag-not_measured { color: var(--text-muted); font-style: italic; }
.pd-meas-table .pd-flag-bin_only     { background: rgba(148,163,184,0.08); }

/* Popup variant */
.pd-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.pd-popup-overlay[aria-hidden="false"] { display: flex; }
.pd-popup-card {
    background: transparent;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow: auto;
}
