/* Clipped table values and the modal that shows them in full. */

.oc-truncated {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.oc-truncated:hover,
.oc-truncated:focus-visible {
    text-decoration: underline;
}

/* Unfold's CSS reset zeroes every margin, which takes the browser's own
   `margin: auto` centring of a modal dialog with it. */
.oc-truncated-modal {
    margin: auto;
    width: min(46rem, 90vw);
    padding: 1.25rem;
    border: 1px solid rgb(209, 213, 219);
    border-radius: .5rem;
    color: rgb(17, 24, 39);
    background: rgb(255, 255, 255);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

html.dark .oc-truncated-modal {
    border-color: rgb(63, 63, 70);
    color: rgb(244, 244, 245);
    background: rgb(24, 24, 27);
}

.oc-truncated-modal::backdrop {
    background: rgba(0, 0, 0, .5);
}

.oc-truncated-modal__value {
    margin: 0;
    max-height: 60vh;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.oc-truncated-modal__actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-top: 1rem;
}

.oc-truncated-modal__actions button,
.oc-truncated-modal__actions a {
    padding: .3rem .8rem;
    border: 1px solid rgb(209, 213, 219);
    border-radius: .3rem;
    font-size: .8rem;
    text-decoration: none;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

html.dark .oc-truncated-modal__actions button,
html.dark .oc-truncated-modal__actions a {
    border-color: rgb(63, 63, 70);
}

.oc-truncated-modal__close {
    margin-left: auto;
}
