:root {
    --brand-blue: #2563eb;
    --brand-green: #16a34a;
    --brand-red: #dc2626;
    --chat-customer-bg: #f1f1f1;
    --chat-agent-bg: #e1f5fe;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
}

/* Custom Scrollbars */
#chat_window::-webkit-scrollbar,
#script_panel::-webkit-scrollbar {
    width: 6px;
}

#chat_window::-webkit-scrollbar-track,
#script_panel::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#chat_window::-webkit-scrollbar-thumb,
#script_panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#chat_window::-webkit-scrollbar-thumb:hover,
#script_panel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* Chat Message Styling */
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    max-width: 80%;
    margin-top: 1rem;
}

.chat-message.customer {
    align-self: flex-start;
}

.chat-message.agent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    line-height: 1.6;
    word-wrap: break-word;
    color: var(--text-primary);
    text-align: left;
}

.chat-message.customer .message-bubble {
    background-color: var(--chat-customer-bg);
    border-bottom-left-radius: 0.25rem;
}

.chat-message.agent .message-bubble {
    background-color: var(--chat-agent-bg);
    border-bottom-right-radius: 0.25rem;
}

/* Control Buttons */
.control-button {
    padding: 0.5rem 1rem;
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Notification Panel */
#notification_panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    pointer-events: none;
}

#notification_panel.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#notification_box {
    transition: background-color 0.3s ease;
}

/* Script Items */
.script-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.script-item:not(.comfort):hover {
    border-color: var(--brand-blue);
    background-color: #eff6ff;
}

.script-item .text {
    flex-grow: 1;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.script-item .actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 0.5rem;
}

.script-item:hover .actions {
    opacity: 1;
}

.script-item.comfort {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.icon-button {
    color: #64748b;
    padding: 0.25rem;
    border-radius: 9999px;
    background-color: transparent;
    transition: all 0.2s ease;
}

.icon-button:hover {
    color: var(--brand-blue);
    background-color: #e0e7ff;
}

.icon-button i {
    width: 1rem;
    height: 1rem;
}

#toast.show {
    opacity: 1;
}
