/* field-history.css */

.fh-value {
    cursor: pointer;
    border-bottom: 1px dotted #7a9bc4;
    transition: background-color .12s ease-in-out;
}
.fh-value:hover,
.fh-value:focus {
    background-color: #eef4fb;
    outline: none;
}
.fh-value.fh-open {
    background-color: #dceafa;
}
.fh-value .fh-empty,
.fh-table .fh-empty {
    color: #999;
    font-style: italic;
}

/* Popover shell (works alongside Bootstrap's own .popover rules) */
.fh-popover {
    max-width: 420px;
}
.fh-popover .popover-content,
.fh-popover .popover-body {
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

/* Non-Bootstrap fallback panel */
.fh-panel {
    position: absolute;
    z-index: 1080;
    max-width: 420px;
    background: #fff;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.fh-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    font-size: 13px;
}
.fh-panel-close {
    border: 0;
    background: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #888;
}
.fh-panel-body {
    max-height: 320px;
    overflow-y: auto;
}

/* History table */
.fh-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 12.5px;
}
.fh-table th,
.fh-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}
.fh-table thead th {
    position: sticky;
    top: 0;
    background: #f7f7f7;
    font-weight: 600;
    white-space: nowrap;
}
.fh-table tbody tr:last-child td {
    border-bottom: 0;
}
.fh-table tr.fh-current td {
    background: #f3f9f3;
    font-weight: 600;
}
.fh-table .fh-val {
    word-break: break-word;
    max-width: 220px;
}
.fh-table .fh-when,
.fh-table .fh-who {
    white-space: nowrap;
    color: #555;
}

.fh-loading,
.fh-error,
.fh-empty-list {
    padding: 12px;
    font-size: 12.5px;
}
.fh-loading  { color: #666; }
.fh-error    { color: #a94442; }
.fh-empty-list { color: #666; font-style: italic; }

.fh-note {
    padding: 6px 10px;
    border-top: 1px solid #eee;
    background: #fafafa;
    font-size: 11.5px;
    color: #666;
}
.fh-note-subtle { color: #999; }

@media print {
    .fh-value { border-bottom: 0; }
    .fh-popover, .fh-panel { display: none !important; }
}
