/**
 * PDF Black and White Converter Styles
 * PDF 흑백 변환기 전용 스타일
 *
 * @package Zipper
 */

.ptbw-hidden {
    display: none !important;
}

.ptbw-layout,
.ptbw-tool-intro,
.ptbw-preview-section,
.ptbw-preview-head,
.ptbw-section-head,
.ptbw-panel-card,
.ptbw-side-column,
.ptbw-preview-pane,
.ptbw-preview-toolbar,
.ptbw-preview-page-field,
.ptbw-page-input-row,
.ptbw-preview-meta,
.ptbw-empty-state,
.ptbw-preview-empty,
.ptbw-empty-copy,
.ptbw-upload-area,
.ptbw-inline-notes,
.ptbw-waiting,
.ptbw-waiting-copy,
.ptbw-control-block,
.ptbw-choice-row,
.ptbw-range-head,
.ptbw-custom-range-block,
.ptbw-action-stack,
.ptbw-note-box,
.ptbw-summary-grid,
.ptbw-summary-item,
.ptbw-table-wrap,
.ptbw-disclaimer,
.ptbw-table-actions {
    min-width: 0;
}

.ptbw-tool-intro {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.ptbw-tool-lead,
.ptbw-section-lead,
.ptbw-field-help,
.ptbw-summary-note,
.ptbw-table-summary,
.ptbw-waiting-desc,
.ptbw-preview-empty p,
.ptbw-note-box p,
.ptbw-disclaimer-text,
.ptbw-empty-row {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #615b55;
}

.ptbw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 14px;
    align-items: start;
}

.ptbw-preview-section,
.ptbw-panel-card,
.ptbw-table-section,
.ptbw-disclaimer {
    min-width: 0;
    background: #fff;
    border: 1px solid #e8e2d8;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(46, 40, 32, 0.05);
    box-sizing: border-box;
}

.ptbw-preview-section,
.ptbw-panel-card,
.ptbw-table-section {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.ptbw-preview-section {
    background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
}

.ptbw-action-card {
    background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
}

.ptbw-side-column {
    display: grid;
    gap: 12px;
    position: sticky;
    top: 20px;
}

.ptbw-table-section,
.ptbw-disclaimer {
    grid-column: 1 / -1;
}

.ptbw-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fffdf8 0%, #fffaf2 100%);
}

.ptbw-preview-head,
.ptbw-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ptbw-section-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #211d18;
}

.ptbw-section-title i,
.ptbw-preview-empty-icon i,
.ptbw-upload-icon i,
.ptbw-meta-item i,
.ptbw-inline-note i,
.ptbw-disclaimer i,
.ptbw-waiting-icon i,
.ptbw-note-box strong::before {
    color: #b8860b;
}

.ptbw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f7f2ea;
    color: #2d2821;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ptbw-btn:hover,
.ptbw-btn:focus-visible,
.ptbw-choice-btn:hover,
.ptbw-choice-btn:focus-visible,
.ptbw-table-action-btn:hover,
.ptbw-table-action-btn:focus-visible {
    outline: none;
    transform: translateY(-1px);
}

.ptbw-btn:disabled,
.ptbw-choice-btn:disabled,
.ptbw-table-action-btn:disabled,
.ptbw-page-input:disabled,
.ptbw-custom-range-input:disabled,
.ptbw-range:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
}

