/* ============================================================
   PDF to Image — page-specific styles
   Only the preview grid, option row and progress line are unique
   to this page; tool chrome comes from dev-tools.css.
   ============================================================ */

/* ---- Quick scenario buttons ---- */
.quick-scenarios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 16px;
}

.quick-scenarios-label {
    margin-right: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.scenario-btn {
    padding: 7px 14px;
    border: 1.5px solid #1a73e8;
    border-radius: 999px;
    background: #fff;
    color: #1a73e8;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.scenario-btn:hover,
.scenario-btn:focus-visible {
    background: #1a73e8;
    color: #fff;
    outline: none;
}

/* ---- Warning status (not defined in dev-tools.css) ---- */
.dev-tool-status.warning {
    color: #8a4b00;
    background: #fef7e0;
    border: 1px solid #fde293;
}

/* ---- Dropzone ---- */
.pti-dropzone {
    display: block;
    border: 2px dashed #c4c7cc;
    border-radius: 12px;
    padding: 26px 16px;
    text-align: center;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.pti-dropzone.dragover {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.pti-dropzone:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

.pti-dropzone-text {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1f2328;
}

.pti-dropzone-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: #5f6368;
}

.pti-file-info {
    margin-top: 10px;
    font-size: 13px;
    color: #3c4043;
    word-break: break-word;
}

.pti-options-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .pti-options-row {
        grid-template-columns: 1fr;
    }
}

.pti-options-row > fieldset {
    margin: 0;
    padding: 13px 14px 15px;
    border: none;
    border-radius: 10px;
    background: #f8f9fa;
    box-shadow: inset 0 0 0 1px #eceef1;
    min-width: 0;
}

.pti-card-wide {
    grid-column: 1 / -1;
}

.pti-options-row legend,
.pti-options-row .dev-tool-label {
    display: block;
    padding: 0;
    margin: 0 0 9px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
    color: #5f6368;
}

.pti-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pti-radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid #dadce0;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: #3c4043;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.pti-radio-row label:hover {
    border-color: #1a73e8;
}

.pti-radio-row label:has(input:checked) {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1557b0;
    font-weight: 600;
}

.pti-radio-row label:focus-within {
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .18);
}

.pti-radio-row input[type="radio"] {
    margin: 0;
    width: 15px;
    height: 15px;
    accent-color: #1a73e8;
    cursor: pointer;
}

.pti-range-input {
    margin-top: 8px;
    width: 100%;
    max-width: none;
}

.pti-quality-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #3c4043;
}

.pti-quality-row input[type="range"] {
    flex: 1 1 auto;
    width: auto;
    min-width: 80px;
    accent-color: #1a73e8;
}

#ptiQualityValue {
    flex: 0 0 auto;
    min-width: 42px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1f2328;
}

/* ---- Progress ---- */
.pti-progress {
    margin-top: 12px;
    font-size: 13.5px;
    color: #1a73e8;
    font-variant-numeric: tabular-nums;
}

/* ---- Preview grid ---- */
.pti-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.pti-page-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    background: #fff;
}

.pti-page-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    background: #f1f3f4;
}

.pti-page-label {
    font-size: 12px;
    color: #5f6368;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.pti-empty {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 13.5px;
    color: #5f6368;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .pti-dropzone {
        padding: 22px 12px;
    }

    .pti-options-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pti-radio-row label {
        min-height: 42px;
    }

    .pti-range-input {
        max-width: 100%;
    }

    .pti-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .dev-tool-actions .dev-tool-btn {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 44px;
    }
}
