@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --wa-green: #25D366;
    --wa-dark-green: #128C7E;
    --wa-teal: #075E54;
    --wa-chat-bg: #0b141a;
    --wa-bubble-in: #202c33;
    --wa-bubble-out: #005c4b;
    --ai-purple: #8b5cf6;
    --ai-purple-light: rgba(139, 92, 246, 0.15);
}

html[dir="rtl"] * {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html[dir="ltr"] * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: #0f172a;
    color: #f1f5f9;
    overflow-x: hidden;
}

/* Force desktop sidebar to stay statically visible and untransformed */
@media (min-width: 1024px) {
    #mainSidebar {
        transform: none !important;
        position: static !important;
        display: flex !important;
        visibility: visible !important;
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}
.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* Operator Collision Pulse Animation */
@keyframes collisionPulse {
    0% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.98); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.collision-banner {
    animation: collisionPulse 2s infinite ease-in-out;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Live Typing Dots */
.typing-dot {
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Drawflow Visual Canvas Theming */
.drawflow {
    background-color: #0b141a !important;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
    border-radius: 12px;
}

.drawflow .drawflow-node {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 10px !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
    min-width: 170px !important;
}
.drawflow .drawflow-node.selected {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4) !important;
}
.drawflow .drawflow-node .drawflow_content_node {
    padding: 10px 12px !important;
}
.drawflow .connection .main-path {
    stroke: #25D366 !important;
    stroke-width: 3px !important;
}

/* Chat bubble styling */
.chat-canvas-bg {
    background-color: #0b141a;
    background-image: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.3) 0%, rgba(11, 20, 26, 0.9) 100%);
}

.bubble-in {
    background-color: #202c33;
    color: #e9edef;
    border-top-right-radius: 2px;
}

.bubble-out {
    background-color: #005c4b;
    color: #e9edef;
    border-top-left-radius: 2px;
}

.bubble-note {
    background-color: #78350f;
    color: #fef3c7;
    border: 1px dashed #f59e0b;
}

.ai-digest-box {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(79, 70, 229, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.35);
}

/* 24-Hour Gantt Timeline Styles */
.gantt-cell-online {
    background-color: #25D366;
    box-shadow: 0 0 6px rgba(37, 211, 102, 0.6);
}
.gantt-cell-offline {
    background-color: rgba(51, 65, 85, 0.4);
}

.timeline-24h-track {
    background: linear-gradient(90deg, #090e15 0%, #0d1520 50%, #090e15 100%);
    position: relative;
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
    border-radius: 0.75rem;
    overflow: visible;
}

.timeline-24h-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(51, 65, 85, 0.35);
    pointer-events: none;
}

.timeline-24h-segment {
    position: absolute;
    top: 3px;
    bottom: 3px;
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 4px;
    z-index: 10;
}

.timeline-24h-segment:hover {
    filter: brightness(1.25);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.9);
    z-index: 25;
    transform: scaleY(1.15);
}

.timeline-24h-ongoing {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
    animation: ongoingPulse 2s infinite;
}

@@keyframes ongoingPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 18px rgba(74, 222, 128, 0.95);
    }
}

.timeline-now-line {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: linear-gradient(180deg, #f43f5e 0%, #fb7185 100%);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
    z-index: 20;
    pointer-events: none;
}

.timeline-now-badge {
    position: absolute;
    top: -18px;
    transform: translateX(-50%);
    background: #f43f5e;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 21;
}
