/* =====================================================
 * 1:1 전략상담신청 모달 스타일
 * ===================================================== */

/* 오버레이 */
#ms-consult-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999990;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
#ms-consult-overlay.open {
    display: flex;
}

/* 모달 래퍼 */
#ms-consult-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* 헤더 */
.ms-consult-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.ms-consult-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}
.ms-consult-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}
.ms-consult-close-btn:hover { color: #333; }

/* 스크롤 본문 */
.ms-consult-body {
    overflow-y: auto;
    padding: 0 24px 24px;
    flex: 1;
}

/* 스텝 헤더 */
.ms-consult-step {
    margin-top: 20px;
    margin-bottom: 10px;
}
.ms-consult-step h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

/* 시간표 그리드 */
.ms-consult-grid-wrap {
    position: relative;
    overflow: hidden;
}
.ms-consult-grid-scroll {
    overflow-y: auto;
    max-height: 240px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.ms-consult-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 400px;
}
.ms-consult-grid th {
    background: #f8f9fa;
    padding: 8px 6px;
    text-align: center;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 2;
}
.ms-consult-grid td {
    padding: 4px 4px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.ms-consult-grid td.time-label {
    color: #666;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: #fafafa;
    border-right: 1px solid #eee;
    padding: 6px 8px;
}
.ms-consult-grid tr:last-child td {
    border-bottom: none;
}

/* 셀 버튼 */
.ms-slot-cell {
    width: 100%;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s;
    color: transparent;
}
.ms-slot-cell:hover {
    background: #e8f4fd;
    border-color: #b3d9f5;
    color: #5ba4cf;
}
.ms-slot-cell.selected-1 {
    background: #ef4444;
    border-color: #dc2626;
    color: #fff;
}
.ms-slot-cell.selected-2 {
    background: #3b82f6;
    border-color: #2563eb;
    color: #fff;
}
.ms-slot-cell.selected-3 {
    background: #22c55e;
    border-color: #16a34a;
    color: #fff;
}

/* 선택된 시간 카운트 */
.ms-consult-slot-count {
    text-align: right;
    margin-top: 6px;
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
}
.ms-consult-slot-count.full {
    color: #22c55e;
}

/* 정보 입력 폼 */
.ms-consult-field {
    margin-bottom: 12px;
}
.ms-consult-field input,
.ms-consult-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.ms-consult-field input:focus,
.ms-consult-field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.ms-consult-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* 개인정보 동의 */
.ms-consult-privacy {
    margin: 14px 0 8px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}
.ms-consult-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    font-size: 13px;
    margin-bottom: 8px;
}
.ms-consult-privacy input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 2px;
    cursor: pointer;
}
.ms-consult-privacy ul {
    margin: 0;
    padding: 0 0 0 14px;
    list-style: disc;
}
.ms-consult-privacy ul li {
    margin-bottom: 2px;
}

/* 에러/알림 메시지 */
.ms-consult-msg {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}
.ms-consult-msg.error {
    display: block;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.ms-consult-msg.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* 하단 제출 버튼 영역 */
.ms-consult-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}
.ms-consult-submit-btn {
    width: 100%;
    padding: 14px;
    background: #94a3b8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: not-allowed;
    transition: background 0.2s;
    letter-spacing: -0.3px;
}
.ms-consult-submit-btn.ready {
    background: #2563eb;
    cursor: pointer;
}
.ms-consult-submit-btn.ready:hover {
    background: #1d4ed8;
}
.ms-consult-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 완료 화면 */
.ms-consult-success-screen {
    display: none;
    text-align: center;
    padding: 40px 24px;
}
.ms-consult-success-screen.show { display: block; }
.ms-consult-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}
.ms-consult-success-screen h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
}
.ms-consult-success-screen p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 반응형 */
@media (max-width: 480px) {
    .ms-consult-header { padding: 16px 18px 12px; }
    .ms-consult-body  { padding: 0 18px 20px; }
    .ms-consult-footer { padding: 14px 18px; }
    .ms-consult-grid  { min-width: 320px; }
    .ms-slot-cell     { height: 30px; font-size: 10px; }
}
