/**
 * Profile Image Maker Styles
 * 원형 프로필 이미지 메이커 전용 스타일
 *
 * @package Zipper
 */

.pim-tool-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.pim-tool-lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #5f5a56;
}

.pim-main-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    min-width: 0;
}

.pim-input-col,
.pim-result-col,
.pim-summary-grid,
.pim-detail-grid,
.pim-support-grid,
.pim-preview-area {
    min-width: 0;
}

.pim-input-col {
    position: sticky;
    top: 20px;
}

.pim-result-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pim-input-section,
.pim-preview-card,
.pim-result-highlight,
.pim-detail-card,
.pim-tip-card,
.pim-privacy-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.06);
    box-sizing: border-box;
    min-width: 0;
}

.pim-input-section,
.pim-result-highlight,
.pim-detail-card,
.pim-tip-card,
.pim-privacy-card {
    padding: 18px;
}

.pim-preview-card {
    padding: 18px;
    background: linear-gradient(180deg, #fffdfa 0%, #faf7f0 100%);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.12);
}

.pim-result-highlight {
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    border-color: #eadfb8;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.12);
}

.pim-input-section,
.pim-preview-card,
.pim-result-highlight,
.pim-detail-card,
.pim-tip-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pim-privacy-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pim-privacy-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #5f5a56;
}

.pim-section-head,
.pim-preview-head,
.pim-result-head,
.pim-slider-head,
.pim-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pim-preview-head,
.pim-result-head {
    align-items: flex-start;
}

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

.pim-section-title i,
.pim-block-title i,
.pim-help-note i,
.pim-empty-state i,
.pim-upload-icon,
.pim-tool-intro i {
    color: #d4af37;
}

.pim-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pim-upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 220px;
    padding: 24px 18px;
    border: 2px dashed #e8e4dc;
    border-radius: 14px;
    background: #faf9f7;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

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

.pim-upload-icon {
    font-size: 32px;
}

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

.pim-upload-hint,
.pim-control-note,
.pim-preview-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #8f8882;
}

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

.pim-help-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.1);
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

.pim-control-block,
.pim-control-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.pim-preset-btn,
.pim-size-chip,
.pim-btn,
.pim-compare-toggle,
.pim-download-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.pim-preset-btn {
    flex-direction: column;
    align-items: flex-start;
    min-height: 68px;
}

.pim-preset-btn strong {
    font-size: 13px;
    color: #2d2a26;
}

.pim-preset-btn span {
    font-size: 11px;
    color: #8f8882;
}

.pim-preset-btn:hover,
.pim-size-chip:hover,
.pim-btn:hover,
.pim-compare-toggle:hover,
.pim-download-item:hover {
    border-color: rgba(212, 175, 55, 0.6);
    background: #fffef9;
    color: #2d2a26;
}

.pim-preset-btn.is-active,
.pim-size-chip.is-active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.14);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.12);
}

.pim-btn:disabled,
.pim-compare-toggle:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.pim-btn {
    min-width: 0;
}

.pim-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-color: #c89b21;
    color: #1a1816;
}

.pim-btn-primary:hover {
    background: linear-gradient(135deg, #ddb84f 0%, #c08f12 100%);
    color: #1a1816;
}

.pim-btn-secondary,
.pim-compare-toggle {
    background: #faf9f7;
}

.pim-slider-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pim-slider-label,
.pim-summary-label,
.pim-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
}

.pim-slider-value {
    min-width: 56px;
    font-size: 12px;
    font-weight: 700;
    color: #d4af37;
    text-align: right;
}

.pim-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 6px;
    border-radius: 999px;
    background: #e8e4dc;
    cursor: pointer;
    box-sizing: border-box;
}

.pim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.pim-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.pim-size-chip-row,
.pim-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pim-size-chip {
    min-height: 34px;
    padding: 8px 12px;
}

.pim-download-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pim-download-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 168px;
    padding: 8px;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(35, 31, 32, 0.12);
}

.pim-preview-area {
    display: grid;
    gap: 12px;
    min-height: 420px;
}

.pim-empty-state,
.pim-canvas-wrap,
.pim-compare-container,
.pim-compare-panel {
    min-height: 100%;
}

.pim-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    color: #6f6964;
    text-align: center;
}

.pim-empty-state i {
    font-size: 40px;
}

.pim-empty-state p,
.pim-empty-state span {
    margin: 0;
    max-width: 360px;
    line-height: 1.7;
}

.pim-empty-state span {
    font-size: 12px;
    color: #8f8882;
}

.pim-canvas-wrap,
.pim-compare-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    padding: 18px;
    border: 1px solid rgba(232, 228, 220, 0.92);
    border-radius: 16px;
    background-image:
        linear-gradient(45deg, rgba(212, 175, 55, 0.07) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(212, 175, 55, 0.07) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(212, 175, 55, 0.07) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(212, 175, 55, 0.07) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    box-sizing: border-box;
}

.pim-canvas {
    width: min(100%, 460px);
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    box-sizing: border-box;
}

.pim-compare-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pim-compare-panel {
    position: relative;
}

.pim-compare-panel::before {
    content: attr(data-label);
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(35, 31, 32, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pim-compare-img {
    width: min(100%, 300px);
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}

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

.pim-summary-item,
.pim-detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(232, 228, 220, 0.85);
    box-sizing: border-box;
}

.pim-summary-item-kpi {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.16) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.pim-summary-value,
.pim-detail-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a1816;
    line-height: 1.5;
    word-break: keep-all;
}

.pim-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 12px;
}

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

.pim-tip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
    color: #5f5a56;
    font-size: 13px;
    line-height: 1.7;
}

.pim-tip-list li {
    margin: 0;
}

@media (max-width: 1024px) {
    .pim-main-layout {
        grid-template-columns: 1fr;
    }

    .pim-input-col {
        position: static;
        top: auto;
    }

    .pim-support-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pim-preview-head,
    .pim-result-head,
    .pim-section-head,
    .pim-slider-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .pim-preset-grid,
    .pim-summary-grid,
    .pim-detail-grid,
    .pim-compare-container {
        grid-template-columns: 1fr;
    }

    .pim-canvas-wrap,
    .pim-compare-panel {
        min-height: 300px;
        padding: 14px;
    }

    .pim-preview-area {
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .tool-section,
    .pim-main-layout,
    .pim-input-section,
    .pim-preview-card,
    .pim-result-highlight,
    .pim-detail-card,
    .pim-tip-card,
    .pim-privacy-card {
        max-width: 100%;
        overflow-x: hidden;
    }

    .pim-input-section,
    .pim-preview-card,
    .pim-result-highlight,
    .pim-detail-card,
    .pim-tip-card,
    .pim-privacy-card {
        padding: 16px;
    }

    .pim-preset-btn,
    .pim-btn,
    .pim-compare-toggle,
    .pim-download-item,
    .pim-size-chip {
        width: 100%;
        max-width: 100%;
    }

    .pim-download-wrap {
        width: 100%;
    }

    .pim-download-menu {
        position: static;
        min-width: 0;
        width: 100%;
    }
}
