/* ==========================
   GLOBAL – core.css 톤 기반
   ========================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 20px;
    background: var(--bg, #0b1220);
    color: var(--text, #e2e8f0);
}

/* ==========================
   DIAG 페이지 전용 헤더 폭 조절
   ========================== */
body.diag-page .gr-head .wrap {
    max-width: 720px;   /* diag 컨테이너와 동일 폭 */
    margin: 0 auto;
}

/* ==========================
   컨테이너
   ========================== */
#diag-container {
    max-width: 720px;
    margin: 0 auto;
    margin-top: 24px;
    padding: 16px 20px 40px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
    box-sizing: border-box;
}

#diag-container h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
}

/* ==========================
   채팅 영역
   ========================== */
#chat-area {
    height: 360px;
    overflow-y: auto;
    border: 1px solid var(--border, rgba(148, 163, 184, 0.4));
    border-radius: 8px;
    padding: 12px;
    background: #111827;
}

/* 메시지 공통 */
.msg {
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 6px;
    max-width: 100%;
    white-space: pre-line;
    word-break: break-word;
    font-size: 14px;
}

/* system 메시지 (좌측) */
.msg.system {
    background: #1a2333;
    color: var(--text);
    text-align: left;
}

/* user 메시지 (우측) */
.msg.user {
    background: #1f2a3c;
    color: var(--accent, #60a5fa);
    text-align: right;
}

/* ==========================
   입력 영역
   ========================== */
#input-area {
    margin-top: 12px;
}

#symptom_input {
    width: 100%;
    min-height: 60px;
    max-height: 100px;
    resize: vertical;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    color: inherit;
}

/* ==========================
   버튼 영역
   ========================== */
#start-btn-area {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

#start-btn-area button {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* 진단하기 */
#btn_start {
    background: #1971c2;
    color: #fff;
}
#btn_start:hover {
    background: #1864ab;
}

/* 새로고침 */
#btn_reset {
    background: #6c757d;
    color: #fff;
}
#btn_reset:hover {
    background: #565e64;
}

/* ==========================
   예 / 아니오 버튼
   ========================== */
#confirm_area {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

#confirm_area button {
    min-width: 60px;
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

#btn_yes {
    background: #22c55e;
    color: #0f172a;
}

#btn_no {
    background: #ef4444;
    color: #fff;
}

/* ==========================
   결과 카드
   ========================== */
#result-card {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 14px;
}

/* ==========================
   상담 카드
   ========================== */
.consult-card {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: 14px;
}

.consult-card .consult-desc {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.consult-card .muted {
    color: #9ca3af;
    font-size: 12px;
}

.consult-card .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.consult-card .label-required .req {
    color: #f97316;
    font-size: 12px;
}

.consult-card label {
    display: block;
    margin-top: 8px;
    margin-bottom: 4px;
    font-weight: 500;
}

.consult-card input[type="text"],
.consult-card input[type="tel"],
.consult-card textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
    color: inherit;
    box-sizing: border-box;
}

.consult-card button {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
}

/* 모바일 대응 */
@media (max-width: 640px) {
    #diag-container {
        padding: 12px 12px 24px;
    }

    #chat-area {
        height: 320px;
    }

    .msg {
        font-size: 13px;
    }

    #symptom_input {
        min-height: 50px;
    }

    #start-btn-area {
        flex-direction: column;
    }

    .consult-card {
        font-size: 13px;
        padding: 10px 12px;
    }

    .consult-card .row {
        grid-template-columns: 1fr;
    }
}

/* ===== 주소 입력 레이아웃 추가 ===== */
.addr-row {
    align-items: center;
    gap: 8px;
}

.addr-main-wrap {
    flex: 1;
}

.addr-main-wrap input {
    width: 100%;
}

.addr-search-btn {
    flex: 0 0 110px;
    text-align: center;
    font-weight: 600;
}

#consult_address_detail {
    width: 100%;
    box-sizing: border-box;
}


/* ==========================
   픽업 거리 지도 영역
   ========================== */
.diag-map-wrap {
    margin-top: 8px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.diag-map-box {
    width: 100%;
    height: 220px;
    border-radius: 4px;
    overflow: hidden;
}

.diag-distance-info {
    margin-top: 6px;
    font-size: 13px;
    color: #4b5563;
}

/* =====================================================
   [B방법] 지도 완전 제거 (CSS ONLY)
   ===================================================== */
#diag_kakao_map {
  display: none !important;
}

.diag-map-box {
  display: none !important;
}

.diag-map-wrap {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
