/* ===== PDF Viewer 전용 스타일 ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1e1e1e;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 시안 PDF Viewer 스타일 ===== */
.pdf-viewer-wrap {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.pdf-toolbar {
    background: #2d2d2d;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pdf-toolbar .btn {
    color: #ccc;
    border: none;
    background: transparent;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.pdf-toolbar .btn.btn-fullscreen  {
    background: #00897b;
    color: #fff;
}

.pdf-toolbar .btn:hover:not(:disabled) {
    color: #fff;
    background: rgba(255,255,255,.1);
}

.pdf-toolbar .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pdf-toolbar .btn:focus-visible {
    outline: 2px solid #00bcd4;
    outline-offset: 2px;
}

.pdf-page-input {
    width: 44px;
    background: #444;
    border: 1px solid #555;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    font-size: 0.85rem;
    padding: 0.25rem;
}

.pdf-zoom-select {
    background: #444;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    font-size: 0.85rem;
    padding: 0.25rem 0.375rem;
    cursor: pointer;
}

.text-muted {
    color: #999;
}

.text-sm-85 {
    font-size: 0.85rem;
}

.btn-fullscreen {
    background: #00897b;
    color: #fff;
    border: none;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
}

/* 전체보기 버튼 hover 스타일 (툴바 내부) */
.pdf-toolbar .btn-fullscreen:hover:not(:disabled) {
    background: #00796b !important;
    color: #fff !important;
}

.pdf-canvas-area {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #999;
    overflow: auto;
    flex: 1;
    min-height: 0;
    background: #525252;
}

#pdf-canvas-wrapper {
    display: inline-block;
    position: relative;
}

#pdfCanvas {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    display: block;
}

/* ===== 텍스트 레이어 (텍스트 선택 지원) ===== */
.textLayer {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    opacity: 0.2;
    line-height: 1.0;
}

.textLayer > span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.textLayer ::selection,
.textLayer > span::selection {
    background: rgba(0, 100, 255, 0.3);
}

.textLayer > span::-moz-selection {
    background: rgba(0, 100, 255, 0.3);
}

/* ===== 로딩/에러 메시지 ===== */
.pdf-error-icon {
    font-size: 3rem;
    opacity: 0.4;
}

.loading-message {
    text-align: center;
    padding: 3rem;
    color: #999;
}

/* ===== Utility Classes ===== */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.gap-1 {
    gap: 0.25rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.me-1 {
    margin-right: 0.25rem;
}
