:root {
    --notification-opacity: 0.6;
    --message-time-opacity: 0.8;
}

/* 채팅 컨테이너 */
.chat-container {
    background: white;
    border-radius: clamp(0.5rem, 1vw, 1rem);
    padding: clamp(0.75rem, 1vw, 1rem);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05),
                0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 480px);
    min-height: 200px;
    max-height: 400px;
    transition: box-shadow 0.3s ease;
    margin: 0;
    position: relative;
    z-index: 1;
}

.chat-container:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* 채팅 메시지 영역 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    position: relative;
    margin: 5px 0;
}

.chat-message.sent {
    align-self: flex-end;
}

.chat-message.received {
    align-self: flex-start;
}

.message-time {
    display: none;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 1.5rem;
    font-size: 1.3rem;
    line-height: 1.8rem;
    position: relative;
    word-break: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sent .message-content {
    background-color: #e3f2fd;
    color: #1e293b;
    border-top-right-radius: 0.5rem;
    margin-right: 1rem;
}

.sent .message-content::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-left: 8px solid #e3f2fd;
    border-right: 8px solid transparent;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.received .message-content {
    background-color: #3b82f6;
    color: white;
    border-top-left-radius: 0.5rem;
    margin-left: 1rem;
}

.received .message-content::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 0;
    height: 0;
    border-right: 8px solid #3b82f6;
    border-left: 8px solid transparent;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* 채팅 입력 영역 */
.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #3b82f6;
}

.send-button {
    padding: 0.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.send-button:hover {
    background-color: #2563eb;
}

/* 채팅 메시지 스타일 */
.message {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.user {
    background-color: #3b82f6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
}

.message.assistant {
    background-color: #f1f5f9;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}

/* 채팅 상태 아이콘 */
.chat-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ef4444;
}

.chat-status.connected {
    background-color: #22c55e;
}

.chat-status.disconnected {
    background-color: #ef4444;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 400px);
        min-height: 180px;
        max-height: 360px;
    }
}

@media (max-width: 576px) {
    .chat-container {
        height: calc(100vh - 360px);
        min-height: 160px;
        max-height: 320px;
    }
}

/* 채팅 알림 팝업 */
.chat-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(59, 130, 246, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 48px 64px;
    width: 90%;
    max-width: 1200px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.notification-message {
    font-size: 48px;
    color: white;
    line-height: 1.4;
    word-break: break-word;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .chat-notification {
        width: 95%;
        padding: 36px 48px;
    }
    
    .notification-message {
        font-size: 36px;
    }
}

@media (max-width: 576px) {
    .chat-notification {
        width: 98%;
        padding: 24px 32px;
    }
    
    .notification-message {
        font-size: 28px;
    }
}

/* 채팅 헤더 */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.chat-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
}

.chat-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ef4444;
}

.chat-status.connected {
    background-color: #22c55e;
}

.chat-status.disconnected {
    background-color: #ef4444;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
} 