/**
 * PDF Crop Styles
 * PDF crop tool styles
 *
 * @package Zipper
 */

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

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

.pdc-preview-section,
.pdc-panel-card,
.pdc-disclaimer {
    min-width: 0;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    box-sizing: border-box;
}

.pdc-preview-section,
.pdc-panel-card {
    padding: 16px;
}


/* JS hook classes */
.pdc-control,
.pdc-crop-input,
.pdc-download-card {}

.pdc-bottom-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pdc-tool-intro,
.pdc-section-head,
.pdc-notice,
.pdc-notice-copy,
.pdc-empty-state,
.pdc-empty-copy,
.pdc-preview-pane,
.pdc-preview-toolbar,
.pdc-page-field,
.pdc-page-input-row,
.pdc-preview-meta,
.pdc-side-column,
.pdc-unit-row,
.pdc-margin-grid,
.pdc-margin-field,
.pdc-preset-row,
.pdc-scope-list,
.pdc-scope-option,
.pdc-download-row,
.pdc-summary-grid,
.pdc-disclaimer,
.pdc-upload-area,
.pdc-inline-notes {
    min-width: 0;
}

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

.pdc-tool-lead,
.pdc-section-lead,
.pdc-notice-desc,
.pdc-empty-copy p,
.pdc-upload-hint,
.pdc-inline-note,
.pdc-field-help,
.pdc-download-help,
.pdc-drag-help,
.pdc-summary-note,
.pdc-disclaimer-text {
    margin: 0;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.65;
}

.pdc-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1a1816;
    font-size: 15px;
    font-weight: 700;
}

.pdc-section-title i,
.pdc-notice-icon i,
.pdc-empty-icon i,
.pdc-upload-icon i,
.pdc-inline-note i,
.pdc-meta-item i,
.pdc-disclaimer i {
    color: #d4af37;
}

.pdc-preview-section {
    display: grid;
    gap: 12px;
    background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pdc-preview-section.is-dragover {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12), 0 6px 18px rgba(212, 175, 55, 0.12);
}

.pdc-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.pdc-empty-state,
.pdc-preview-pane,
.pdc-side-column,
.pdc-panel-card,
.pdc-summary-card {
    display: grid;
    gap: 12px;
}

.pdc-empty-state {
    min-height: 268px;
    padding: 20px;
    border: 1px dashed #e8e4dc;
    border-radius: 12px;
    background: #faf9f7;
    align-items: center;
    justify-items: stretch;
}

.pdc-empty-copy {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.pdc-empty-copy strong {
    color: #2d2a26;
    font-size: 16px;
}

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

.pdc-upload-area {
    display: grid;
    gap: 6px;
    justify-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 22px 16px;
    border: 2px dashed #e8e4dc;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pdc-upload-area:hover,
.pdc-upload-area:focus-visible,
.pdc-preview-section.is-dragover .pdc-upload-area {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.08);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    outline: none;
}

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

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

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

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

.pdc-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #ece7df;
    border-radius: 999px;
    background: #fff;
    font-size: 11px;
}

.pdc-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.1);
}

.pdc-notice.is-error {
    border-color: rgba(220, 50, 50, 0.18);
    background: rgba(220, 50, 50, 0.08);
}

.pdc-notice.is-error .pdc-notice-icon i {
    color: #dc3232;
}

.pdc-notice-title {
    color: #2d2a26;
    font-size: 14px;
    font-weight: 700;
}

.pdc-preview-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: end;
}

.pdc-page-field,
.pdc-unit-row,
.pdc-margin-field,
.pdc-scope-list {
    display: grid;
    gap: 6px;
}

.pdc-page-field label,
.pdc-label,
.pdc-margin-field span {
    color: #5f5a56;
    font-size: 11px;
    font-weight: 600;
}

.pdc-page-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.pdc-page-input,
.pdc-input,
.pdc-margin-input,
.pdc-range-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #d9d3c8;
    border-radius: 10px;
    background: #fff;
    color: #1a1816;
    font-size: 14px;
    box-sizing: border-box;
}

.pdc-page-input:focus,
.pdc-input:focus,
.pdc-margin-input:focus,
.pdc-range-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
    outline: none;
}

.pdc-page-total {
    color: #7c756d;
    font-size: 12px;
}

.pdc-preview-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 360px;
    overflow: hidden;
    padding: 18px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background:
        linear-gradient(45deg, rgba(212, 175, 55, 0.06) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(212, 175, 55, 0.06) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(212, 175, 55, 0.06) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(212, 175, 55, 0.06) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
    box-sizing: border-box;
}

.pdc-preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(45, 42, 38, 0.14);
}

.pdc-crop-overlay {
    position: absolute;
    top: 18px;
    right: 18px;
    bottom: 18px;
    left: 18px;
    border: 2px solid #d4af37;
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(26, 24, 22, 0.32);
    cursor: move;
    pointer-events: auto;
    touch-action: none;
    transition: inset 0.16s ease, border-color 0.16s ease;
}

