.tte-annotation-reader {
    width: 100%;
    padding: 24px 0 0;
    letter-spacing: normal;
}

.tte-annotation-toolbar,
.tte-annotation-toolbar__left,
.tte-annotation-controls,
.tte-annotation-page-controls,
.tte-annotation-search-nav,
.tte-annotation-search-nav__pager,
.tte-annotation-transcription-toolbar,
.tte-annotation-language-control,
.tte-annotation-font-controls {
    display: flex;
    align-items: center;
}

.tte-annotation-toolbar {
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: nowrap;
    margin-bottom: 1.5rem;
}

.tte-annotation-toolbar__left {
    gap: .5rem;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.tte-annotation-toolbar button,
.tte-annotation-toolbar__button,
.tte-annotation-search-nav button,
.tte-annotation-controls button {
    appearance: none;
    border: 1px solid #111;
    border-radius: 0;
    padding: .55rem .8rem;
    background: #fff;
    color: #111;
    font: inherit;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
}

.tte-annotation-toolbar__left > button,
.tte-annotation-menu-wrap > button,
.tte-annotation-toolbar__button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 32px;
    height: auto;
    border: 2px outset buttonborder;
    padding: 4px 10px;
    background: #efefef;
    font: 15px Arial, sans-serif;
    line-height: 20px;
    white-space: nowrap;
}

.tte-annotation-reader a.tte-annotation-toolbar__button {
    color: #111;
    text-decoration: none;
    letter-spacing: normal;
    font-family: Arial, sans-serif;
}

.tte-annotation-toolbar button:hover,
.tte-annotation-toolbar__button:hover,
.tte-annotation-search-nav button:hover,
.tte-annotation-controls button:hover {
    background: #f1f1f1;
    color: #111;
}

.tte-annotation-menu-wrap {
    position: relative;
}

.tte-annotation-menu {
    position: absolute;
    z-index: 1000;
    top: calc(100% + .5rem);
    left: 0;
    width: 260px;
    max-width: 90vw;
    padding: .75rem;
    border: 1px solid #000;
    border-radius: 12px;
    background: #fff;
}

.tte-annotation-menu.tte-annotation-toc {
    width: 480px;
    box-shadow: 4px 4px 0 #000;
}

.tte-annotation-menu[hidden],
.tte-annotation-search[hidden],
.tte-annotation-search-nav[hidden],
.tte-annotation-results[hidden],
.tte-annotation-viewer-column[hidden],
.tte-annotation-table-column[hidden],
.tte-annotation-language-control[hidden],
.tte-annotation-transcription[hidden],
.tte-annotation-table tr[hidden] {
    display: none !important;
}

.tte-annotation-menu input {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: .5rem;
    border: 1px solid #000;
    border-radius: 999px;
    padding: .4rem .8rem;
}

