/**
 * Black and White Filter Styles
 * 흑백 사진 필터 전용 스타일
 *
 * @package Zipper
 */

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

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

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

.bwf-input-col,
.bwf-result-col,
.bwf-preview-stage,
.bwf-summary-grid,
.bwf-detail-grid {
    min-width: 0;
}

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

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

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

.bwf-input-section,
.bwf-detail-card,
.bwf-privacy-card {
    padding: 18px;
}

.bwf-preview-card,
.bwf-result-hero {
    padding: 18px;
}

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

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

.bwf-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.bwf-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;
}

.bwf-upload-area:hover,
.bwf-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);
}

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

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

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

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

.bwf-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;
}

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

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

.bwf-result-head {
    align-items: flex-start;
}

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

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

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

.bwf-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;
}

.bwf-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);
}

.bwf-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);
}

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

.bwf-preset-btn,
.bwf-btn,
.bwf-compare-toggle,
.bwf-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;
    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;
    box-sizing: border-box;
}

.bwf-preset-btn {
    flex: 1 1 110px;
}

.bwf-preset-btn:hover,
.bwf-btn:hover:not(:disabled),
.bwf-compare-toggle:hover:not(:disabled),
.bwf-download-item:hover {
    border-color: #d4c67a;
    color: #2d2a26;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.bwf-preset-btn.active,
.bwf-compare-toggle.active {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fdfbf5 0%, #faf6ec 100%);
    color: #8a6500;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.14);
}

.bwf-btn {
    flex: 1 1 140px;
}

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

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

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

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

.bwf-download-wrapper {
    position: relative;
    flex: 1 1 100%;
    width: 100%;
}

.bwf-download-wrapper .bwf-btn {
    width: 100%;
}

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

.bwf-download-item {
    width: 100%;
    justify-content: flex-start;
}

.bwf-preview-head {
    margin-bottom: 14px;
}

.bwf-preview-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    padding: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(232, 228, 220, 0.9);
    overflow: hidden;
}

.bwf-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 360px;
    text-align: center;
    color: #5f5a56;
}

.bwf-empty-state i {
    font-size: 40px;
    color: #d4af37;
}

.bwf-empty-state p,
.bwf-empty-state span,
.bwf-result-note,
.bwf-detail-note,
.bwf-privacy-card p {
    margin: 0;
    line-height: 1.6;
}

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

.bwf-empty-state span,
.bwf-result-note,
.bwf-detail-note,
.bwf-privacy-card p {
    font-size: 13px;
    color: #6a645f;
}

.bwf-canvas-wrap,
.bwf-compare-container {
    width: 100%;
}

.bwf-canvas,
.bwf-compare-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
    border-radius: 12px;
    background: #f2f0ec;
}

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

.bwf-compare-side {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bwf-compare-side::before {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(26, 24, 22, 0.74);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

.bwf-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.bwf-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(232, 228, 220, 0.95);
}

.bwf-summary-value {
    font-size: 13px;
    font-weight: 700;
    color: #2d2a26;
    letter-spacing: -0.02em;
    word-break: break-word;
    line-height: 1.35;
}

.bwf-detail-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bwf-detail-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.bwf-detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: #faf9f7;
    border: 1px solid #ece8e0;
}

.bwf-detail-label {
    font-size: 10px;
    font-weight: 600;
    color: #7a756d;
    line-height: 1.3;
}

.bwf-detail-value {
    font-size: 12px;
    font-weight: 700;
    color: #2d2a26;
    line-height: 1.35;
    word-break: break-word;
}

.bwf-privacy-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
}

[hidden] {
    display: none !important;
}

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

    .bwf-result-col {
        order: -1;
    }

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

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

    .bwf-detail-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .bwf-preview-head,
    .bwf-result-head,
    .bwf-detail-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .bwf-preview-stage {
        min-height: 300px;
        padding: 14px;
    }

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

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

    .bwf-input-section,
    .bwf-preview-card,
    .bwf-result-hero,
    .bwf-detail-card,
    .bwf-privacy-card {
        padding: 16px;
    }

    .bwf-actions {
        flex-direction: column;
    }

    .bwf-download-wrapper,
    .bwf-btn {
        width: 100%;
    }
}

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