/*
   Wafy — Tailwind Custom CSS Extensions
*/

/* Hide/Show logic for SPA pages */
.page-view {
    display: none;
    animation: fadeIn 0.25s ease-out forwards;
}

.page-view.active {
    display: block;
}

.page-view.active.flex-layout {
    display: flex !important;
    flex-direction: column;
}

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

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Premium Hover Transitions */
.hover-premium {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 450px;
    background: white;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dark .toast {
    background: #1e293b;
    border-left-color: #3b82f6;
    color: #f1f5f9;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }

.toast-icon {
    font-size: 1.25rem;
}
.toast-success .toast-icon { color: #10b981; }
.toast-error .toast-icon { color: #ef4444; }
.toast-warning .toast-icon { color: #f59e0b; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-slide-up {
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sidebar scrollbar minimal styling */
#sidebar nav::-webkit-scrollbar {
    width: 4px;
}
#sidebar nav::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 4px;
}
#sidebar nav:hover::-webkit-scrollbar-thumb {
    background-color: #334155;
}

/* Custom Table hover (so rows inserted via JS still hover correctly without needing long tails of classes) */
table tbody tr {
    transition: background-color 0.15s ease;
    cursor: pointer;
}
table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Custom Scrollbar for Chat */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* Column Mapping Selects */
.mapping-select {
    appearance: none;
    background: transparent;
    border: 1px solid rgba(0, 180, 98, 0.3);
    padding: 2px 20px 2px 8px;
    font-size: 10px;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300b462'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 12px;
}
.mapping-select:hover {
    border-color: #00b462;
    background-color: rgba(0, 180, 98, 0.05);
}
.dark .mapping-select {
    background-color: #0c1a1f;
}

/* Global Modern Dropdown Select styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300b462'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 36px !important;
    transition: all 0.2s ease-in-out;
}

select:focus {
    border-color: #00b462 !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 98, 0.15) !important;
}

/* Styling dropdown options */
select option {
    background-color: #ffffff;
    color: #14532d;
    padding: 10px;
}

.dark select option {
    background-color: #12252c;
    color: #dcfce7;
}
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: white !important;
}
.modal-backdrop {
    transition: opacity 0.3s ease;
}

#spin-list-container::-webkit-scrollbar {
    width: 4px;
}
#spin-list-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
.dark #spin-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

.outbox-filter-btn {
    color: #64748b;
}
.outbox-filter-btn.active {
    background-color: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.dark .outbox-filter-btn.active {
    background-color: #1e293b;
    color: #60a5fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#btn-outbox-bulk-delete {
    animation: bounce-in 0.3s ease-out;
}

@keyframes bounce-in {
    0% { transform: scale(0.8); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Active Nav Item Highlighting */
.nav-item.active {
    background-color: rgba(0, 180, 98, 0.08);
    color: #00b462 !important;
    font-weight: 600;
    border-left: 3px solid #00b462;
    padding-left: 9px;
}
.dark .nav-item.active {
    background-color: rgba(74, 222, 128, 0.08);
    color: #4ade80 !important;
    border-left-color: #4ade80;
}
.nav-item.active i {
    color: #00b462 !important;
}
.dark .nav-item.active i {
    color: #4ade80 !important;
}

/* Compact Campaign Monitor Item Row */
.monitor-item-row {
    padding: 4px 16px;
    font-size: 11px;
    border-top: 1px solid rgba(0,0,0,0.04);
}
.dark .monitor-item-row {
    border-top-color: rgba(255,255,255,0.04);
}

/* Sending row pulse animation */
@keyframes sending-pulse {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(59, 130, 246, 0.06); }
}
.monitor-item-sending {
    animation: sending-pulse 2s ease-in-out infinite;
}
.dark .monitor-item-sending {
    animation: sending-pulse-dark 2s ease-in-out infinite;
}
@keyframes sending-pulse-dark {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(96, 165, 250, 0.08); }
}

/* Mobile Sidebar Logic */
#sidebar.open {
    transform: translateX(0);
}

#sidebar-overlay.open {
    display: block !important;
}

.active-chat-item {
  background-color: rgba(14, 165, 233, 0.1) !important;
  border-left: 4px solid #0ea5e9 !important;
}
.dark .active-chat-item {
  background-color: rgba(14, 165, 233, 0.2) !important;
}

/* Fix SweetAlert2 title text overlapping on multiline wrapping */
.swal2-title {
    line-height: 1.35 !important;
}

/* Quoted Message Styles */
.quoted-message-box {
    border-left: 4px solid #056162;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #4b5563;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dark .quoted-message-box {
    border-left-color: #00a884;
    background-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

/* Reply Preview Bar above Textarea */
#reply-preview-container {
    display: none;
    border-left: 4px solid #00a884;
    background-color: #f0f2f5;
    border-radius: 8px;
    padding: 6px 12px;
    margin-bottom: 6px;
    position: relative;
    animation: slideUp 0.2s ease-out;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
.dark #reply-preview-container {
    background-color: #1f2c34;
}