.tte-annotation-menu ul {
    max-height: 360px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tte-annotation-pages ul {
    max-height: 320px;
}

.tte-annotation-menu li {
    margin: 0 0 .4rem;
    padding: 0;
}

.tte-annotation-menu li::before {
    content: none !important;
}

.tte-annotation-menu li button {
    display: block;
    box-sizing: border-box;
    height: auto;
    width: 100%;
    border: 1px solid #000;
    border-radius: 8px;
    padding: .5rem .75rem;
    background: #fff;
    color: #111;
    text-align: left;
    font: inherit;
    line-height: 24px;
}

.tte-annotation-pages li:nth-child(even) button,
.tte-annotation-menu li button[data-level="1"] {
    background: #f0f0f0;
}

.tte-annotation-menu li button[data-level="2"],
.tte-annotation-menu li button[data-level="3"],
.tte-annotation-menu li button[data-level="4"],
.tte-annotation-menu li button[data-level="5"] {
    background: #e8e8e8;
}

.tte-annotation-menu li button:hover {
    background: #d6d6d6;
}

.tte-annotation-menu__empty {
    padding: .5rem .75rem;
    color: #777;
    text-align: center;
}

.tte-annotation-search-arrow {
    display: inline-block;
    margin-left: .25rem;
    font-size: .8em;
}

.tte-annotation-search {
    margin-bottom: 0;
    padding: 16px 0;
    background: transparent;
}

.tte-annotation-search__fields {
    display: grid;
    grid-template-columns: minmax(0, calc(66.666667% - 10px)) minmax(0, 1fr);
    gap: 30px;
}

.tte-annotation-search__fields > input {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    height: 100%;
    padding: 5px;
    appearance: none;
    border: 1px solid #ddd;
    border-radius: 0;
    background: #f9f9f9;
    font: 13.3333px Arial, sans-serif;
}

.tte-annotation-search__fields > input,
.tte-annotation-search .choices__input.choices__input--cloned {
    font-family: Arial, sans-serif !important;
}

.tte-annotation-search input::placeholder {
    color: #6c757d;
    font-style: normal;
    opacity: 1;
}

.tte-annotation-search .choices {
    width: 100%;
    margin: 0;
}

.tte-annotation-search .choices__inner {
    display: flex;
    min-height: 34px;
    border: 1px solid #ddd;
    border-radius: 2.5px;
    background: #f9f9f9;
}

.tte-annotation-search .choices__input.choices__input--cloned {
    float: left;
    height: auto;
    min-height: 0;
    font: 14px Arial, sans-serif;
}

.tte-annotation-search .choices__list--multiple {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 3px;
}

.tte-annotation-search .choices__list--multiple .choices__item {
    border: 0;
    border-radius: 20px;
    padding: 2px 14px 2px 10px;
    background: #f1eee9;
    color: #141414;
    font-size: 12px;
}

.tte-annotation-search .choices__button {
    border-left-color: #d45135 !important;
    filter: invert(1);
}

.tte-annotation-search__actions {
    display: flex;
    justify-content: center;
    gap: 27.2px;
    margin-top: 24px;
}

.tte-annotation-search__actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 400;
    text-decoration: none;
}

.tte-annotation-search__actions .btn > span {
    text-decoration: underline;
}

.tte-annotation-search__actions .btn-outline-primary {
    color: #e64626;
}

.tte-annotation-search__actions .btn-outline-primary:hover {
    color: #fff;
}

.tte-annotation-search-nav {
    justify-content: flex-start;
    gap: 10px;
    padding: 24px 0;
}

.tte-annotation-search-nav__pager {
    gap: .5rem;
}

.tte-annotation-search-nav p,
.tte-annotation-page-controls p {
    margin: 0;
    font-weight: 700;
}

.tte-annotation-search-nav p {
    font-weight: 400;
}

.tte-annotation-search-nav [data-annotation-results-toggle],
.tte-annotation-results button {
    height: auto;
    border: 2px outset buttonborder;
    border-radius: 0;
    padding: 1px 6px;
    background: #efefef;
    color: #111;
    font: 13.3333px Arial, sans-serif;
}

.tte-annotation-search-nav .tte-annotation-arrow {
    width: 22px;
    height: 22px;
    border: 0;
    padding: 0;
    background-color: transparent;
}

.tte-annotation-results {
    width: 100%;
    max-height: 400px;
    overflow: auto;
    margin-bottom: 20px;
    border: 1px solid #111;
}

.tte-annotation-results table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tte-annotation-results td {
    border: 1px solid #ccc;
    padding: .5rem;
}

.tte-annotation-frame {
    border: 0;
    padding: 0;
}

.tte-annotation-controls {
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 10px;
}

.tte-annotation-controls .tte-annotation-panel-toggle,
.tte-annotation-controls .tte-annotation-page-button {
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    font-weight: 700;
}

.tte-annotation-page-controls {
    justify-content: center;
    gap: .5rem;
}

.tte-annotation-controls .tte-annotation-page-button {
    font-weight: 400;
    line-height: 24px;
}

.tte-annotation-arrow {
    display: inline-block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    background-size: contain !important;
}

.tte-annotation-reader .tte-annotation-arrow--left {
    background: url('data:image/svg+xml;utf8,<svg width="10" height="18" viewBox="0 0 10 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 1L1 9L9 17" stroke-width="1.3px" stroke="%23000000"/></svg>') no-repeat center;
}

.tte-annotation-reader .tte-annotation-arrow--right {
    background: url('data:image/svg+xml;utf8,<svg width="10" height="18" viewBox="0 0 10 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 17L9 9L1 1" stroke-width="1.3px" stroke="%23000000"/></svg>') no-repeat center;
}

