/* Drag and Drop Styles */
.node-card.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
    transform: scale(0.95);
}

.node-card.drop-zone-active {
    border: 2px dashed #3b82f6 !important;
    background-color: #eff6ff;
    transform: scale(1.02);
}

.drag-handle {
    transition: all 0.2s;
}

/* Toast Notifications */
.toast {
    position: fixed;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideInRight 0.3s ease-out;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    margin-bottom: 0.5rem;
}

.toast-success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.toast-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.toast-info {
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.toast-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* WhatsApp-style Message Bubbles */
.whatsapp-message {
    display: flex;
    margin-bottom: 8px;
    animation: messageIn 0.2s ease-out;
}

.whatsapp-message.user {
    justify-content: flex-end;
}

.whatsapp-message.bot {
    justify-content: flex-start;
}

.whatsapp-bubble {
    position: relative;
    max-width: 75%;
    padding: 6px 8px 8px 8px;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.whatsapp-message.user .whatsapp-bubble {
    background-color: #d9fdd3;
    color: #000;
}

.whatsapp-message.bot .whatsapp-bubble {
    background-color: #ffffff;
    color: #000;
}

/* Хвостики пузырей */
.whatsapp-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

.whatsapp-message.user .whatsapp-bubble::before {
    right: -8px;
    border-width: 0 0 10px 8px;
    border-color: transparent transparent transparent #d9fdd3;
}

.whatsapp-message.bot .whatsapp-bubble::before {
    left: -8px;
    border-width: 0 8px 10px 0;
    border-color: transparent #ffffff transparent transparent;
}

/* Содержимое сообщения */
.whatsapp-text {
    font-size: 14px;
    line-height: 19px;
    margin-bottom: 2px;
}

/* Метаданные (время + галочки) */
.whatsapp-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 2px;
}

/* Галочки прочтения */
.whatsapp-checkmarks {
    display: inline-flex;
    align-items: center;
}

.whatsapp-checkmarks svg {
    width: 16px;
    height: 16px;
    fill: #53bdeb;
}
/* Resizer Handle for Sidebars */
.sidebar-resizer {
    position: absolute;
    left: 0; /* Attach to the left edge of the sidebar */
    top: 50%;
    transform: translate(-50%, -50%); /* Center the handle on the border */
    width: 16px; /* Grabbing area */
    height: 50px;
    cursor: col-resize;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* This creates the visual tab/handle */
.sidebar-resizer::before {
    content: '';
    position: absolute;
    width: 8px; /* The visible width of the handle */
    height: 100%;
    left: 0; /* Positioned at the left of the grabbing area */
    top: 0;
    background-color: #fff;
    border: 1px solid #e2e8f0; /* slate-200 */
    border-right: none; /* The side that touches the sidebar has no border */
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

/* This creates the three dots */
.sidebar-resizer::after {
    content: '...';
    writing-mode: vertical-lr; /* Vertical text */
    text-orientation: mixed;
    position: absolute;
    left: 2px; /* Center inside the ::before element */
    color: #94a3b8; /* slate-400 */
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

/* Hover state */
.sidebar-resizer:hover::before {
    background-color: #f8fafc; /* slate-50 */
    border-color: #94a3b8; /* slate-400 */
}

.sidebar-resizer:hover::after {
    color: #3b82f6; /* blue-500 */
}

/* Hide resizer when sidebar is collapsed */
.drawer-base.translate-x-full .sidebar-resizer {
    display: none;
}