.pdc-crop-overlay.is-dragging {
    border-color: #b99122;
    transition: none;
}

.pdc-crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #d4af37;
    box-shadow: 0 2px 7px rgba(45, 42, 38, 0.2);
    box-sizing: border-box;
    touch-action: none;
}

.pdc-crop-handle-nw {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.pdc-crop-handle-n {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.pdc-crop-handle-ne {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.pdc-crop-handle-e {
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.pdc-crop-handle-se {
    right: -8px;
    bottom: -8px;
    cursor: nwse-resize;
}

.pdc-crop-handle-s {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.pdc-crop-handle-sw {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.pdc-crop-handle-w {
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.pdc-crop-overlay.is-invalid .pdc-crop-handle {
    background: #dc3232;
}

.pdc-drag-help {
    padding: 9px 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.08);
}

.pdc-crop-overlay.is-invalid {
    border-color: #dc3232;
}

.pdc-preview-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 9px;
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #6d5520;
    font-size: 11px;
    font-weight: 700;
}

.pdc-preview-badge.is-ready {
    border-color: rgba(35, 126, 72, 0.22);
    color: #237e48;
}

.pdc-preview-badge.is-error {
    border-color: rgba(220, 50, 50, 0.24);
    color: #b72d2d;
}

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

.pdc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #ece7df;
    border-radius: 10px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 12px;
}

.pdc-meta-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdc-unit-row {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
}

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

.pdc-margin-field {
    padding: 10px;
    border: 1px solid #ece7df;
    border-radius: 10px;
    background: #faf9f7;
}

.pdc-preset-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pdc-preset-btn,
.pdc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid #d9d3c8;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.pdc-preset-btn {
    background: #fffdf8;
    color: #2d2a26;
}

.pdc-btn-primary {
    border-color: #d4af37;
    background: linear-gradient(135deg, #d4af37 0%, #b99122 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.22);
}

.pdc-btn-secondary,
.pdc-btn-ghost {
    background: #fff;
    color: #2d2a26;
}

.pdc-btn:hover:not(:disabled),
.pdc-preset-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(45, 42, 38, 0.08);
}

.pdc-btn:disabled,
.pdc-preset-btn:disabled,
.pdc-input:disabled,
.pdc-page-input:disabled,
.pdc-margin-input:disabled,
.pdc-range-input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.pdc-scope-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid #ece7df;
    border-radius: 10px;
    background: #faf9f7;
    color: #2d2a26;
    font-size: 13px;
    font-weight: 700;
}

.pdc-scope-option input {
    width: auto;
    margin: 0;
    accent-color: #d4af37;
}

.pdc-download-row {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 8px;
}

.pdc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pdc-summary-item {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #ece7df;
    border-radius: 10px;
    background: #faf9f7;
}

.pdc-summary-item.is-ready,
.pdc-summary-item-accent.is-ready {
    border-color: rgba(35, 126, 72, 0.2);
    background: rgba(35, 126, 72, 0.07);
}

.pdc-summary-item.is-error {
    border-color: rgba(220, 50, 50, 0.2);
    background: rgba(220, 50, 50, 0.07);
}

.pdc-summary-label {
    color: #7c756d;
    font-size: 11px;
    font-weight: 600;
}

.pdc-summary-value {
    overflow: hidden;
    color: #2d2a26;
    font-size: 20px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdc-summary-value-small {
    font-size: 13px;
    line-height: 1.4;
}

.pdc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: #fffdf8;
}

.pdc-disclaimer i {
    flex: 0 0 auto;
    font-size: 18px;
}

@media (max-width: 1080px) {
    .pdc-board,
    
/* JS hook classes */
.pdc-control,
.pdc-crop-input,
.pdc-download-card {}

.pdc-bottom-grid {
        grid-template-columns: 1fr;
    }

    .pdc-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pdc-preview-toolbar,
    .pdc-preview-meta,
    .pdc-margin-grid,
    .pdc-preset-row,
    .pdc-download-row,
    .pdc-summary-grid {
        grid-template-columns: 1fr;
    }

    .pdc-preview-shell {
        min-height: 280px;
        padding: 12px;
    }

    .pdc-crop-overlay {
        top: 12px;
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .pdc-page-input,
    .pdc-input,
    .pdc-margin-input,
    .pdc-range-input {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .pdc-board,
    .pdc-preview-section,
    .pdc-panel-card,
    
/* JS hook classes */
.pdc-control,
.pdc-crop-input,
.pdc-download-card {}

.pdc-bottom-grid {
        max-width: 100%;
        overflow-x: hidden;
    }

    .pdc-preview-section,
    .pdc-panel-card,
    .pdc-disclaimer {
        padding: 14px;
    }

    .pdc-empty-state {
        padding: 16px;
    }
}
