@charset "utf-8";

/* 모노톤 테마 정의 */
:root {
    --main-dark: #333;
    --border-color: #ddd;
    --bg-light: #f9f9f9;
}

/* 1. 그리드 설정: 너비를 더 줄이고 간격을 최소화 */
.switch-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); /* 110px -> 85px로 축소 */
    gap: 10px 5px; /* 상하 10px, 좌우 5px로 매우 좁게 설정 */
    padding: 20px 0; 
    justify-items: center; 
}

/* 2. 카드 설정: 여백 제거 */
.switch-card { 
    background: transparent !important; 
    border: none !important;
    position: relative; 
    cursor: pointer; 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 더 톡 튀어오르는 느낌 */
    width: 80px; /* 카드 자체 너비도 아이콘에 맞춤 */
    margin: 0;
}

/* 3. 호버 인터랙션 보정 */
.switch-card:hover {
    transform: translateY(-12px) scale(1.1); /* 위로 더 높게, 크기도 살짝 키움 */
    z-index: 5; /* 위로 올라올 때 옆 스위치보다 앞에 보이게 함 */
}

.switch-img-box { 
    padding: 0; 
    background: transparent !important; 
    transition: transform 0.3s ease;
}

.switch-img-box svg { 
    width: 80px; /* 크기를 살짝 줄여서 더 촘촘한 느낌 유도 */
    height: auto; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
    display: block;
    margin: 0 auto;
}

/* 4. 정보창 스타일 (위치 고정) */
.switch-card::after {
    content: attr(data-info);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none; /* 마우스 간섭 방지 */
}

