/**
 * Image Vignette Styles
 * 비네팅 추가/제거기 전용 스타일
 *
 * @package Zipper
 */

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

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

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

.ivg-input-col,
.ivg-result-col,
.ivg-preview-stage,
.ivg-summary-grid,
.ivg-detail-grid,
.ivg-mode-tabs,
.ivg-presets,
.ivg-actions {
    min-width: 0;
}

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

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

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

.ivg-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.ivg-preview-card {
    background: linear-gradient(145deg, #fff8ef 0%, #f3f4ff 100%);
    box-shadow: 0 10px 26px rgba(123, 137, 207, 0.12);
}

.ivg-result-summary {
    background: linear-gradient(135deg, #fff8ef 0%, #f8f4ff 100%);
    border-color: #eadcc9;
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.12);
}

.ivg-input-title,
.ivg-preview-title,
.ivg-result-title,
.ivg-detail-title,
.ivg-privacy-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1816;
}

.ivg-input-title i,
.ivg-preview-title i,
.ivg-result-title i,
.ivg-detail-title i,
.ivg-privacy-title i,
.ivg-help-note i,
.ivg-mode-note i {
    color: #d4af37;
}

.ivg-upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    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;
    overflow: hidden;
}

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

.ivg-upload-icon {
    font-size: 32px;
    color: #d4af37;
}

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

.ivg-upload-hint {
    font-size: 12px;
    color: #8f8882;
    line-height: 1.5;
}

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

.ivg-help-note,
.ivg-mode-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

.ivg-help-note {
    background: rgba(212, 175, 55, 0.1);
}

.ivg-mode-note {
    background: rgba(123, 137, 207, 0.1);
}

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

.ivg-mode-btn,
.ivg-preset-btn,
.ivg-btn,
.ivg-compare-toggle,
.ivg-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;
    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;
}

.ivg-mode-btn:hover,
.ivg-preset-btn:hover,
.ivg-btn:hover,
.ivg-compare-toggle:hover,
.ivg-download-item:hover {
    border-color: #d4af37;
    color: #2d2a26;
}

.ivg-mode-btn.is-active,
.ivg-preset-btn.is-active,
.ivg-compare-toggle.is-active {
    background: linear-gradient(135deg, #fff2df 0%, #eef3ff 100%);
    border-color: #d8ccb7;
    color: #2d2a26;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.14);
}

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

.ivg-btn-primary {
    background: #faf7f2;
    color: #2d2a26;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.12);
}

.ivg-btn-primary:hover:not(:disabled) {
    background: #f7f0e1;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.18);
}

.ivg-btn-secondary {
    background: #fff;
}

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

.ivg-slider-header,
.ivg-preview-head,
.ivg-result-head,
.ivg-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ivg-result-head,
.ivg-detail-head {
    align-items: flex-start;
}

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

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

.ivg-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 8px;
    border-radius: 999px;
    cursor: pointer;
    box-sizing: border-box;
}

.ivg-slider-strength {
    background: linear-gradient(90deg, #ece6dd 0%, #9f6a1c 100%);
}

.ivg-slider-coverage {
    background: linear-gradient(90deg, #7ba1ff 0%, #ffe4b8 100%);
}

.ivg-slider-softness {
    background: linear-gradient(90deg, #d4c8ff 0%, #ffd59d 100%);
}

.ivg-slider-roundness {
    background: linear-gradient(90deg, #7ba1ff 0%, #6fd0b8 100%);
}

.ivg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #d4af37;
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.18);
}

.ivg-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 2px solid #d4af37;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.18);
}

.ivg-slider-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: #8f8882;
}

.ivg-presets,
.ivg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ivg-download-wrapper {
    position: relative;
}

.ivg-download-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(45, 42, 38, 0.12);
}

.ivg-download-menu[hidden] {
    display: none;
}

.ivg-preview-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 16px;
    margin-top: 14px;
    border: 1px solid #ece6dd;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    overflow: hidden;
}

.ivg-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    color: #6b645d;
}

.ivg-empty-state[hidden],
.ivg-canvas-wrap[hidden],
.ivg-compare-container[hidden] {
    display: none !important;
}

.ivg-empty-state i {
    font-size: 32px;
    color: #d4af37;
}

.ivg-empty-state p,
.ivg-empty-state span,
.ivg-result-note,
.ivg-detail-note,
.ivg-privacy-card p {
    margin: 0;
}

.ivg-empty-state p {
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.ivg-empty-state span,
.ivg-result-note,
.ivg-detail-note,
.ivg-privacy-card p {
    font-size: 12px;
    line-height: 1.6;
    color: #6b645d;
}

.ivg-canvas-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ivg-canvas,
.ivg-compare-img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(45, 42, 38, 0.14);
}

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

.ivg-compare-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ivg-compare-side::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: #7a736b;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.ivg-summary-grid,
.ivg-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.ivg-summary-item,
.ivg-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid rgba(232, 228, 220, 0.92);
    background: rgba(255, 255, 255, 0.78);
}

.ivg-summary-value,
.ivg-detail-value {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: #1f1c19;
    word-break: keep-all;
}

.ivg-privacy-card {
    background: #fffdfa;
}

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

    .ivg-input-col {
        position: static;
    }
}

@media (max-width: 768px) {
    .ivg-preview-stage {
        min-height: 320px;
        padding: 12px;
    }

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

    .ivg-compare-container,
    .ivg-mode-tabs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .ivg-summary-grid,
    .ivg-detail-grid {
        grid-template-columns: 1fr;
    }

    .ivg-preset-btn,
    .ivg-btn,
    .ivg-download-wrapper,
    .ivg-download-wrapper .ivg-btn,
    .ivg-mode-btn {
        width: 100%;
    }

    .ivg-download-menu {
        left: 0;
        right: 0;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ivg-upload-area,
    .ivg-mode-btn,
    .ivg-preset-btn,
    .ivg-btn,
    .ivg-compare-toggle,
    .ivg-download-item {
        transition: none;
    }
}
