/* ── K-Tell2 라이브 채팅방 위젯 v24.5.2 ── */

/* ── 위젯 박스 — 테마 변수 준수 ── */
.chat-rooms-widget {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--layout-white);
    border: 1px solid var(--board-gray-300);
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}


/* ── 헤더 — 컬러풀 그라디언트 ── */
.crw-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 11px 14px 10px;
    background: linear-gradient(100deg, var(--color-prime, #7c3aed) 0%, #4f46e5 60%, #0ea5e9 100%);
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.crw-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .4px;
    text-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.crw-title i {
    font-size: 17px;
    color: #fff !important;  /* 화이트모드에서도 흰색 */
}

/* 타이틀 전체 숨쉬기 (1.5초) */
.crw-title {
    animation: crw-breathe 1.5s ease-in-out infinite;
}

@keyframes crw-breathe {
    0%, 100% { opacity: 1; }
    50%       { opacity: .45; }
}

/* 라이브 도트 */
.crw-live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74,222,128,.3);
    animation: crw-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes crw-pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(74,222,128,.3); }
    50%      { box-shadow: 0 0 0 6px rgba(74,222,128,.0); }
}

/* 입장 버튼 */
.crw-enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.35);
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: .2px;
}
.crw-enter-btn:hover  { background: rgba(255,255,255,.32); transform: translateY(-1px); }
.crw-enter-btn:active { transform: scale(.95); }

/* ── 캐러셀 영역 ── */
.crw-body {
    position: relative;
    z-index: 1;
    padding: 12px 14px 14px;
}

.crw-viewport {
    overflow: hidden;
    position: relative;
}

.crw-track {
    display: flex;
    gap: 10px;
    transition: transform .42s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ── 카드 ── */
.crw-card {
    flex-shrink: 0;
    border-radius: 11px;
    overflow: hidden;
    border: 1.5px solid var(--board-gray-300);
    background: var(--layout-white);
    cursor: pointer;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.crw-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-prime, #7c3aed);
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.crw-card:active { transform: scale(.96); }

/* 커버 */
.crw-cover {
    height: 88px;
    position: relative;
    overflow: hidden;
}

.crw-cover.cat-game    { background: linear-gradient(135deg, #3b0d8e, #7c3aed 50%, #4f46e5); }
.crw-cover.cat-study   { background: linear-gradient(135deg, #065f46, #059669 50%, #0d9488); }
.crw-cover.cat-social  { background: linear-gradient(135deg, #9d174d, #ec4899 50%, #f97316); }
.crw-cover.cat-economy { background: linear-gradient(135deg, #1e3a8a, #2563eb 50%, #0ea5e9); }
.crw-cover.cat-music   { background: linear-gradient(135deg, #6b21a8, #a855f7 50%, #ec4899); }
.crw-cover.cat-movie   { background: linear-gradient(135deg, #1e1b4b, #3730a3 50%, #1d4ed8); }
.crw-cover.cat-consult { background: linear-gradient(135deg, #78350f, #d97706 50%, #f59e0b); }
.crw-cover.cat-default { background: linear-gradient(135deg, #1f2937, #374151 50%, #4b5563); }

.crw-cover-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .25; transition: opacity .25s;
}
.crw-card:hover .crw-cover-bg { opacity: .42; }

.crw-ambiance {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; pointer-events: none;
    opacity: .65;
}

.crw-cover-grad {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,.6) 100%);
}

.crw-cat-badge {
    position: absolute; top: 6px; left: 7px;
    padding: 1px 6px; border-radius: 8px;
    background: rgba(0,0,0,.48);
    color: rgba(255,255,255,.93);
    font-size: 9px; font-weight: 700;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.12);
}

.crw-temp {
    position: absolute; bottom: 5px; left: 7px;
    font-size: 10px; color: rgba(255,255,255,.9);
    font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.crw-members {
    position: absolute; bottom: 5px; right: 7px;
    font-size: 10px; color: rgba(255,255,255,.9);
    font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5);
    display: flex; align-items: center; gap: 2px;
}

/* 카드 하단 */
.crw-info {
    padding: 7px 8px 8px;
    background: var(--layout-white);
    border-top: 1px solid var(--board-gray-300);
}

.crw-room-name {
    font-size: 11px; font-weight: 700;
    color: var(--layout-gray-800, #1e1e2e);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.35;
}

.crw-room-desc {
    font-size: 10px; color: var(--layout-gray-500, #9ca3af);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px; line-height: 1.3;
}

/* 인디케이터 도트 */
.crw-dots {
    display: flex; justify-content: center; gap: 5px;
    margin-top: 10px;
}

.crw-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--board-gray-300);
    transition: background .2s, width .25s;
    cursor: pointer;
}
.crw-dot.active {
    background: var(--color-prime, #7c3aed);
    width: 16px; border-radius: 3px;
}

/* 빈 상태 */
.crw-empty {
    padding: 24px; text-align: center;
    color: var(--layout-gray-500); font-size: 13px;
    position: relative; z-index: 1;
}
.crw-empty i { display: block; font-size: 30px; margin-bottom: 6px; }

/* 기본 카드 너비 (JS가 재계산) */
.crw-card { width: 140px; }
