/* PDF Viewer - Unified Toolbar */
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: #f6f6f6;
    border-bottom: 1px solid #e0e0e0;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 44px;
    box-sizing: border-box;
}

.pdf-toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pdf-toolbar-nav {
    flex: 1;
    justify-content: center;
}

.pdf-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: #424242;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
}

.pdf-toolbar-btn:hover:not(:disabled) {
    background: #e8e8e8;
    color: #222;
}

.pdf-toolbar-btn:active:not(:disabled) {
    background: #d8d8d8;
}

.pdf-toolbar-btn:disabled {
    opacity: 0.38;
    cursor: default;
}

.pdf-toolbar-btn.active {
    background: #ddeaf8;
    color: #2a72c3;
}

.pdf-page-info {
    font-size: 13px;
    color: #424242;
    text-align: center;
    padding: 0 4px;
    user-select: none;
}

.pdf-page-input {
    width: 48px;
    height: 28px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 13px;
    text-align: center;
    outline: none;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    -moz-appearance: textfield;
}

.pdf-page-input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.pdf-page-input::-webkit-outer-spin-button,
.pdf-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pdf-zoom-level {
    font-size: 13px;
    color: #424242;
    min-width: 46px;
    text-align: center;
    padding: 0 4px;
    user-select: none;
}

.pdf-toolbar-label {
    font-size: 13px;
    color: #424242;
    white-space: nowrap;
    user-select: none;
}

.pdf-toolbar-sep {
    display: inline-block;
    width: 1px;
    height: 22px;
    background: #d6d6d6;
    margin: 0 4px;
    flex-shrink: 0;
}

.pdf-viewer-container {
    overflow-y: auto;
    background: #525659;
    height: calc(100vh - 200px);
    text-align: center;
    padding: 12px 8px;
    box-sizing: border-box;
}

/* Search bar */
.pdf-search-input {
    height: 28px;
    border: 1px solid #c8c8c8;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 13px;
    width: 160px;
    outline: none;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.pdf-search-input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.pdf-search-input.no-match {
    border-color: #e74c3c;
    background: #fff8f8;
}

.pdf-search-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    padding: 0 4px;
    user-select: none;
}

.pdf-search-count.no-match {
    color: #c0392b;
}

/* PDF.js text layer */
.pdfTextLayer {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    line-height: 1;
    z-index: 2;
}

.pdfTextLayer span,
.pdfTextLayer br {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

/* Search highlights */
mark.pdf-search-hl {
    background: rgba(255, 220, 0, 0.55);
    color: transparent;
    border-radius: 2px;
    padding: 0;
}

mark.pdf-search-hl.pdf-search-hl-current {
    background: rgba(255, 140, 0, 0.75);
    outline: 1px solid rgba(200, 100, 0, 0.6);
}

/* Print split-button + options popup */
.pdf-print-split {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.pdf-print-main.k-button {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.pdf-print-main .fa {
    margin-right: 6px;
}

.pdf-print-caret.k-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 1px solid rgba(255, 255, 255, .35);
    padding-left: 8px;
    padding-right: 8px;
}

.pdf-print-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.pdf-print-popup {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1001;
    min-width: 380px;
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdf-print-popup-label {
    font-size: .8rem;
    font-weight: 600;
    margin: 4px 0 0;
}

.pdf-print-popup-label:first-child {
    margin-top: 0;
}

.pdf-print-popup-sep {
    border-top: 1px solid #eee;
    margin: 4px 0;
}

.pdf-print-popup-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    border-radius: 4px;
    font-size: .875rem;
}

.pdf-print-popup-item:hover {
    background: #f2f2f2;
}

.pdf-print-nopr {
    font-size: .8rem;
    color: #a00;
    padding: 4px 0;
}

/* Printer dropdown: πλατύτερο ανοιχτό popup ώστε να χωρούν ολόκληρα τα ονόματα εκτυπωτών
   (Width="auto" στο DropDownListPopupSettings). Cap στο viewport + horizontal scroll αν
   κάποιο όνομα είναι υπερβολικά μακρύ, αντί να ξεχειλίσει ή να κοπεί. */
.pdf-printer-popup {
    max-width: calc(100vw - 24px);
}

.pdf-printer-popup .k-list-content {
    overflow-x: auto;
}

.pdf-printer-popup .k-list-item {
    white-space: nowrap;
}
