/* Row Detail Popup */

/* Dialog */
.row-detail {
    width: 90vw;
    height: 90vh;
    max-width: none;
    max-height: none;
    border: none;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.row-detail[open] {
    display: flex;
    flex-direction: column;
}

.row-detail::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

/* Header */
.row-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    flex-shrink: 0;
}

.row-detail__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-detail__controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.row-detail__checkbox-label {
    font-size: 0.8rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.row-detail__close {
    font-size: 24px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

.row-detail__close:hover {
    color: #000;
}

/* Summary jumbotron */
.row-detail__summary {
    background: #f5f7fa;
    padding: 10px 24px;
    font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
    font-size: 0.8rem;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.row-detail__summary-field {
    margin-right: 16px;
}

/* Tabs */
.row-detail__tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    padding: 0 24px;
    background: #fff;
    flex-shrink: 0;
}

.row-detail__tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
}

.row-detail__tab:hover {
    color: #333;
}

.row-detail__tab--active {
    border-bottom: 2px solid #3b82f6;
    color: #3b82f6;
    margin-bottom: -2px;
    font-weight: 600;
}

/* Content area */
.row-detail__content {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
    font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}

/* Tree blocks */
.row-detail__block {
    margin-bottom: 6px;
}

.row-detail__block-header {
    cursor: pointer;
    padding: 5px 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-weight: 600;
    user-select: none;
    font-size: 0.8rem;
}

.row-detail__block-header:hover {
    background: #e9ecef;
}

.row-detail__block-arrow {
    display: inline-block;
    width: 14px;
    text-align: center;
}

.row-detail__block-body {
    padding-left: 20px;
    border-left: 2px solid #e9ecef;
    margin-left: 8px;
    margin-top: 2px;
}

.row-detail__block--collapsed > .row-detail__block-body {
    display: none;
}

/* Row separator for multi-row blocks */
.row-detail__row-separator {
    color: #adb5bd;
    font-size: 0.75rem;
    padding: 4px 0 2px;
    border-top: 1px dashed #e9ecef;
    margin-top: 4px;
}

/* Fields */
.row-detail__field {
    display: flex;
    padding: 1px 0;
}

.row-detail__field-key {
    color: #6c757d;
    min-width: 220px;
    max-width: 220px;
    padding-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.row-detail__field-value {
    word-break: break-all;
    display: flex;
    align-items: center;
}

/* Syntax coloring */
.row-detail__value--number {
    color: #0d6efd;
}

.row-detail__value--string {
    color: #212529;
}

.row-detail__value--date {
    color: #198754;
}

.row-detail__value--null {
    color: #adb5bd;
    font-style: italic;
}

/* Search highlight */
.row-detail__field--highlighted {
    background: #fff3cd;
    border-radius: 2px;
}

/* Spinner */
.row-detail__spinner {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Error */
.row-detail__error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* Empty state */
.row-detail__empty {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Highlight input in header */
.row-detail__highlight-input {
    width: 140px;
    padding: 3px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: inherit;
}

.row-detail__highlight-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Row tags (EXPIRED, FUTURE) — inline next to date values */
.row-detail__tag {
    display: inline-block;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    vertical-align: baseline;
    line-height: 1.4;
}

.row-detail__tag--expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.row-detail__tag--future {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}
