/**
 * HWP Converter Styles
 * HWP 변환/추출기 전용 스타일
 *
 * @package Zipper
 */

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

.hwpc-main-grid,
.hwpc-side-stack,
.hwpc-result-stack,
.hwpc-tool-intro,
.hwpc-section-head,
.hwpc-heading-copy,
.hwpc-upload-section,
.hwpc-option-section,
.hwpc-export-section,
.hwpc-preview-section,
.hwpc-summary-section,
.hwpc-image-section,
.hwpc-detail-section,
.hwpc-disclaimer,
.hwpc-inline-notes,
.hwpc-upload-area,
.hwpc-option-list,
.hwpc-option-item,
.hwpc-option-copy,
.hwpc-note-box,
.hwpc-action-grid,
.hwpc-tab-row,
.hwpc-pane,
.hwpc-pane-toolbar,
.hwpc-preview-shell,
.hwpc-waiting,
.hwpc-waiting-copy,
.hwpc-empty-state,
.hwpc-summary-grid,
.hwpc-image-grid,
.hwpc-image-card,
.hwpc-image-meta,
.hwpc-table-wrap {
    min-width: 0;
}

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

.hwpc-tool-lead,
.hwpc-section-lead,
.hwpc-upload-hint,
.hwpc-inline-note,
.hwpc-note-box p,
.hwpc-pane-note,
.hwpc-summary-note,
.hwpc-waiting-desc,
.hwpc-empty-state p,
.hwpc-empty-state span,
.hwpc-disclaimer-text,
.hwpc-image-empty,
.hwpc-image-caption,
.hwpc-image-size,
.hwpc-option-copy span {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: #5f5a56;
}

.hwpc-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
    gap: 16px;
    align-items: start;
}

.hwpc-side-stack,
.hwpc-result-stack {
    display: grid;
    gap: 14px;
}

.hwpc-side-stack {
    position: sticky;
    top: 20px;
}

.hwpc-upload-section,
.hwpc-option-section,
.hwpc-export-section,
.hwpc-preview-section,
.hwpc-summary-section,
.hwpc-image-section,
.hwpc-detail-section,
.hwpc-disclaimer {
    background: #fff;
    border: 1px solid #e8e0d2;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(53, 44, 25, 0.045);
}

.hwpc-upload-section,
.hwpc-option-section,
.hwpc-export-section,
.hwpc-preview-section,
.hwpc-summary-section,
.hwpc-image-section,
.hwpc-detail-section {
    display: grid;
    gap: 12px;
    padding: 14px;
}

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

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

.hwpc-heading-copy {
    display: grid;
    gap: 6px;
}

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

.hwpc-section-title i,
.hwpc-inline-note i,
.hwpc-upload-icon i,
.hwpc-disclaimer i,
.hwpc-waiting-icon i,
.hwpc-empty-icon i,
.hwpc-image-badge,
.hwpc-image-card i,
.hwpc-summary-card-accent .hwpc-summary-label,
.hwpc-summary-card-accent .hwpc-summary-value {
    color: #b8860b;
}

.hwpc-btn,
.hwpc-copy-btn,
.hwpc-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    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;
}

.hwpc-btn:hover,
.hwpc-btn:focus-visible,
.hwpc-copy-btn:hover,
.hwpc-copy-btn:focus-visible,
.hwpc-tab-btn:hover,
.hwpc-tab-btn:focus-visible {
    outline: none;
    transform: translateY(-1px);
}

.hwpc-btn:disabled,
.hwpc-copy-btn:disabled,
.hwpc-tab-btn:disabled,
.hwpc-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hwpc-btn {
    background: #f6f2ea;
    color: #2f2a24;
}

.hwpc-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(184, 134, 11, 0.22);
}

.hwpc-btn-primary:hover,
.hwpc-btn-primary:focus-visible {
    box-shadow: 0 12px 24px rgba(184, 134, 11, 0.28);
}

.hwpc-btn-secondary,
.hwpc-copy-btn {
    border-color: #e4d8c2;
    background: #fffaf2;
    color: #8d6504;
}

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

.hwpc-tab-btn.is-active {
    border-color: #d9c28b;
    background: rgba(212, 175, 55, 0.14);
    color: #7d5d08;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.12);
}

.hwpc-upload-area {
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
    padding: 24px 18px;
    border: 2px dashed #e8ddc7;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.hwpc-upload-icon {
    font-size: 34px;
}

.hwpc-upload-text {
    font-size: 16px;
    font-weight: 700;
    color: #2f2a24;
}

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

.hwpc-inline-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hwpc-inline-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #fffaf2;
    border: 1px solid #ece1cc;
}

.hwpc-option-list {
    display: grid;
    gap: 10px;
}

.hwpc-option-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #eee4d4;
    background: #fffdf8;
}

