/* pdf.css - Corporate Brutalist PDF Tool */

.pdf-tool-app {
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin: 20px 0;
    min-height: 700px;
}

@media (min-width: 992px) {
    .pdf-tool-app { flex-direction: row; align-items: stretch; }
}

/* Panel Layouts */
.pdf-sidebar {
    width: 100%;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .pdf-sidebar { width: 200px; border-bottom: none; border-right: 1px solid var(--border); }
}

.pdf-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    position: relative;
}

@media (min-width: 992px) {
    .pdf-options { max-width: 380px; border-bottom: none; border-right: 1px solid var(--border); }
}

.pdf-preview-panel {
    flex: 1.2;
    background: var(--bg-alt);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Sidebar Elements */
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.sidebar-header h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-main); }

.v-tabs { display: flex; flex-direction: row; overflow-x: auto; }
@media (min-width: 992px) { .v-tabs { flex-direction: column; overflow-x: visible; } }

.v-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
    white-space: nowrap;
}
@media (min-width: 992px) { .v-tab { border-bottom: none; border-right: 2px solid transparent; } }

.v-tab:hover { background: rgba(0, 82, 204, 0.05); color: var(--text-main); }
.v-tab.active { background: var(--bg-light); color: var(--primary); }
@media (min-width: 992px) { .v-tab.active { border-right-color: var(--primary); box-shadow: -2px 0 0 inset var(--primary); } }

/* Options Panel Elements */
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 700; padding: 20px 20px 10px; }
.tool-group { padding: 0 20px 10px; }
.sub-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.sub-tool-btn { display: block; position: relative; cursor: pointer; }
.sub-tool-btn input[type="radio"] { position: absolute; opacity: 0; }
.sub-tool-btn span {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    background: var(--bg-light);
    color: var(--text-muted);
    transition: 0.2s;
}
.sub-tool-btn input[type="radio"]:checked + span { background: rgba(0, 82, 204, 0.08); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.sub-tool-btn span:hover { border-color: var(--text-muted); }

.divider { margin: 10px 0; border: none; border-top: 1px solid var(--border); }
.options-container { flex-grow: 1; overflow-y: auto; padding: 0 20px 20px; }

.opt-panel { display: none; animation: fadeIn 0.3s ease; }
.opt-panel.active { display: block; }

.input-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.input-group label { font-size: 13px; font-weight: 600; color: var(--text-main); }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

input[type="text"], input[type="number"], select, .file-input-styled {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg-light);
    transition: 0.2s;
}
input[type="file"].file-input-styled { padding: 7px; background: var(--bg-alt); }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1); }

.helper-text { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.coord-box { padding: 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); font-family: monospace; font-size: 13px; text-align: center; }

/* Range Slider */
.filter-header { display: flex; justify-content: space-between; align-items: center; }
.val-display { font-size: 12px; font-weight: 600; color: var(--primary); }
input[type="range"] { accent-color: var(--primary); height: 6px; background: var(--border); border-radius: 4px; outline: none; -webkit-appearance: none; margin-top: 8px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; }

/* Action Footer */
.action-footer { padding: 20px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.btn-primary, .btn-outline, .btn-success { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding: 12px; font-family: inherit; font-weight: 600; font-size: 14px; border-radius: var(--radius); cursor: pointer; transition: 0.2s; border: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success { background: #0b875b; color: #fff; text-decoration: none; margin-top: 15px; display: none; }
.btn-success:hover { background: #096a47; color: #fff; text-decoration: none;}

.status-area { margin-top: 15px; }
progress { width: 100%; height: 6px; border-radius: 4px; border: none; background: var(--border); margin-bottom: 5px; }
progress::-webkit-progress-bar { background: var(--border); border-radius: 4px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 4px; transition: width 0.3s ease; }
#statusText { font-size: 12px; color: var(--text-muted); font-weight: 500; text-align: center; }

/* Preview & Files Panel */
.upload-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.upload-btn { width: auto; padding: 10px 20px; }
.badge { background: var(--border); color: var(--text-main); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.file-queue { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 10px; }
.file-item { min-width: 120px; max-width: 180px; padding: 8px 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.file-item svg { flex-shrink: 0; color: var(--primary); }

.preview-box { flex-grow: 1; border: 2px dashed var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: repeating-conic-gradient(#f9f9f9 0% 25%, #fff 0% 50%) 50% / 20px 20px; }
#pdfPreviewCanvas { max-width: 100%; max-height: 100%; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.preview-placeholder { text-align: center; color: var(--text-muted); }
.preview-placeholder svg { margin-bottom: 10px; opacity: 0.5; }

.overlay-dot { position: absolute; width: 12px; height: 12px; background: var(--primary); border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); display: none; pointer-events: none; z-index: 10; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }