/* Custom styles for PoBot chatbot */

/* Chat container */
.chat-container {
    height: 70vh;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    background-color: #ffffff;
    scrollbar-width: thin;
}

/* Message bubbles - Updated to match session detail theme */
.message {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 15px;
    max-width: 85%;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
}

.message:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.user-message {
    background: white;
    color: #333;
    margin-left: auto;
    text-align: right;
    border-left: 5px solid #667eea;
    border-bottom-right-radius: 6px;
}

.user-message:hover {
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.15);
}

.user-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-left-color: white;
    border-bottom: 0;
    border-right: 0;
}

.bot-message {
    background: white;
    color: #333;
    border-left: 5px solid #17a2b8;
    margin-right: auto;
    border-bottom-left-radius: 6px;
}

.bot-message:hover {
    box-shadow: 0 12px 35px rgba(23, 162, 184, 0.15);
}

.bot-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: white;
    border-bottom: 0;
    border-left: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.user-message .message-icon {
    color: #667eea;
}

.bot-message .message-icon {
    color: #17a2b8;
}

.sender-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-message .sender-name {
    color: #667eea;
}

.bot-message .sender-name {
    color: #17a2b8;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.6;
    color: #666;
}

.message-content {
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Violation cards */
.violation-card {
    border-left: 4px solid #dc3545;
}

/* Session details */
.session-info {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container {
        height: 60vh;
    }
    
    .message {
        max-width: 90%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease-out;
}

/* Loading indicator - Updated to match session detail theme */
.typing-indicator {
    display: inline-block;
    padding: 1.5rem;
    background: white;
    color: #333;
    border-left: 5px solid #17a2b8;
    margin-right: auto;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    max-width: 85%;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 6px;
}

.typing-indicator::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: white;
    border-bottom: 0;
    border-left: 0;
}

.typing-indicator span {
    height: 10px;
    width: 10px;
    float: left;
    margin: 0 1px;
    background-color: #9E9EA1;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
}

.typing-indicator span:nth-of-type(1) {
    animation: 1s blink infinite 0.3333s;
}

.typing-indicator span:nth-of-type(2) {
    animation: 1s blink infinite 0.6666s;
}

.typing-indicator span:nth-of-type(3) {
    animation: 1s blink infinite 0.9999s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}