.hwpc-option-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #b8860b;
    flex-shrink: 0;
}

.hwpc-option-copy {
    display: grid;
    gap: 4px;
}

.hwpc-option-copy strong,
.hwpc-note-box strong,
.hwpc-empty-state strong,
.hwpc-disclaimer-text strong,
.hwpc-image-name {
    color: #2f2a24;
}

.hwpc-note-box {
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.18);
}

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

.hwpc-tab-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

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

.hwpc-waiting.is-error .hwpc-waiting-icon i {
    color: #cb2f2f;
}

.hwpc-waiting-copy {
    display: grid;
    gap: 4px;
}

.hwpc-waiting-title {
    font-size: 14px;
    font-weight: 700;
    color: #2f2a24;
}

.hwpc-empty-state {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
    padding: 28px 20px;
    border: 1px dashed #eadfca;
    border-radius: 16px;
    background: #faf8f3;
}

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

.hwpc-pane {
    display: grid;
    gap: 10px;
}

.hwpc-pane-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hwpc-pane-label {
    font-size: 14px;
    font-weight: 700;
    color: #2f2a24;
}

.hwpc-preview-shell {
    display: grid;
    gap: 10px;
    border: 1px solid #e8e0d2;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.hwpc-preview-frame {
    width: 100%;
    min-height: 640px;
    border: 0;
    background: #f8f5ee;
}

.hwpc-code-output {
    width: 100%;
    min-height: 500px;
    padding: 14px;
    border: 1px solid #e7dfd2;
    border-radius: 14px;
    background: #fbfaf7;
    color: #2f2a24;
    font-size: 12px;
    line-height: 1.6;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    box-sizing: border-box;
    resize: vertical;
}

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

.hwpc-summary-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    background: #faf7f1;
    border: 1px solid #ece1ce;
}

.hwpc-summary-card-accent {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.22);
}

.hwpc-summary-card.is-error {
    background: rgba(220, 50, 50, 0.08);
    border-color: rgba(220, 50, 50, 0.18);
}

.hwpc-summary-card.is-error .hwpc-summary-label,
.hwpc-summary-card.is-error .hwpc-summary-value {
    color: #b02a2a;
}

.hwpc-summary-label {
    font-size: 12px;
    color: #7a746c;
}

.hwpc-summary-value {
    font-size: 22px;
    font-weight: 800;
    color: #2f2a24;
    word-break: break-word;
}

.hwpc-summary-value-small {
    font-size: 15px;
    line-height: 1.45;
}

.hwpc-image-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.22);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.hwpc-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hwpc-image-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #ece2d2;
    border-radius: 14px;
    background: #fffaf4;
}

.hwpc-image-thumb-wrap {
    display: grid;
    place-items: center;
    min-height: 132px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #efe6d8;
}

.hwpc-image-thumb {
    display: block;
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.hwpc-image-meta {
    display: grid;
    gap: 4px;
}

.hwpc-image-name {
    font-size: 13px;
    font-weight: 700;
    word-break: break-word;
}

.hwpc-image-size {
    font-size: 12px;
}

.hwpc-image-empty {
    grid-column: 1 / -1;
    padding: 18px;
    text-align: center;
    border-radius: 14px;
    border: 1px dashed #eadfca;
    background: #faf8f3;
}

.hwpc-table-wrap {
    overflow-x: auto;
}

.hwpc-detail-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.hwpc-detail-table th,
.hwpc-detail-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee7db;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.6;
}

.hwpc-detail-table th {
    width: 170px;
    color: #6a655f;
    font-weight: 700;
    background: #fbfaf7;
}

.hwpc-detail-table td {
    color: #2f2a24;
    word-break: break-word;
}

.hwpc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: #fffdf9;
}

.hwpc-disclaimer i {
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 1080px) {
    .hwpc-main-grid {
        grid-template-columns: 1fr;
    }

    .hwpc-side-stack {
        position: static;
    }

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

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

@media (max-width: 720px) {
    .hwpc-action-grid,
    .hwpc-summary-grid,
    .hwpc-image-grid {
        grid-template-columns: 1fr;
    }

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

    .hwpc-tab-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hwpc-preview-frame {
        min-height: 520px;
    }
}

@media (max-width: 520px) {
    .hwpc-upload-section,
    .hwpc-option-section,
    .hwpc-export-section,
    .hwpc-preview-section,
    .hwpc-summary-section,
    .hwpc-image-section,
    .hwpc-detail-section,
    .hwpc-disclaimer {
        padding: 12px;
    }

    .hwpc-upload-area,
    .hwpc-empty-state {
        padding: 18px 14px;
    }

    .hwpc-tab-row {
        grid-template-columns: 1fr;
    }

    .hwpc-code-output {
        min-height: 360px;
    }
}