.switch-card:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 모달 */
.ui-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 10000; display: none; align-items: center; justify-content: center;
}
.modal-content {
    width: 95%; 
    max-width: 500px; 
    background: #fff; 
    border-radius: 12px; 
    padding: 25px; 
    position: relative; 
    max-height: 85vh; 
    overflow: visible;
}
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; border: none; background: none; cursor: pointer; }
/* 2. 내부 로드 영역에만 스크롤 부여 (버튼 유실 방지) */
#modal_body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 5px;
}
    /* 전체 너비 유지 및 폰트 사이즈 전역 축소 */
    .theme-form { max-width: 720px; margin: 0 auto; font-family: 'Pretendard', sans-serif; font-size: 13px; }
    
    .spec-card { 
        display: flex; 
        gap: 20px; 
        background: #fff; 
        padding: 15px; 
        border-radius: 10px; 
        margin-bottom: 12px; 
        box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
        border: 1px solid #eee;
        box-sizing: border-box; /* 패딩이 너비에 영향을 주지 않도록 설정 */
    }

    /* 왼쪽 프리뷰 영역 너비 고정 */
    .preview-box { 
        width: 150px; 
        flex-shrink: 0;
        display: flex; 
        flex-direction: column; 
        gap: 8px;
    }
    .svg-container { 
        width: 100%; height: 150px; 
        background: #f8f9fa; 
        border-radius: 6px; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
    }

    /* 오른쪽 스펙 영역: 남은 공간 모두 사용 */
    .spec-inputs { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    
    .row { display: flex; align-items: center; gap: 8px; width: 100%; }
    .row label { width: 75px; font-size: 12px; color: #777; font-weight: 600; flex-shrink: 0; }
    
    /* 입력창 디자인 더 슬림하게 */
    .input-sm { 
        flex: 1; height: 28px; border: 1px solid #e2e8f0; border-radius: 4px; 
        padding: 0 6px; font-size: 12px; outline: none; min-width: 0;
    }
    
    .input-color { width: 100%; height: 28px; border: 1px solid #e2e8f0; border-radius: 4px; padding: 1px; cursor: pointer; }

    /* 피치 슬라이더 영역 최적화 */
    .pitch-mini-box { 
        margin-top: 4px; padding: 8px 12px; background: #f1f5f9; border-radius: 6px; box-sizing: border-box;
    }
    .pitch-info { display: flex; justify-content: space-between; margin-bottom: 2px; font-size: 11px; font-weight: bold; }
    
    /* 슬라이더가 튀어나가지 않게 설정 */
    input[type="range"] { width: 100%; margin: 0; cursor: pointer; }

/* 기존 코드 아래에 추가 또는 덮어쓰기 */

.subject-input {
    width: 100%; height: 36px; margin-bottom: 10px; 
    font-size: 14px !important; font-weight: bold; 
    border-radius: 6px; box-sizing: border-box;
}

/* 에디터 이중 테두리 제거 */
.write_content_wrapper {
    border: none !important; /* 감싸는 박스 테두리 제거 */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 모노톤 피치 슬라이더 디자인 */
.pitch-mini-box {
    margin-top: 4px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px;
}
.pitch-info {
    display: flex; justify-content: space-between; 
    margin-bottom: 4px; font-size: 11px; color: #444; font-weight: bold;
}
#pitch_val { color: #000; }

.pitch-slider-container {
    display: flex; align-items: center; gap: 8px;
}
.pitch-guide { font-size: 10px; color: #999; flex-shrink: 0; }

/* 슬라이더 모노톤 스타일링 */
input[type="range"] {
    -webkit-appearance: none; width: 100%; background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; background: #e2e8f0; border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 14px; width: 14px; 
    border-radius: 50%; background: #333; /* 모노톤 핸들 */
    margin-top: -5px; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 버튼 그룹 정렬 */
.btn_confirm_group { margin-top: 20px; text-align: center; padding-bottom: 30px; }
.btn_submit_custom {
    padding: 10px 35px; font-size: 13px; border-radius: 6px; 
    background: #1e293b; color: #fff; border: none; cursor: pointer; font-weight: 600;
}
.btn_cancel_custom {
    padding: 10px 35px; font-size: 13px; color: #94a3b8; text-decoration: none; font-weight: 500;
}
/* 에디터 외부 감싸는 영역 스타일 수정 */
#custom_editor_zone {
    border: none !important;      /* 외부 테두리 완전 제거 */
    padding: 20px !important;    /* 에디터와 주변 사이의 여백 확보 */
    margin-top: 15px;
    background: #fdfdfd;         /* 살짝 밝은 미색 배경으로 구분감 부여 */
    border-radius: 12px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.03); /* 안쪽으로 살짝 음영을 주어 깊이감 형성 */
}

/* 에디터 본체 테두리만 남기기 */
#custom_editor_zone .cke, 
#custom_editor_zone .cke_inner,
#custom_editor_zone .se2_input_area {
    border: 1px solid #d1d5db !important; /* 이 테두리 하나만 보이게 됨 */
    border-radius: 4px;
}

/* 7. 모노톤 버튼 그룹 (크기 축소 및 최적화) */
.btn_confirm_group { 
    margin-top: 25px; 
    display: flex; 
    justify-content: center; 
    gap: 8px; 
    padding-bottom: 40px; 
}

.btn_mono_submit, .btn_mono_cancel {
    width: 100px;           /* 130px -> 100px 축소 */
    height: 32px;          /* 42px -> 32px 축소 */
    font-size: 12px;       /* 14px -> 12px 축소 */
    font-weight: 500; 
    border-radius: 6px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none; 
    transition: all 0.2s ease; 
    box-sizing: border-box;
}

/* 저장하기 버튼: 묵직한 모노톤 */
.btn_mono_submit { 
    background: #334155; 
    color: #fff; 
    border: none; 
}
.btn_mono_submit:hover { 
    background: #1e293b; 
}

/* 취소 버튼: 깔끔한 라인 타입 */
.btn_mono_cancel { 
    background: #fff; 
    color: #94a3b8; 
    border: 1px solid #e2e8f0; 
}
.btn_mono_cancel:hover { 
    background: #f8f9fa; 
    border-color: #cbd5e1;
    color: #64748b; 
}

/* 보기 모드 전용 스타일 */
.spec-card.view-mode {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin-bottom: 25px;
}

.view-subject {
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    margin-top: 10px;
    color: #334155;
}

.view-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

.view-row .label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.view-row .val {
    font-size: 12px;
    color: #1e293b;
    font-weight: 500;
}

/* 피치 바 (보기 모드용) */
.pitch-bar-bg {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 4px 0;
    position: relative;
}

.pitch-bar-fill {
    height: 100%;
    background: #334155;
    border-radius: 2px;
}

.pitch-guide-text {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #cbd5e1;
}

/* 코멘트 영역 */
.view-content-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

.content-label {
    font-size: 11px;
    font-weight: bold;
    color: #94a3b8;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.content-body {
    font-size: 13px;
    line-height: 1.3;
    color: #334155;
}

/* 작은 버튼 스타일 */
.view-btn-group {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.btn_mono_small {
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 4px;
    text-decoration: none;
    background: #f8f9fa;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* View 전용 레이아웃 */
.view-container { max-width: 720px; margin: 20px auto; padding: 0 15px; }
.view-mode-card { align-items: flex-start !important; }
.view-subject-title {
    display: block;        /* flex 해제 */
    text-align: left;      /* 왼쪽 정렬 강제 */
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}
.view-type-small {
    font-size: 13px;       /* 작게 */
    font-weight: 400;      /* 가늘게 */
    color: #94a3b8;        /* 연한 회색 */
    margin-left: 8px;      /* 이름과 살짝 띄움 */
    display: inline-block; /* 이름 옆에 나란히 배치 */
    vertical-align: baseline;
}
.view-info-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 15px; }
.info-row { display: flex; justify-content: space-between; padding-bottom: 5px; border-bottom: 1px solid #f1f5f9; }
.info-row .label { font-size: 11px; color: #94a3b8; font-weight: 600; }
.info-row .val { font-size: 13px; color: #334155; font-weight: 500; }

.view-content-wrapper { background: #fff; border-radius: 10px; padding: 20px; margin-top: 15px; border: 1px solid #eee; }
.content-header { font-size: 11px; font-weight: 700; color: #94a3b8; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }

/* 버튼 디자인 통일 */
.view-btn-group { margin-top: 20px; display: flex; justify-content: space-between; padding-bottom: 50px; }
.btn_mono_view { 
    display: inline-block; padding: 8px 18px; font-size: 12px; border-radius: 6px; 
    background: #fff; border: 1px solid #e2e8f0; color: #64748b; text-decoration: none; transition: 0.2s;
}
.btn_mono_view:hover { background: #f8f9fa; color: #1e293b; border-color: #cbd5e1; }

/* 피치 바 스타일링 */
.pitch-bar-bg { width: 100%; height: 5px; background: #e2e8f0; border-radius: 3px; margin: 6px 0; }
.pitch-bar-fill { height: 100%; background: #333; border-radius: 3px; }
.pitch-guide-text { display: flex; justify-content: space-between; font-size: 10px; color: #cbd5e1; }

/* 모달 내비게이션 버튼 위치 최적화 */
.nav-modal {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #ddd;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10100 !important;
    display: none; /* JS에서 제어 */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

/* 흰색 박스(.modal-content) 기준으로 바깥쪽 배치 */
.nav-modal.prev { 
    left: -60px; /* 박스 왼쪽 밖으로 60px 이동 */
} 
.nav-modal.next { 
    right: -60px; /* 박스 오른쪽 밖으로 60px 이동 */
}

.nav-modal:hover { 
    background: #333 !important; 
    color: #fff !important; 
}

/* 화면이 작아지면 버튼이 화면 밖으로 나가므로 안쪽으로 넣어줌 */
@media (max-width: 650px) {
    .nav-modal.prev { left: 5px; }
    .nav-modal.next { right: 5px; }
    .nav-modal { width: 36px; height: 36px; background: rgba(255,255,255,0.8) !important; }
}
/* 아래쪽 그리드 정보(Stem/Housing 등)는 원래대로 왼쪽 정렬 유지 */
.view-info-grid {
    text-align: left;
}

/* 뷰 페이지 전용: 이미지 아래 컬러 점들 */
.view-color-dots {
    display: flex;
    justify-content: center;
    gap: 8px;           /* 점 사이 간격 */
    margin-top: 10px;   /* SVG와의 간격 최소화 */
}

.view-color-dots .dot {
    width: 14px;        /* 크기를 살짝 줄임 */
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 왼쪽 preview-box가 너무 길어지지 않게 조정 */
.preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 5px; /* 하단 여백 축소 */
}
/* 피치 박스 레이아웃 정돈 */
.pitch-right { display: flex; align-items: center; gap: 10px; }
.detail-mode-switch { font-size: 11px; color: #94a3b8; cursor: pointer; display: flex; align-items: center; gap: 3px; }

/* 슬라이더 래퍼: 양 끝 여백을 주어 글자가 안으로 들어오게 함 */
.pitch-slider-wrapper {
    position: relative;
    padding: 0 12px; 
    margin-top: 10px;
}

.pitch-slider-wrapper input[type=range] {
    width: 100%;
    cursor: pointer;
}

/* 5단계 가이드 텍스트 */
.pitch-step-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}

.pitch-step-labels span {
    font-size: 10px;
    color: #cbd5e1;
    font-weight: 600;
    transition: 0.2s;
    pointer-events: none; /* 클릭 방지 */
}

/* 활성화된 단계 강조 */
.pitch-step-labels span.active {
    color: #333;
    transform: scale(1.1);
}

/* 상세조절 시 가이드 투명도 조절 */
.pitch-step-labels.dimmed {
    opacity: 0.3;
}
/* 피치 수치 강조 */
.pitch-num {
    display: inline-block;
    min-width: 50px; /* 숫자가 텍스트로 바뀔 때 레이아웃 흔들림 방지 */
    text-align: right;
    font-weight: bold;
    color: var(--main-dark);
}

/* 피치 바 채우기 색상 (로우는 연하게, 하이는 진하게 처리 가능) */
.pitch-bar-fill {
    background: linear-gradient(to right, #94a3b8, #333);
    transition: width 0.5s ease-out;
}
/* 피치 바 배경 */
.pitch-bar-bg { 
    position: relative; 
    width: 100%; 
    height: 8px; 
    background: #e2e8f0; 
    border-radius: 4px; 
    margin: 8px 0; 
    overflow: hidden; 
}

/* 상세 모드: 차오르는 바 */
.pitch-bar-fill { 
    height: 100%; 
    background: var(--main-dark); 
    transition: width 0.3s ease; 
}

/* 가이드 모드: 구간 강조 */
.pitch-bar-bg.area-mode { background: #f1f5f9; } /* 배경 좀 더 연하게 */

.pitch-area-highlight {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--main-dark);
    border-radius: 4px;
    opacity: 0.8;
}
/* 그룹 헤더 디자인 */
.group-header {
    grid-column: 1 / -1; /* 전체 너비 차지 */
    display: flex;
    align-items: baseline;
    gap: 10px;
    width: 100%;
    padding: 30px 0 10px 5px; /* 위쪽 여백을 줘서 그룹간 구분 확실히 */
    margin-bottom: 5px;
    border-bottom: 2px solid #333; /* 굵은 라인으로 메인 테마 강조 */
    text-align: left;
}

.group-header .type-title {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 1px;
}

.group-header .type-count {
    font-size: 0.9rem;
    color: #999;
    font-weight: normal;
}

/* 첫 번째 헤더의 상단 여백은 제거 */
.group-header:first-child {
    padding-top: 10px;
}
/* 사용 중 뱃지 스타일 */
.switch-card { position: relative; } /* 부모 기준점 설정 */

/* 리스트 및 뷰 공통 체크 뱃지 */
.used-badge, .view-used-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 1.5px solid #6e5773;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
}
/* 아이콘 버튼: 배경 없이 미니멀하게 수정 */
.bo_v_com {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: 20px 0;
}

.icon-btn {
    width: auto;
    height: auto;
    padding: 5px;
    background: transparent !important;
    color: #bbb; /* 기본 상태: 연한 회색 */
    transition: color 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.icon-btn .material-icons {
    font-size: 20px;
}

/* 모든 아이콘 공통 호버 효과 */
.icon-btn:hover {
    color: #000 !important;
}

/* 저장 버튼: 다른 아이콘들과 완벽히 동일하게 설정 */
.btn_reorder_save {
    display: none; 
    background: transparent !important; /* 배경 완전 제거 */
    border: none !important;            /* 테두리 제거 */
    box-shadow: none !important;        /* 그림자 제거 */
    padding: 5px !important;            /* 다른 아이콘과 간격 통일 */
    color: #bbb !important;             /* 기본 회색 */
    cursor: pointer;
}

/* 저장 버튼 호버 시 */
.btn_reorder_save:hover {
    color: #000 !important;             /* 호버 시 검정색 */
    background: transparent !important; /* 호버 시에도 배경 생기지 않음 */
}

/* 드래그 모드일 때의 스타일 */
.reorder-mode .switch-card { cursor: move; outline: 2px dashed #6e5773; outline-offset: 4px; }
.reorder-mode .switch-card:hover { transform: scale(1.02); }
.sortable-ghost { opacity: 0.3; }

/* 이 부분을 수정: 배경색과 글자색 강제 설정을 해제하고 투명하게 만듭니다 */
.btn_reorder_save { 
    display: none; 
    background: transparent !important; 
    color: #bbb !important; 
    border: none !important; 
    box-shadow: none !important; 
}
.btn_reorder_save:hover { 
    color: #000 !important; 
}