/* Reaction Badge */
.reaction-pill {
    position: absolute;
    bottom: -10px;
    right: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease;
}
.reaction-pill:hover {
    transform: scale(1.15);
}
.dark .reaction-pill {
    background: #202c33;
    border-color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Message Hover Menu Trigger */
.message-bubble-container {
    position: relative;
}
.message-menu-trigger {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 20;
}
.dark .message-menu-trigger {
    background: rgba(32, 44, 51, 0.9);
    color: #cbd5e1;
}
.message-bubble-container:hover .message-menu-trigger {
    opacity: 1;
}

/* Floating Emoji Picker */
#chat-emoji-picker {
    position: absolute;
    bottom: 60px;
    left: 12px;
    width: 340px;
    height: 360px;
    z-index: 70;
    display: none;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}
#chat-emoji-picker:not(.hidden) {
    display: block;
}

emoji-picker {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --background: #ffffff;
    --border-color: #e2e8f0;
    --border-width: 1px;
    --outline-color: #00a884;
}

.dark emoji-picker {
    --background: #202c33;
    --border-color: #2f3e46;
    --outline-color: #00a884;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Floating Quick Reactions */
.quick-reaction-bar {
    display: none;
    position: absolute;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    padding: 4px 8px;
    z-index: 80;
    gap: 8px;
    animation: popScale 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dark .quick-reaction-bar {
    background: #202c33;
    border-color: #2f3e46;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.quick-reaction-emoji {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.quick-reaction-emoji:hover {
    transform: scale(1.3);
}

@keyframes popScale {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Custom dropdown for message actions */
.msg-context-menu {
    position: absolute;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
    width: 120px;
    z-index: 100;
    display: none;
    animation: fadeIn 0.15s ease-out;
}
.dark .msg-context-menu {
    background: #202c33;
    border-color: #2f3e46;
}
.msg-context-menu-item {
    padding: 6px 12px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}
.dark .msg-context-menu-item {
    color: #e5e7eb;
}
.msg-context-menu-item:hover {
    background: #f3f4f6;
}
.dark .msg-context-menu-item:hover {
    background: #2a3942;
}

@media (max-width: 640px) {
    .quick-reaction-bar {
        max-width: 90vw !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 6px !important;
        border-radius: 16px !important;
    }
    .quick-reaction-emoji {
        font-size: 16px !important;
    }
}

/* ─── Chat Thread: prevent long messages from stretching layout ─── */
#chat-messages {
    overflow-x: hidden !important;
    max-width: 100%;
}

/* Ensure all message bubble text wraps — word-break only, NO white-space on containers */
.message-bubble-container {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Only apply pre-wrap to actual text elements, NOT div wrappers */
.message-bubble-container p,
.message-bubble-container span {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Quoted message text wraps properly (override the nowrap on box) */
.quoted-message-box {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Collapsible CRM Info Bar transition rules */
.info-bar-transition {
    transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease-out, padding 0.2s ease-out, border-width 0.2s ease-out;
    max-height: 250px; /* Safe maximum height for stacked rows with inputs */
    opacity: 1;
    overflow: visible;
}

.info-bar-transition.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom-width: 0 !important;
    overflow: hidden !important;
}

/* WhatsApp Web Style Wallpaper & Doodle Pattern */
#chat-messages {
    background-color: #efeae2 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%238c829c' fill-opacity='0.04'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z'/%3E%3C/g%3E%3C/svg%3E") !important;
    background-repeat: repeat !important;
}

.dark #chat-messages {
    background-color: #0b141a !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z'/%3E%3C/g%3E%3C/svg%3E") !important;
}

/* WhatsApp message bubble overrides for absolute resemblance */
.whatsapp-bubble {
    box-shadow: 0 1.2px 0.6px rgba(11, 20, 26, 0.13) !important;
    border: none !important;
}

/* Quick Reply Autocomplete Item Styles */
.autocomplete-item {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background-color 0.15s ease;
}
.dark .autocomplete-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover, .autocomplete-item.active {
    background-color: #f3f4f6;
}
.dark .autocomplete-item:hover, .dark .autocomplete-item.active {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Drag and Drop File Upload Overlay */
#chat-drag-drop-overlay {
    background: rgba(239, 234, 226, 0.95);
    border: 3px dashed #00a884;
}
.dark #chat-drag-drop-overlay {
    background: rgba(11, 20, 26, 0.95);
    border-color: #005c4b;
}

/* Hover Smiley Reaction Trigger Button */
.reaction-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.dark .reaction-trigger-btn {
    background: #202c33;
    border-color: #2f3b43;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.reaction-trigger-btn:hover {
    transform: scale(1.15);
}

/* Chat Message Search Highlights & Pulse animation */
.search-match-active {
    transition: all 0.3s ease-in-out;
    animation: pulse-search-highlight 2s infinite ease-in-out;
}

@keyframes pulse-search-highlight {
    0%, 100% {
        box-shadow: 0 0 0 0px rgba(59, 130, 246, 0.7);
        background-color: rgba(59, 130, 246, 0.08);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4);
        background-color: rgba(59, 130, 246, 0.15);
    }
}

