/* Global Styles from site.css */
html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn.active:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, .4);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #0f172a;
  color: #e5e7eb;
}

/* Styles from Index.cshtml */
.editor-container {
    display: flex;
    height: calc(100vh - 100px);
}

.side-menu {
    width: 80px;
    padding: 12px 0;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.menu-item {
    padding: 12px 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 4px 8px;
    border-radius: 12px;
}

.menu-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: #e5e7eb;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.menu-item.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    overflow-x: auto;
    overflow-y: auto;
    /* ★3: 작업영역(캔버스 주변)을 밝은 중성 회색으로 — 다크 배경의 색 인지 왜곡(동시대비) 완화.
       상단바(.top-bar)와 우측 서브메뉴(.sub-menu)는 각자 다크 배경을 가지므로 그대로 유지됨. */
    background: #eef2f7;
    display: flex;
    flex-direction: column;
    min-width: 1157px;
    text-align: center;
}

/* ★3 대비 보정: 밝은 작업영역에 직접 놓인 캔버스 하단 줌/면전환 줄 텍스트·아웃라인 버튼 가독성 확보.
   (.top-bar 내부 컨트롤은 자체 다크 배경 위라 영향 없음 — 직계 .row만 타겟) */
.main-content > .row .form-label {
    color: #334155;
}
.main-content > .row .btn-outline-secondary {
    color: #475569;
    border-color: #cbd5e1;
}
.main-content > .row .btn-outline-secondary:hover {
    color: #1e293b;
    border-color: #94a3b8;
    background: #e2e8f0;
}

.top-bar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    text-align: left;
    position: relative;
    z-index: 100;
}

.canvas-wrapper {
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(99, 102, 241, 0.3);
    margin: 20px auto;
    flex-shrink: 0;
    border-radius: 0;
    padding: 0;
    position: relative;
    display: inline-block;
}

#cardCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 0;
    box-shadow: none;
    background: white;
}

.sub-menu {
    width: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.4);
}

.sub-menu.active {
    width: 340px;
    padding: 20px;
    overflow-y: auto;
}

.sub-menu::-webkit-scrollbar {
    width: 6px;
}

.sub-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sub-menu::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

.sub-menu-content {
    display: none;
}

.sub-menu-content.visible {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Color Picker and Palette Styles */
#custom-color-picker {
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 16px;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#custom-color-picker .value-inputs input {
    width: 50px;
    background: #475569;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #e5e7eb;
    border-radius: 6px;
    padding: 6px;
    transition: all 0.2s ease;
}

#custom-color-picker .value-inputs input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.picker-tabs {
    display: flex;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.tab-link {
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-bottom: none;
    padding: 8px 16px;
    cursor: pointer;
    margin-right: 5px;
    color: #9ca3af;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.tab-link:hover {
    background: #334155;
    color: #e5e7eb;
}

.tab-link.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
}

.tab-content {
    display: none;
    padding: 12px 0;
}

.swatch-group {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 8px;
    gap: 2px;
}

.swatch {
    height: 24px;
    margin: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.swatch:hover, .cmyk-color-palette > div:hover {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cmyk-color-palette {
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

.color-preview {
    width: 220px;
    height: 48px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    margin: 0 auto 12px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.value-inputs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 8px;
}

.value-inputs label {
    display: block;
    margin-bottom: 4px;
    color: #9ca3af;
}

.cmyk-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.cmyk-input-group label {
    font-size: 0.85em;
    margin-bottom: 4px;
    color: #e5e7eb;
    font-weight: 500;
}

.cmyk-input-group input {
    width: 100%;
    max-width: 70px;
    text-align: center;
    padding: 6px 4px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    background: #475569;
    color: #e5e7eb;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.cmyk-input-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.recent-colors {
    margin-top: 12px;
}

#cmyk-color-grid {
    display: grid;
    gap: 0;
    justify-content: center;
    align-items: center;
}

#context-menu {
    position: absolute;
    display: none;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    z-index: 1000;
    padding: 8px;
    font-size: 14px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
}

#context-menu button {
    display: block;
    margin: 4px 0;
    width: 100%;
    background: transparent;
    border: none;
    color: #e5e7eb;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

#context-menu button:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    transform: translateX(4px);
}

#context-menu button.text-danger {
    color: #ef4444;
}

#context-menu button.text-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
}

#toggle-guides, #color-palette, #actions {
    margin-top: 12px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    display: inline-block;
    margin-right: 6px;
    cursor: pointer;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Custom Font Select */
.custom-font-select {
    position: relative;
}

.custom-font-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    cursor: pointer;
    color: #e5e7eb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-font-select-trigger:hover {
    border-color: rgba(99, 102, 241, 0.6);
}

.custom-font-select.open .custom-font-select-trigger {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, .4);
}

.custom-font-select-text {
    font-size: 1.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-font-select-arrow {
    font-size: 0.85em;
    color: #9ca3af;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.custom-font-select.open .custom-font-select-arrow {
    transform: rotate(180deg);
}

.custom-font-select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

.custom-font-select.open .custom-font-select-options {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

.custom-font-option {
    padding: 8px 12px;
    cursor: pointer;
    color: #e5e7eb;
    border-radius: 6px;
    transition: background 0.15s ease;
    font-size: 1.05em;
    line-height: 1.6;
}

.custom-font-option:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

.custom-font-option.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
}

.custom-font-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-font-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-font-select-options::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .editor-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    /* 사이드 메뉴를 상단 가로 스크롤로 변경 */
    .side-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto;
        overflow-y: hidden;
        z-index: 999;
        padding: 8px 0;
        border-right: none;
        border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    }

    .menu-item {
        flex: 0 0 auto;
        min-width: 70px;
        padding: 8px 12px;
        font-size: 0.7rem;
        margin: 0 4px;
    }

    .menu-item svg {
        width: 20px;
        height: 20px;
    }

    /* 서브 메뉴를 하단 드로어로 변경 */
    .sub-menu {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        max-height: 50vh;
        overflow-y: auto;
        z-index: 998;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        border-right: none;
        border-top: 1px solid rgba(99, 102, 241, 0.2);
    }

    .sub-menu.active {
        width: 100% !important;
        transform: translateY(0);
        padding: 16px;
    }

    /* 메인 콘텐츠 영역 */
    .main-content {
        flex: 1;
        margin-top: 60px !important;
        margin-bottom: 0;
        padding: 8px !important;
        min-width: auto !important;
        width: 100%;
        overflow: auto;
    }

    .top-bar {
        padding: 8px 12px !important;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }

    /* 캔버스 래퍼 */
    .canvas-wrapper {
        width: 100% !important;
        height: auto !important;
        overflow: auto;
        margin: 0 auto !important;
    }

    /* 컨텍스트 메뉴 */
    #context-menu {
        width: 90%;
        max-width: 300px;
    }
}

/* 태블릿 */
@media (min-width: 769px) and (max-width: 1024px) {
    .side-menu {
        width: 70px;
    }

    .sub-menu.active {
        width: 280px;
    }

    .main-content {
        min-width: auto;
    }
}

/* ── 안내 카드 (서브 패널 안의 '설정 참고표' 류) ────────────────────────────────
   예전엔 벡터 패널의 SVG 저장 설정표가 색·테두리를 전부 인라인 style 로 갖고 있어서
   패널 테마를 바꿀 때마다 이 카드만 혼자 튀었다. 클래스로 빼서 여기서 관리한다.
   데스크톱·모바일 공용이므로 editorRefine.css(데스크톱 전용)가 아니라 여기에 둔다. */
.ed-note-card {
    margin-top: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
}

.ed-note-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.ed-note-card-title i {
    color: #818cf8;
}

.ed-note-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.ed-note-table th {
    padding: 5px 6px;
    text-align: left;
    font-weight: 500;
    color: #7c8ba1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.ed-note-table td {
    padding: 6px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.ed-note-table tr:last-child td {
    border-bottom: 0;
}

.ed-note-table .is-center {
    text-align: center;
}

.ed-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.ed-tag-warn {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
}

/* 작은 컨트롤 둘을 한 줄에 묶는 래퍼.
   기본은 display:contents — 래퍼가 레이아웃에서 사라져 자식 .mb-3 들이
   원래대로 부모의 직접 자식처럼 배치된다. 모바일 시트의 카드 배치가
   .mb-3 를 기준으로 짜여 있어서, 래퍼를 넣어도 아무것도 안 바뀌게 하려는 것.
   한 줄로 묶는 건 데스크톱(editorRefine.css)에서만 한다. */
.ed-field-row {
    display: contents;
}

/* 우클릭 안내 칩의 기본 상태 = 숨김.
   생김새는 editorRefine.css(데스크톱 전용)가 맡지만, 숨김만은 반드시 공용이어야 한다.
   데스크톱 전용 파일에 두면 모바일에선 규칙이 하나도 안 걸려 그냥 보이는 div 가 된다.
   모바일은 우클릭이 아니라 길게 누르기라 이 안내 자체가 맞지 않는다. */
.context-menu-hint {
    display: none;
}

/* ── 제품 안내 토스트 (EditorProduct._hint) ──────────────────────────────────
   자유모양 스티커처럼 "배경이 없어야 의미가 있는" 제품에서, 이미지를 올린 순간
   결과를 미리 알려 준다. 배경제거를 자동으로 돌리는 대신 택한 방식이다
   (GPU 비용·대기시간·되돌리기 문제 — editorProduct.js 설정 주석 참조).

   캔버스 위가 아니라 화면 상단에 띄운다. 캔버스 위에 얹으면 방금 올린 이미지를
   가려서, 정작 안내가 가리키는 대상을 못 보게 된다. */
.ed-product-hint {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    z-index: 3000;
    max-width: min(520px, calc(100vw - 32px));
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ed-product-hint.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 경고 — 이대로 두면 결과가 잘못된다 */
.ed-product-hint[data-kind="warn"] {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #7c2d12;
}

/* 확인 — 그냥 진행해도 된다 */
.ed-product-hint[data-kind="ok"] {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #14532d;
}

.ed-product-hint b {
    font-weight: 700;
}

/* ============================================================
   고객용 크기 바
   ------------------------------------------------------------
   지금까지 비관리자에게는 캔버스 크기가 아예 안 보였다.
   자기가 만드는 게 몇 mm 인지 모르는 채로 주문하던 상태다.

   가로·세로는 자유롭게 받는다. 다만 그림은 균등 배율로만 커진다 —
   가로만 늘렸다고 그림까지 옆으로 늘어나면 짱구가 된다.
   ============================================================ */
.ed-size-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 2px;
    font-size: 13px;
    color: #475569;
}

.ed-size-title {
    font-weight: 600;
    color: #64748b;
    letter-spacing: .02em;
}

.ed-size-fixed {
    padding: 6px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

.ed-size-edit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ed-size-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 5px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease;
}

.ed-size-field:focus-within { border-color: #6366f1; }


.ed-size-axis {
    font-weight: 700;
    font-size: 11px;
    color: #94a3b8;
}

.ed-size-field input {
    width: 62px;
    border: 0;
    outline: 0;
    background: transparent;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    padding: 0;
}


/* 스피너는 숨긴다 — 폭이 좁아 잘못 눌리기 쉽다 */
.ed-size-field input::-webkit-outer-spin-button,
.ed-size-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ed-size-field input[type=number] { -moz-appearance: textfield; }

.ed-size-field em {
    font-style: normal;
    font-size: 11px;
    color: #94a3b8;
}

.ed-size-x { color: #cbd5e1; font-size: 12px; }

.ed-size-apply {
    padding: 7px 18px;
    border: 0;
    border-radius: 10px;
    background: #2b4697;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
    /* 좁은 화면에서 '적/용' 으로 쪼개지던 것을 막는다 */
    white-space: nowrap;
    flex: 0 0 auto;
}

.ed-size-apply:hover { background: #1e3a7a; }

.ed-size-hint {
    font-size: 12px;
    color: #94a3b8;
    min-width: 1px;
}

.ed-size-hint.is-error { color: #dc2626; font-weight: 500; }

@media (pointer: coarse) and (max-width: 1400px) {
    /* 좁은 화면에서는 한 줄에 다 넣되 각 칸이 자기 몫만 차지하게 한다.
       예전엔 입력칸이 폭을 다 먹어 '적용' 이 세로로 쪼개졌다. */
    .ed-size-bar {
        flex-wrap: nowrap;
        gap: 5px;
        margin: 4px 0 2px;
        padding: 0 6px;
        /* 크기 바가 재단선 안내줄보다 위로 — 데스크톱과 같은 순서.
           .editor-bottom-row 가 order:-1 이라 그냥 두면 안내줄이 위로 간다. */
        order: -2;
    }

    .ed-size-title { font-size: 12px; }
    .ed-size-field { padding: 4px 7px; gap: 4px; flex: 1 1 auto; min-width: 0; }
    .ed-size-field input { width: 100%; min-width: 34px; font-size: 13px; }
    .ed-size-x { display: none; }
    .ed-size-apply { padding: 7px 12px; }

    /* 안내 문구는 **숨기지 않는다.** "너무 큽니다" 같은 오류도 여기로 나가므로
       숨기면 고객은 왜 안 되는지 모른 채로 남는다. 둘째 줄로 흘려보낸다. */
    .ed-size-edit { flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
    .ed-size-hint { width: 100%; text-align: center; font-size: 11px; }
}

/* ============================================================
   단계 안내 띠 (스티커·키링)
   ------------------------------------------------------------
   명함은 도구를 고르는 편집기라 순서가 없다. 스티커는 사진→배경제거→칼선을
   밟아야 하는데 그 셋이 두 패널에 흩어져 있어 어디부터 눌러야 할지 알 수 없었다.
   화면을 나누는 대신(위저드) 순서만 보여 준다.
   ============================================================ */
.ed-steps {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 6px;
}

.ed-step {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px 8px 11px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    /* 살짝 떠 있게 — 눌리는 것이라는 신호 */
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
    transition: transform .12s ease, box-shadow .15s ease,
                background-color .15s ease, border-color .15s ease;
}

.ed-step:hover:not(:disabled) {
    border-color: #94a3b8;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
    transform: translateY(-1px);
}

.ed-step:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 2px rgba(15,23,42,.1); }

/* 지금 할 일 — 꽉 찬 버튼. 여기만 색이 차 있어서 어디를 눌러야 할지 한눈에 보인다.
   (테두리만 있는 옅은 칩은 '진행 표시'처럼 읽혀 안 눌렀다) */
.ed-step.is-next {
    border-color: #2b4697;
    background: #2b4697;
    color: #fff;
    box-shadow: 0 4px 14px rgba(43, 70, 151, .35);
}

.ed-step.is-next:hover:not(:disabled) { background: #1e3a7a; border-color: #1e3a7a; }

.ed-step.is-done {
    color: #15803d;
    border-color: #bbf7d0;
    background: #f0fdf4;
    font-weight: 500;
    box-shadow: none;
}

.ed-step:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
    background: #f8fafc;
}

.ed-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.ed-step.is-next .ed-step-no { background: rgba(255,255,255,.22); color: #fff; }
.ed-step.is-done .ed-step-no { background: #22c55e; color: #fff; }

/* 단계 아이콘 — 번호와 글자 사이. 흐리게 둬서 글자를 안 가린다 */
.ed-step-ico {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    opacity: .75;
    margin-right: -2px;
}

.ed-step.is-next .ed-step-ico { opacity: 1; }

.ed-step-body { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.ed-step-label { white-space: nowrap; }

/* 왜 눌러야 하는지 — 지금 할 일에서만 보인다(늘 보이면 글자만 많아진다) */
.ed-step-hint {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, .82);
    white-space: nowrap;
    display: none;
}

.ed-step.is-next .ed-step-hint { display: block; }

.ed-step-opt { font-size: 10.5px; opacity: .7; font-weight: 400; }

/* 지금 할 일에만 붙는 화살표 — '누르면 실행된다'는 마지막 신호 */
.ed-step-go { display: none; font-size: 13px; margin-left: 2px; }
.ed-step.is-next .ed-step-go { display: inline; }

.ed-step-arrow { align-self: center; color: #cbd5e1; font-size: 12px; }

@media (pointer: coarse) and (max-width: 1400px) {
    .ed-steps { gap: 4px; margin: 2px 0 4px; padding: 0 6px; }
    .ed-step { padding: 5px 10px 5px 7px; font-size: 12px; gap: 6px; }
    .ed-step-no { width: 18px; height: 18px; flex-basis: 18px; font-size: 11px; }
    /* 좁은 화면에선 번호를 빼고 아이콘만 — 아이콘이 무슨 일인지 더 빨리 알려 준다 */
    .ed-step-ico svg { width: 14px; height: 14px; }
    /* 좁은 화면에서는 설명까지 넣으면 줄이 넘친다 — 이름만 */
    .ed-step-hint { display: none !important; }
    .ed-step-arrow { display: none; }
}
