/* 기초 세팅 위저드 3단계 — 데스크톱/모바일 공용 (FacilityWizard3StepPlan.md)
   디자인 정본: 클로드 디자인 "주방맵 3단계 하이파이 v2" */

.fw-modal {
    width: 640px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    padding: 32px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.fw-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.fw-icon-btn {
    width: 30px;
    height: 30px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: none;
    cursor: pointer;
    color: #999;
    font-size: 19px;
    line-height: 1;
    font-family: inherit;
}

.fw-icon-btn:hover {
    color: #333;
}

.fw-icon-back {
    font-size: 26px;
    font-weight: 300;
}

.fw-steps {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fw-step {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    letter-spacing: -0.05em;
    font-size: 13px;
    font-weight: 500;
    color: #999;
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

.fw-step.current {
    font-weight: 700;
    color: #333;
    cursor: default;
}

.fw-step.todo {
    color: #ccc;
}

.fw-step-num {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    background: #ededed;
    color: #999;
}

.fw-step.current .fw-step-num {
    background: #333;
    color: #fff;
}

.fw-step.todo .fw-step-num {
    background: #f4f4f4;
    color: #ccc;
}

.fw-step-bar {
    width: 18px;
    height: 1px;
    flex: none;
    background: #eee;
}

.fw-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fw-tabs:empty {
    display: none;
}

.fw-tab {
    height: 42px;
    padding: 0 20px;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 50px;
    font-family: inherit;
    letter-spacing: -0.05em;
    font-size: 15px;
    font-weight: 700;
    background: #fff;
    color: #999;
    box-shadow: inset 0 0 0 1px #e8e8e8;
}

.fw-tab.active {
    background: #FBBE18;
    color: #fff;
    box-shadow: none;
}

.fw-image {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.fw-image img {
    width: 180px;
    height: 180px;
    object-fit: contain;
}

.fw-count {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 12px;
    margin-bottom: 10px;
    border-radius: 50px;
    background: #FEF6DC;
    font-size: 13px;
    font-weight: 700;
    color: #8A6B00;
}

.fw-hint {
    margin: 0 0 24px;
    max-width: 460px;
    text-align: center;
    white-space: pre-line;
    font-size: 15px;
    font-weight: 400;
    color: #666;
    line-height: 22px;
}

.fw-fields {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    /* 요소마다 필드가 1~3개라 탭 전환 시 높이가 요동친다 — 최대 기준으로 고정 */
    min-height: 150px;
}

.fw-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fw-field-label {
    width: 74px;
    flex: none;
    text-align: right;
    font-size: 15px;
    font-weight: 700;
    color: #E0A800;
}

.fw-field input {
    width: 250px;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 5px;
    background: #FEF6DC;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    letter-spacing: -0.05em;
    box-sizing: border-box;
}

.fw-field input:focus {
    outline: none;
}

.fw-field-unit {
    width: 40px;
    flex: none;
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

.fw-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.fw-primary,
.fw-secondary {
    flex: 1;
    height: 56px;
    border: 0;
    border-radius: 50px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.05em;
    cursor: pointer;
}

.fw-primary {
    background: #FBBE18;
    color: #fff;
}

.fw-primary:hover {
    background: #EFB00A;
}

.fw-secondary {
    background: #fff;
    box-shadow: inset 0 0 0 1px #FBBE18;
    color: #E0A800;
}

.fw-secondary:hover {
    background: #FFFBEE;
}

/* ===== 모바일 ===== */
.fw-modal.fw-mobile {
    width: 100%;
    max-width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    position: relative;
}

.fw-mobile .fw-scroll {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 18px 20px 108px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.fw-mobile .fw-head {
    gap: 8px;
    margin-bottom: 18px;
}

.fw-mobile .fw-icon-btn {
    width: 28px;
    height: 28px;
    font-size: 17px;
}

.fw-mobile .fw-icon-back {
    font-size: 24px;
}

.fw-mobile .fw-steps {
    gap: 6px;
}

.fw-mobile .fw-step {
    gap: 5px;
    font-size: 12px;
}

.fw-mobile .fw-step-num {
    width: 18px;
    height: 18px;
    font-size: 11px;
}

.fw-mobile .fw-step-bar {
    width: 12px;
}

.fw-mobile .fw-tabs {
    gap: 6px;
    margin-bottom: 14px;
    width: 100%;
}

/* 모바일 탭은 화면 폭 균등 분할 세그먼트형 */
.fw-mobile .fw-tab {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    font-size: 14px;
}

.fw-mobile .fw-image {
    height: 158px;
    margin-bottom: 12px;
}

.fw-mobile .fw-image img {
    width: 150px;
    height: 150px;
}

.fw-mobile .fw-count {
    height: 24px;
    padding: 0 11px;
    font-size: 12px;
}

.fw-mobile .fw-hint {
    font-size: 14px;
    line-height: 21px;
}

.fw-mobile .fw-fields {
    gap: 10px;
    margin-bottom: 0;
    min-height: 162px;
}

.fw-mobile .fw-field {
    gap: 8px;
}

.fw-mobile .fw-field-label {
    width: 68px;
    font-size: 14px;
}

.fw-mobile .fw-field input {
    width: 140px;
    height: 44px;
    padding: 0 12px;
}

.fw-mobile .fw-field-unit {
    width: 32px;
    font-size: 13px;
}

/* 버튼은 콘텐츠 흐름이 아니라 화면 하단 고정 (핸드오프 §3) */
.fw-mobile .fw-buttons {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
    background: #fff;
    gap: 10px;
    box-sizing: border-box;
}

.fw-mobile .fw-primary,
.fw-mobile .fw-secondary {
    height: 54px;
    font-size: 16px;
}
