/* ==========================================================================
   chat-header.css - 대화방 상단 헤더, 모델 티어 버튼, 상태 인디케이터 (모바일 피팅)
   ========================================================================== */

/* 대화방 상단 헤더 */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px calc(8px + env(safe-area-inset-top, 0px)) 10px;
    background: #181a1f;
    border-bottom: 1px solid #272a31;
    flex-shrink: 0;
    z-index: 10;
    gap: 6px;
    min-height: 52px;
}

.chat-header .header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.back-btn {
    background: transparent;
    border: none;
    color: #f43f5e;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 4px 0 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.9);
}

.session-btn {
    font-size: 18px !important;
    width: 28px !important;
    height: 28px !important;
    margin-right: 2px;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
    transform: scale(1.18);
    display: block;
}

.header-title-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.header-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.header-title span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px #10b981;
    flex-shrink: 0;
}

/* 3.8 / 3.7 모델 세대 세그먼트 버튼 (스마트 블루 알약형) */
.model-version-group {
    display: flex;
    background: #0b1329;
    border: 1px solid #1e3a8a;
    border-radius: 5px;
    padding: 1px 2px;
    gap: 1px;
    margin-left: 2px;
    flex-shrink: 0;
}

.ver-btn {
    background: transparent;
    border: none;
    color: #60a5fa;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.1;
}

.ver-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

.ver-btn:active {
    transform: scale(0.92);
}

/* L / M / H 모델 선택 세그먼트 버튼 (초경량 알약형) */
.model-tier-group {
    display: flex;
    background: #101216;
    border: 1px solid #282e3c;
    border-radius: 5px;
    padding: 1px 2px;
    gap: 1px;
    margin-left: 2px;
    flex-shrink: 0;
}

.tier-btn {
    background: transparent;
    border: none;
    color: #7d8799;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.1;
}

.tier-btn.active {
    background: #f43f5e;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(244, 63, 94, 0.4);
}

.tier-btn:active {
    transform: scale(0.92);
}

.status-text {
    font-size: 0.65rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* 상단 액션 버튼 ([🌿 케어], [🔄 리셋]) */
.action-btn {
    background: #20242c;
    border: 1px solid #333845;
    color: #e5e7eb;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: all 0.15s ease;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.action-btn.reset-btn {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.4);
    color: #fda4af;
}

.action-btn.reset-btn:active {
    background: #f43f5e;
    color: #ffffff;
    transform: scale(0.94);
}

.icon-btn {
    background: #20242c;
    border: 1px solid #2d3340;
    color: #d1d5db;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.icon-btn:active {
    background: #f43f5e;
    color: #fff;
    transform: scale(0.95);
}