.ptbw-btn-primary {
    background: linear-gradient(135deg, #1f1f1f 0%, #4a4a4a 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(31, 31, 31, 0.2);
}

.ptbw-btn-primary:hover,
.ptbw-btn-primary:focus-visible {
    box-shadow: 0 12px 28px rgba(31, 31, 31, 0.26);
}

.ptbw-btn-secondary {
    background: #f9f6f0;
    border-color: #e3d9ca;
    color: #8a6203;
}

.ptbw-btn-ghost {
    background: #fff;
    border-color: #e7dfd2;
    color: #5f5a56;
}

.ptbw-preview-empty,
.ptbw-preview-pane,
.ptbw-control-block,
.ptbw-summary-card,
.ptbw-summary-item,
.ptbw-note-box,
.ptbw-empty-copy {
    display: grid;
    gap: 12px;
}

.ptbw-preview-empty {
    gap: 14px;
    min-height: 286px;
    padding: 22px;
    border: 1px dashed #e8dfd0;
    border-radius: 14px;
    background: #faf8f4;
    align-items: center;
}

.ptbw-empty-copy {
    justify-items: center;
    text-align: center;
}

.ptbw-preview-empty strong {
    font-size: 16px;
    color: #2d2821;
}

.ptbw-preview-empty-icon {
    font-size: 36px;
}

.ptbw-upload-area {
    display: grid;
    gap: 6px;
    justify-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 22px 18px;
    border: 2px dashed #ddd1be;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ptbw-upload-area:hover,
.ptbw-upload-area:focus-visible,
.ptbw-preview-section.is-dragover .ptbw-upload-area {
    outline: none;
    border-color: #b8860b;
    background: rgba(184, 134, 11, 0.08);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.ptbw-upload-icon {
    font-size: 30px;
}

.ptbw-upload-text {
    font-size: 15px;
    font-weight: 700;
    color: #2d2821;
}

.ptbw-upload-hint {
    font-size: 12px;
    line-height: 1.6;
    color: #7d756c;
}

.ptbw-upload-input {
    display: none;
}

.ptbw-inline-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ptbw-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #ece4d8;
    background: #fff;
    font-size: 12px;
    color: #5f5a56;
}

.ptbw-waiting {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.ptbw-waiting.is-error {
    background: rgba(198, 58, 58, 0.08);
    border-color: rgba(198, 58, 58, 0.18);
}

.ptbw-waiting.is-error .ptbw-waiting-icon i,
.ptbw-waiting.is-error .ptbw-waiting-title {
    color: #c63a3a;
}

.ptbw-waiting-title {
    font-size: 14px;
    font-weight: 700;
    color: #8a6203;
}

.ptbw-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ptbw-preview-page-field {
    display: grid;
    gap: 6px;
    min-width: 150px;
}

.ptbw-preview-page-field label,
.ptbw-control-label,
.ptbw-summary-label {
    font-size: 12px;
    font-weight: 700;
    color: #5f5a56;
}

.ptbw-page-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ptbw-page-input,
.ptbw-custom-range-input {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #ded3c2;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    color: #2d2821;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ptbw-page-input:focus,
.ptbw-custom-range-input:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.ptbw-custom-range-input.is-invalid {
    border-color: #c63a3a;
    box-shadow: 0 0 0 3px rgba(198, 58, 58, 0.1);
}

.ptbw-page-total {
    font-size: 13px;
    font-weight: 700;
    color: #7d756c;
}

.ptbw-preview-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #eee5d8;
    background: linear-gradient(180deg, #fbf8f2 0%, #f3ede4 100%);
    overflow: auto;
}

.ptbw-preview-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(31, 31, 31, 0.84);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.ptbw-preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(45, 40, 33, 0.14);
}

.ptbw-preview-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ptbw-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fbf8f3;
    border: 1px solid #eee6da;
    font-size: 12px;
    line-height: 1.55;
    color: #5f5a56;
}

.ptbw-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ptbw-choice-btn,
.ptbw-table-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #e3d9ca;
    border-radius: 12px;
    background: #fffaf3;
    color: #7b5b09;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ptbw-choice-btn.is-active {
    background: linear-gradient(135deg, #1f1f1f 0%, #4a4a4a 100%);
    border-color: #1f1f1f;
    color: #fff;
    box-shadow: 0 10px 22px rgba(31, 31, 31, 0.18);
}

.ptbw-mode-btn,
.ptbw-range-btn,
.ptbw-scale-btn {
    min-width: 84px;
}

.ptbw-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e8e0d4;
    cursor: pointer;
}

.ptbw-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f1f1f 0%, #4a4a4a 100%);
    box-shadow: 0 2px 8px rgba(31, 31, 31, 0.24);
}

.ptbw-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f1f1f 0%, #4a4a4a 100%);
    box-shadow: 0 2px 8px rgba(31, 31, 31, 0.24);
}

.ptbw-range-value {
    font-size: 12px;
    font-weight: 700;
    color: #1f1f1f;
}

.ptbw-custom-range-block {
    display: grid;
    gap: 6px;
}

.ptbw-action-stack {
    display: grid;
    gap: 10px;
}

