/* ============================================================
   Image to PDF — page-specific styles
   Thumbnail grid, per-thumb actions and the options grid are
   unique to this page; everything else 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 ---- */
.itp-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;
}

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

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

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

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

/* ---- Thumbnail grid ---- */
.itp-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

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

.itp-thumb-card.dragging {
    opacity: .5;
}

.itp-thumb-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: #f1f3f4;
    border-radius: 6px;
    overflow: hidden;
}

.itp-thumb-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.itp-thumb-name {
    font-size: 12px;
    color: #3c4043;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.itp-thumb-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.itp-rotate-btn,
.itp-move-btn,
.itp-remove-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-height: 32px;
    padding: 0 6px;
    font-size: 13px;
    line-height: 1;
    color: #5f6368;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
}

.itp-rotate-btn:hover,
.itp-move-btn:hover,
.itp-remove-btn:hover {
    background: #f1f3f4;
    color: #1f2328;
}

.itp-rotate-btn:focus-visible,
.itp-move-btn:focus-visible,
.itp-remove-btn:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 1px;
}

.itp-remove-btn:hover {
    color: #c5221f;
    border-color: #f4c7c3;
    background: #fce8e6;
}

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

/* ---- Options grid ---- */
.itp-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 10px;
}

.itp-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.itp-field-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #5f6368;
}

.itp-field select {
    width: 100%;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 14px;
    color: #1f2328;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
}

.itp-field select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .15);
}

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

    .itp-thumb-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .itp-thumb-frame {
        height: 90px;
    }

    .itp-options-grid {
        grid-template-columns: 1fr;
    }

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