.tte-annotation-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 1fr);
    margin: 0;
}

.tte-annotation-columns.has-no-transcription,
.tte-annotation-columns.is-facsimile-hidden,
.tte-annotation-columns.is-transcription-hidden {
    grid-template-columns: 1fr;
}

.tte-annotation-viewer-column,
.tte-annotation-table-column {
    box-sizing: border-box;
    min-width: 0;
    min-height: 750px;
    max-height: 750px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.tte-annotation-viewer-column {
    padding-right: 15px;
}

.tte-annotation-table-column {
    padding-left: 15px;
}

.tte-annotation-viewer,
.tte-annotation-viewer > div {
    height: 100% !important;
}

.tte-annotation-table-column {
    overflow: auto;
}

.tte-annotation-table {
    width: 100%;
    border: 1px solid #ced4da;
    border-collapse: collapse;
    margin: 0;
    font-family: sans-serif;
}

.tte-annotation-table thead {
    position: sticky;
    z-index: 3;
    top: 0;
    background: #424242;
}

.tte-annotation-table th,
.tte-annotation-table td {
    border: 1px solid #ced4da;
    padding: 10px;
    vertical-align: top;
}

.tte-annotation-table th {
    background: #424242;
    color: #fff;
    text-align: center;
}

.tte-annotation-transcription-toolbar {
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
}

.tte-annotation-language-control,
.tte-annotation-font-controls {
    gap: 6px;
}

.tte-annotation-language-control label {
    margin: 0;
    font-weight: 600;
}

.tte-annotation-language-control select {
    min-width: 110px;
    padding: 4px 28px 4px 8px;
}

.tte-annotation-font-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #000;
    border-radius: 50%;
    padding: 0;
    background: #fff;
    color: #003580;
    font: 13px Arial, sans-serif;
    line-height: 1;
    cursor: pointer;
}

.tte-annotation-transcription {
    font-size: var(--base-font);
    white-space: pre-wrap;
}

.tte-annotation-transcription p {
    font-size: 1em;
}

.tte-annotation-transcription h1 { font-size: calc(var(--base-font) * 2.5) !important; font-weight: 700 !important; }
.tte-annotation-transcription h2 { font-size: calc(var(--base-font) * 2.2) !important; font-weight: 700 !important; }
.tte-annotation-transcription h3 { font-size: calc(var(--base-font) * 2) !important; font-weight: 700 !important; }
.tte-annotation-transcription h4 { font-size: calc(var(--base-font) * 1.5) !important; font-weight: 700 !important; }
.tte-annotation-transcription h5 { font-size: calc(var(--base-font) * 1.25) !important; font-weight: 700 !important; }
.tte-annotation-transcription h6 { font-size: calc(var(--base-font) * 1.1) !important; font-weight: 700 !important; }

.tte-annotation-table tr.is-search-match {
    background: #e0fce0;
}

.tte-annotation-highlight {
    background: transparent;
    color: inherit;
    padding: 0;
    font-weight: 700;
}

.tte-annotation-tag {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    margin: .3rem;
    border-radius: 16px;
    padding: 0 .5rem;
    background: #e4e5e5;
    color: #515c66;
}

.tte-annotation-description {
    margin-top: .5rem;
    text-align: center;
}

.tte-annotation-viewer .anno-gallery-nav,
.tte-annotation-viewer .gv-anno-set-filter {
    display: none !important;
}

.tte-annotation-error {
    padding: 1rem;
    color: #8a1f11;
}

@media (max-width: 900px) {
    .tte-annotation-search__fields,
    .tte-annotation-columns { grid-template-columns: 1fr; }
    .tte-annotation-controls { align-items: flex-start; }
    .tte-annotation-viewer-column,
    .tte-annotation-table-column { height: 600px; min-height: 600px; max-height: 600px; }
    .tte-annotation-viewer-column,
    .tte-annotation-table-column { padding-right: 0; padding-left: 0; }
}

@media (max-width: 600px) {
    .tte-annotation-toolbar,
    .tte-annotation-toolbar__left { flex-wrap: wrap; }
    .tte-annotation-toolbar__left { flex-shrink: 1; }
    .tte-annotation-controls { align-items: stretch; flex-direction: column; }
    .tte-annotation-page-controls { order: -1; }
}