.ptbw-note-box {
    padding: 12px 13px;
    border-radius: 12px;
    background: rgba(31, 31, 31, 0.04);
    border: 1px solid rgba(31, 31, 31, 0.08);
}

.ptbw-note-box strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #211d18;
}

.ptbw-note-box strong::before {
    content: '\f26d';
    display: inline-block;
    font-family: 'bootstrap-icons';
    font-style: normal;
    font-weight: 400;
}

.ptbw-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ptbw-summary-item {
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid #ece5d9;
    background: #fbf8f4;
}

.ptbw-summary-item-accent {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.06) 0%, rgba(184, 134, 11, 0.1) 100%);
    border-color: rgba(31, 31, 31, 0.08);
}

.ptbw-summary-item-accent.is-ready {
    border-color: rgba(184, 134, 11, 0.24);
}

.ptbw-summary-item-accent.is-error {
    border-color: rgba(198, 58, 58, 0.28);
    background: rgba(198, 58, 58, 0.06);
}

.ptbw-summary-value {
    font-size: 19px;
    font-weight: 800;
    color: #211d18;
    line-height: 1.2;
}

.ptbw-summary-value-small {
    font-size: 14px;
    font-weight: 700;
}

.ptbw-table-wrap {
    overflow-x: auto;
    border: 1px solid #eee5d8;
    border-radius: 14px;
}

.ptbw-page-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 660px;
}

.ptbw-page-table th,
.ptbw-page-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f0e7da;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
    line-height: 1.55;
    color: #473f37;
}

.ptbw-page-table thead th {
    background: #fbf8f3;
    font-size: 12px;
    font-weight: 800;
    color: #5f5a56;
    white-space: nowrap;
}

.ptbw-page-table tbody tr:last-child td {
    border-bottom: none;
}

.ptbw-page-table tbody tr.is-active {
    background: rgba(184, 134, 11, 0.08);
}

.ptbw-page-table tbody tr.is-included {
    background: rgba(31, 31, 31, 0.03);
}

.ptbw-page-table tbody tr.is-excluded {
    opacity: 0.84;
}

.ptbw-page-table tbody tr.is-processing {
    background: rgba(31, 31, 31, 0.08);
}

.ptbw-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f4efe7;
    border: 1px solid #e3d9ca;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.ptbw-status-chip.is-active {
    color: #8a6203;
    border-color: rgba(184, 134, 11, 0.28);
    background: rgba(184, 134, 11, 0.12);
}

.ptbw-status-chip.is-included {
    color: #1f1f1f;
    border-color: rgba(31, 31, 31, 0.16);
    background: rgba(31, 31, 31, 0.06);
}

.ptbw-status-chip.is-excluded {
    color: #6c655d;
    border-color: rgba(108, 101, 93, 0.18);
    background: rgba(108, 101, 93, 0.08);
}

.ptbw-status-chip.is-processing {
    color: #fff;
    border-color: #1f1f1f;
    background: linear-gradient(135deg, #1f1f1f 0%, #4a4a4a 100%);
}

.ptbw-status-chip.is-invalid {
    color: #b21f1f;
    border-color: rgba(198, 58, 58, 0.25);
    background: rgba(198, 58, 58, 0.08);
}

.ptbw-table-actions {
    display: flex;
    gap: 8px;
}

.ptbw-table-action-btn.is-primary {
    background: #1f1f1f;
    border-color: #1f1f1f;
    color: #fff;
}

.ptbw-empty-row {
    text-align: center;
}

.ptbw-disclaimer-text strong {
    color: #2d2821;
}

@media (max-width: 1100px) {
    .ptbw-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ptbw-side-column {
        position: static;
    }

    .ptbw-table-section,
    .ptbw-disclaimer {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .ptbw-preview-section,
    .ptbw-panel-card,
    .ptbw-table-section {
        padding: 14px;
    }

    .ptbw-preview-head,
    .ptbw-section-head,
    .ptbw-preview-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ptbw-preview-meta,
    .ptbw-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ptbw-page-table {
        min-width: 560px;
    }

    .ptbw-inline-notes,
    .ptbw-choice-row,
    .ptbw-table-actions {
        gap: 6px;
    }

    .ptbw-preview-shell {
        padding: 14px;
        min-height: 260px;
    }
}