/* Sidebar Collapse Transition & Styles (Desktop only) */
@media (min-width: 768px) {
    #sidebar {
        transition: transform 0.2s ease-in-out, width 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out !important;
    }
    main {
        transition: margin-left 0.2s ease-in-out !important;
    }
    
    /* Collapsed Sidebar State */
    #sidebar.collapsed {
        width: 72px !important;
    }
    main.sidebar-collapsed {
        margin-left: 72px !important;
    }
    
    /* Hide Text and Chevron Arrows when Collapsed */
    #sidebar.collapsed #sidebar-instance-name,
    #sidebar.collapsed #sidebar-hello,
    #sidebar.collapsed #sidebar-sales-link,
    #sidebar.collapsed #sidebar-footer-content,
    #sidebar.collapsed #sign-out-btn-span,
    #sidebar.collapsed #logout-others-btn span,
    #sidebar.collapsed nav a span,
    #sidebar.collapsed nav button span,
    #sidebar.collapsed nav button i.fa-chevron-down,
    #sidebar.collapsed nav button i.fa-chevron-up {
        display: none !important;
    }

    /* Styled Submenus when Collapsed */
    #sidebar.collapsed #utility-menu,
    #sidebar.collapsed #config-menu {
        display: block !important; /* Keep container visible if not class hidden */
        padding-left: 0 !important;
    }
    
    #sidebar.collapsed #utility-menu.hidden,
    #sidebar.collapsed #config-menu.hidden {
        display: none !important; /* Honor the hidden class toggle */
    }
    
    #sidebar.collapsed #utility-menu a,
    #sidebar.collapsed #config-menu a {
        justify-content: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        gap: 0 !important;
        margin-top: 0.25rem;
    }
    
    #sidebar.collapsed #utility-menu a span,
    #sidebar.collapsed #config-menu a span {
        display: none !important;
    }
    
    #sidebar.collapsed #utility-menu a i,
    #sidebar.collapsed #config-menu a i {
        width: 100% !important;
        font-size: 0.95rem !important; /* Slightly smaller sub-icons */
        margin: 0 !important;
        opacity: 0.6;
        transition: opacity 0.2s ease, color 0.2s ease;
    }
    
    #sidebar.collapsed #utility-menu a:hover i,
    #sidebar.collapsed #config-menu a:hover i,
    #sidebar.collapsed #utility-menu a.active i,
    #sidebar.collapsed #config-menu a.active i {
        opacity: 1;
        color: #00b462; /* Highlight sub-icons in green when active/hovered */
    }
    
    /* Header layout adjustments when collapsed */
    #sidebar.collapsed .p-5 {
        padding: 1.25rem 0.5rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #sidebar.collapsed .p-5 > div {
        justify-content: center !important;
    }
    #sidebar.collapsed #theme-toggle-desktop {
        display: none !important;
    }
    
    /* Adjust padding of nav area when collapsed */
    #sidebar.collapsed nav {
        padding: 0.5rem 0.375rem !important;
    }
    
    /* Navigation item alignment when collapsed */
    #sidebar.collapsed nav a,
    #sidebar.collapsed nav button {
        justify-content: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        gap: 0 !important;
    }
    
    #sidebar.collapsed nav a i,
    #sidebar.collapsed nav button i {
        width: 100% !important;
        font-size: 1.15rem !important;
        margin: 0 !important;
    }
    
    /* Sign out & Logout others button styling when collapsed */
    #sidebar.collapsed #sign-out-btn,
    #sidebar.collapsed #logout-others-btn {
        padding-left: 0 !important;
        padding-right: 0 !important;
        border-color: transparent !important;
        background-color: transparent !important;
    }
    #sidebar.collapsed #sign-out-btn:hover {
        background-color: rgba(239, 68, 68, 0.1) !important;
    }
    #sidebar.collapsed #logout-others-btn:hover {
        background-color: rgba(245, 158, 11, 0.1) !important;
    }
    
    /* Rotate transition on collapse button */
    #sidebar-collapse-btn i {
        transition: transform 0.2s ease-in-out;
    }
    #sidebar.collapsed #sidebar-collapse-btn i {
        transform: rotate(180deg);
    }
}

