/* CSS Variables for Modern Professional Theme */
:root {
    --background-color: #fafbfc;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #374151;
    --sidebar-hover: #f3f4f6;
    --primary-color: #4f46e5; 
    --secondary-color: #ef4444;
    --button-bg: #e5e7eb;
    --button-hover: #4f46e5;
    --button-hover2: rgba(79, 70, 229, 0.1);
    --input-bg: #fff;
    --input-text: #374151;
    --chat-bg: #ffffff;
    --chat-user-bg: #f0f9ff;
    --chat-assistant-bg: rgba(248, 249, 250, 0.8);
    --text-color: #374151;
    --border-color: #e5e7eb;
    --spinner-color: #4f46e5;
    --loading-dot-color: #4f46e5;
    --card-shadow: rgba(0, 0, 0, 0.05);
    --transition-speed: 0.2s;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-title: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border-right: 1px solid var(--border-color);
    padding-top: 24px;
    padding-bottom: 24px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 6px;
    transition: all 0.15s ease;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 10px 16px;
    margin: 4px 0;
    width: 100%;
    font-size: 14px;
    color: var(--sidebar-text);
    text-align: left;
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: transparent;
    justify-content: flex-start;
    font-family: var(--font-body);
    border: none;
}

.menu-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--text-color);
    transform: none;
}

.menu-item.active {
    background-color: #f0f9ff;
    color: #1e40af;
}

.menu-item i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    display: inline-block;
}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 20px;
    background-color: #fafafa;
    max-width: 1800px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connections-list {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card - Legacy styles (overridden by modern styles below) */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 24px;
    flex: 1 1 100% !important;
    width: 100% !important;
    text-align: left;
    transition: all 0.2s ease;
    border: 1px solid #e1e6f0;
    position: relative;
}


/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 48px;
    margin: 0 auto 16px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: var(--font-title);
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    width: 100%;
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    color: var(--input-text);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Connect Button */
.connect-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
    transition: background-color 0.15s ease;
    font-family: var(--font-body);
}


/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* Info Box (fixed height) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 80px !important; /* Fixed height to avoid movement */
    /* make sure it doesnt extend where its in */
    max-width: 100% !important;
    /* center */
    margin-left: auto !important;
    margin-right: auto !important;
    /* make max width */
    max-width: 500px !important;
}

/* Button Container */
.button-container {
    margin-top: auto; /* Pushes buttons to bottom */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ensure all suggestion buttons align */
.suggestion-button {
    background-color: transparent;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: none;
    margin-top: 20px;
}

/* Ensure all connect buttons align */
.shopify-fetch-button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
}

/* Responsive - Ensure 2 in a row for tablets, 1 in mobile */
@media (max-width: 1024px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Connection Status Label (Positioned in top-right) */
.status-label {
    /* position: absolute; */
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
}


/* Not Connected State */
.status-label.not-connected {
    background-color: #d6d6d6e0;
    color: #555;
}

/* Connected State */
.status-label.connected {
    background-color: #4caf4fc4;
    color: #fff;
}

/* Checking Status */
.status-label.checking {
    background-color: #f0ac4ecb;
    color: #fff;
}

.icon-container {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: rgba(68, 171, 215, 0.2);
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}

.icon-container-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(68, 171, 215, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  width: 1.5em;
  height: 1.5em;
}



.icon-container-csv-imports {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: transparent;
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}


/* Adjust the actual icon inside */
.icon-blue {
    color: var(--button-hover) !important;
    font-size: 16px; /* Adjust icon size */
}

.icon-blue-csv-imports {
    color: var(--button-hover) !important;
    font-size: 20px; /* Adjust icon size */
    margin-bottom: 3px;
    margin-right: -3px;
}

.shopify-fetch-button {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    /* margin: 5px; */
    width: 175px !important;
    height: 44px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}

.shopify-fetch-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
.shopify-fetch-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }



.shopify-fetch-button:hover {
    background: var(--sidebar-bg2);
}

.shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}
.shopify-fetch-button2:hover {
    background: var(--sidebar-bg2);
}

#shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}


/* create-store-button */
.create-store-button {
    background-color: var(--primary-color);
    color: var(--input-text);
    border: none;
    padding: 12px 20px;
    margin: 5px 5px 5px 0;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
    width: fit-content;
    /* center the button */
    margin-left: auto;
    margin-right: auto;
    /* manrope */
    /* font-family: 'Manrope', sans-serif; */
}





.store-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* center texts in store-content */
.store-content h4 {
    text-align: center;
    margin-top: 20px;
}


/* Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.keyword-search-container .input-field {
    flex: 1;
    margin-left: 20px;
}

/* Input Fields */
.input-field {
    background-color: var(--input-bg);
    color: var(--input-text);
    padding: 10px;
    font-size: 16px;
    border: 0.5px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-field::placeholder {
    color: #bbb;
}

.input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

.keywordChart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.csv-display {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;  /* Switch from var(--sidebar-bg2) to white for clarity */
    border: 1px solid #ddd;  /* Light border */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* Soft outer shadow */
    font-family: 'Manrope', sans-serif; /* Use a modern font instead of monospace */
    color: #333;
    overflow-y: auto;
    width: 100%;
    max-width: 800px; /* Prevent it from being too wide */
    margin-left: auto;
    margin-right: auto;
    min-height: 425px !important;
    max-height: 600px !important;
  }

  /* #csvDisplayPreview extra margin-bottom */
  #csvDisplayPreview {
    margin-bottom: 30px;
  }
  
    /* #csvDisplayPreview extra margin-bottom */
    #csvDisplay{
      margin-bottom: 30px;
    }
    
  /* Slightly larger min-height on desktop */
  /* @media (min-width: 769px) {
    .csv-display {
      min-height: 600px;
    }
  } */

  .product-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    z-index: 99999;
    overflow-y: scroll;
    /* make it somehwat larger */
    width: 80%;

  }



  /* on mobile width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .csv-display {
      width: 100%;
      min-height: 300px;
    }
  }
  
  /* The table inside .csv-display */
  .csv-display table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Slightly bigger than default 10-12px */
  }
  
  /* Table header cells */
  .csv-display th {
    background-color: #f3f3f3;
    color: #333;
    font-weight: 500; /* Bolder text */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-family: 'Inter Variable', sans-serif;
    position: sticky; /* So header stays in place if the data scrolls */
    top: 0;
    z-index: 2; /* So it stays above the rows */
  }
  
  /* Table data cells */
  .csv-display td {
    border: 1px solid #ddd;
    padding: 10px;
    /* color: #555; Slightly lighter than #333 for data cells */
    color: #6B7280;
  }
  
  /* Optional row striping */
  .csv-display tr:nth-child(even) td {
    background-color: #fafafa; 
  }
  
  /* Hover highlight on table rows */
  .csv-display tr:hover td {
    background-color: #f0f0f0;
  }

  .csv-display tr {
    cursor: pointer; /* 👈 pointer cursor on row */
    transition: background-color 0.15s ease;
  }


/* Column Adder */
.column-adder {
    margin-top: 20px;
    margin-bottom: 35px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--sidebar-bg);
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column-adder textarea {
    min-height: 100px;
    resize: vertical;
}

.add-column-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
}

.add-column-button:hover {
    background-color: var(--suggestion-hover-bg);
}

/* Flow Overlay */
.flow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 9000;
}

.flow-content {
    text-align: center;
    padding: 30px;
    background: rgba(30, 30, 47, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.spinner-overlay {
    border: 6px solid var(--border-color);
    border-top: 6px solid var(--spinner-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.loading-dots span {
    font-size: 3rem;
    color: var(--loading-dot-color);
    animation: glow 1.2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Insights Interface */
.insights-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* For the date-range button row */
.range-buttons-insights, .range-buttons-campaigns {
    display: flex;
    gap: 10px;
    padding: 10px 0;
  }



  .range-buttons-insights button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  .range-buttons-insights button:hover {
    background-color: #e2e6ea;
  }

  /* center those buttons in the screen */
    .range-buttons-insights {
        justify-content: center;
    }


.range-buttons-campaigns button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    }
    .range-buttons-campaigns button:hover {
    background-color: #e2e6ea;
    }

/* center those buttons in the screen */
.range-buttons-campaigns {
    justify-content: center;
}

  /* Metric Cards Row */
  .insights-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 30px;
  }

  /* center the cards */
    .insights-cards-row {
        justify-content: center;
    }

  


  .insights-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 220px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
  }

  .insights-card2 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 430px;
    padding: 15px;
    /* cursor: pointer; */
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;

  }

  .insights-card:hover {
    transform: translateY(-2px);
  }
  .insights-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .insights-card-value {
    font-size: 22px;
    color: #333;
  }


  /* Instead of 'display: none', do something like: */
.insights-chart-container.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Give it a decent min-width so it can't collapse */
  #insightsChartContainer {
    visibility: visible;    /* default */
    opacity: 1;            /* default */
    pointer-events: auto;  /* default */
    width: 100%;           /* or whatever you prefer */
    min-width: 600px;      /* ensures it never shrinks too narrow */
    max-width: 800px;
    margin: 0 auto;
    /* rest of your styling */
  }
    /* Fix a stable height on the container so it doesn't grow infinitely */
.insights-chart-container {
    position: relative;     /* Chart.js needs a positioning context */
    width: 100%;            /* your desired width or max-width */
    max-width: 800px;       /* optional max width */
    height: 400px;          /* or max-height: 400px + overflow if you prefer */
    margin: 0 auto;         /* center horizontally */
    /* whichever background/border styles you like */
  }
  
  #insightsChart {
    display: block;         /* don't let it be inline */
    width: 100%;            /* fill container's width */
    height: 100%;           /* fill container's height, so it doesn't auto-expand */
  }

  .range-buttons-insights button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  
  .range-buttons-campaigns button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  

  .insights-value-row {
    display: flex;
    align-items: baseline; /* or center */
    gap: 6px;
  }
.insights-delta {
    font-size: 0.9em;   /* slightly smaller text */
    font-weight: 400;
  }
  
  .insights-delta.positive {
    color: #17a675;     /* greenish */
  }
  
  .insights-delta.negative {
    color: #c0392b;     /* redish */
  }
  

  #importSourcesContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;

}
#importSourcePie {
    /* max-width: 50%; */
    /* max-height: 400px; */
    /* center */
    margin-left: auto;
    margin-right: auto;

}


.charts-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    height: auto;
}

canvas {
    width: 100%;
    max-width: 1000px;
    height: auto;
    background-color: transparent;
    border-radius: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .charts-container {
        flex-direction: row;
        align-items: center;
        height: auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Adjusted: Changed position to relative and removed top: 0; */
.chat-header, .chat-header-3 {
    flex-shrink: 0;
    padding: 20px;
    /* background-color: var(--sidebar-bg); */
    /* background-color: rgba(68, 171, 215, 0.08); */
    background-color: transparent;
    /* border-bottom: 1px solid var(--border-color); */
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border-radius: 5px; */
    /* only border bototm */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    
    font-size: 12px;
    /* manrop */
    font-family: 'Inter Variable', sans-serif;

    /* border-top: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-left: 1px solid #E8E8E8; */
    /* only border on top, left and right */


    /* make sure the header sticky */
    /* position: sticky; */

}

/* make sure the h2 is max 60% */
/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header h2 {
        max-width: 75%;
    }
}

/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* Info Box (fixed height) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 80px !important; /* Fixed height to avoid movement */
    /* make sure it doesnt extend where its in */
    max-width: 100% !important;
    /* center */
    margin-left: auto !important;
    margin-right: auto !important;
    /* make max width */
    max-width: 500px !important;
}

/* Button Container */
.button-container {
    margin-top: auto; /* Pushes buttons to bottom */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ensure all suggestion buttons align */
.suggestion-button {
    background-color: transparent;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: none;
    margin-top: 20px;
}

/* Ensure all connect buttons align */
.shopify-fetch-button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
}

/* Responsive - Ensure 2 in a row for tablets, 1 in mobile */
@media (max-width: 1024px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Connection Status Label (Positioned in top-right) */
.status-label {
    /* position: absolute; */
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
}


/* Not Connected State */
.status-label.not-connected {
    background-color: #d6d6d6e0;
    color: #555;
}

/* Connected State */
.status-label.connected {
    background-color: #4caf4fc4;
    color: #fff;
}

/* Checking Status */
.status-label.checking {
    background-color: #f0ac4ecb;
    color: #fff;
}

.icon-container {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: rgba(68, 171, 215, 0.2);
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}

.icon-container-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(68, 171, 215, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  width: 1.5em;
  height: 1.5em;
}



.icon-container-csv-imports {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: transparent;
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}


/* Adjust the actual icon inside */
.icon-blue {
    color: var(--button-hover) !important;
    font-size: 16px; /* Adjust icon size */
}

.icon-blue-csv-imports {
    color: var(--button-hover) !important;
    font-size: 20px; /* Adjust icon size */
    margin-bottom: 3px;
    margin-right: -3px;
}

.shopify-fetch-button {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    /* margin: 5px; */
    width: 175px !important;
    height: 44px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}

.shopify-fetch-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
.shopify-fetch-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }



.shopify-fetch-button:hover {
    background: var(--sidebar-bg2);
}

.shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}
.shopify-fetch-button2:hover {
    background: var(--sidebar-bg2);
}

#shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}


/* create-store-button */
.create-store-button {
    background-color: var(--primary-color);
    color: var(--input-text);
    border: none;
    padding: 12px 20px;
    margin: 5px 5px 5px 0;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
    width: fit-content;
    /* center the button */
    margin-left: auto;
    margin-right: auto;
    /* manrope */
    /* font-family: 'Manrope', sans-serif; */
}





.store-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* center texts in store-content */
.store-content h4 {
    text-align: center;
    margin-top: 20px;
}


/* Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.keyword-search-container .input-field {
    flex: 1;
    margin-left: 20px;
}

/* Input Fields */
.input-field {
    background-color: var(--input-bg);
    color: var(--input-text);
    padding: 10px;
    font-size: 16px;
    border: 0.5px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-field::placeholder {
    color: #bbb;
}

.input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

.keywordChart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.csv-display {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;  /* Switch from var(--sidebar-bg2) to white for clarity */
    border: 1px solid #ddd;  /* Light border */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* Soft outer shadow */
    font-family: 'Manrope', sans-serif; /* Use a modern font instead of monospace */
    color: #333;
    overflow-y: auto;
    width: 100%;
    max-width: 800px; /* Prevent it from being too wide */
    margin-left: auto;
    margin-right: auto;
    min-height: 425px !important;
    max-height: 600px !important;
  }

  /* #csvDisplayPreview extra margin-bottom */
  #csvDisplayPreview {
    margin-bottom: 30px;
  }
  
    /* #csvDisplayPreview extra margin-bottom */
    #csvDisplay{
      margin-bottom: 30px;
    }
    
  /* Slightly larger min-height on desktop */
  /* @media (min-width: 769px) {
    .csv-display {
      min-height: 600px;
    }
  } */

  .product-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    z-index: 99999;
    overflow-y: scroll;
    /* make it somehwat larger */
    width: 80%;

  }



  /* on mobile width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .csv-display {
      width: 100%;
      min-height: 300px;
    }
  }
  
  /* The table inside .csv-display */
  .csv-display table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Slightly bigger than default 10-12px */
  }
  
  /* Table header cells */
  .csv-display th {
    background-color: #f3f3f3;
    color: #333;
    font-weight: 500; /* Bolder text */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-family: 'Inter Variable', sans-serif;
    position: sticky; /* So header stays in place if the data scrolls */
    top: 0;
    z-index: 2; /* So it stays above the rows */
  }
  
  /* Table data cells */
  .csv-display td {
    border: 1px solid #ddd;
    padding: 10px;
    /* color: #555; Slightly lighter than #333 for data cells */
    color: #6B7280;
  }
  
  /* Optional row striping */
  .csv-display tr:nth-child(even) td {
    background-color: #fafafa; 
  }
  
  /* Hover highlight on table rows */
  .csv-display tr:hover td {
    background-color: #f0f0f0;
  }

  .csv-display tr {
    cursor: pointer; /* 👈 pointer cursor on row */
    transition: background-color 0.15s ease;
  }


/* Column Adder */
.column-adder {
    margin-top: 20px;
    margin-bottom: 35px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--sidebar-bg);
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column-adder textarea {
    min-height: 100px;
    resize: vertical;
}

.add-column-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
}

.add-column-button:hover {
    background-color: var(--suggestion-hover-bg);
}

/* Flow Overlay */
.flow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 9000;
}

.flow-content {
    text-align: center;
    padding: 30px;
    background: rgba(30, 30, 47, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.spinner-overlay {
    border: 6px solid var(--border-color);
    border-top: 6px solid var(--spinner-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.loading-dots span {
    font-size: 3rem;
    color: var(--loading-dot-color);
    animation: glow 1.2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Insights Interface */
.insights-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* For the date-range button row */
.range-buttons-insights, .range-buttons-campaigns {
    display: flex;
    gap: 10px;
    padding: 10px 0;
  }



  .range-buttons-insights button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  .range-buttons-insights button:hover {
    background-color: #e2e6ea;
  }

  /* center those buttons in the screen */
    .range-buttons-insights {
        justify-content: center;
    }


.range-buttons-campaigns button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    }
    .range-buttons-campaigns button:hover {
    background-color: #e2e6ea;
    }

/* center those buttons in the screen */
.range-buttons-campaigns {
    justify-content: center;
}

  /* Metric Cards Row */
  .insights-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 30px;
  }

  /* center the cards */
    .insights-cards-row {
        justify-content: center;
    }

  


  .insights-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 220px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
  }

  .insights-card2 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 430px;
    padding: 15px;
    /* cursor: pointer; */
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;

  }

  .insights-card:hover {
    transform: translateY(-2px);
  }
  .insights-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .insights-card-value {
    font-size: 22px;
    color: #333;
  }


  /* Instead of 'display: none', do something like: */
.insights-chart-container.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Give it a decent min-width so it can't collapse */
  #insightsChartContainer {
    visibility: visible;    /* default */
    opacity: 1;            /* default */
    pointer-events: auto;  /* default */
    width: 100%;           /* or whatever you prefer */
    min-width: 600px;      /* ensures it never shrinks too narrow */
    max-width: 800px;
    margin: 0 auto;
    /* rest of your styling */
  }
    /* Fix a stable height on the container so it doesn't grow infinitely */
.insights-chart-container {
    position: relative;     /* Chart.js needs a positioning context */
    width: 100%;            /* your desired width or max-width */
    max-width: 800px;       /* optional max width */
    height: 400px;          /* or max-height: 400px + overflow if you prefer */
    margin: 0 auto;         /* center horizontally */
    /* whichever background/border styles you like */
  }
  
  #insightsChart {
    display: block;         /* don't let it be inline */
    width: 100%;            /* fill container's width */
    height: 100%;           /* fill container's height, so it doesn't auto-expand */
  }

  .range-buttons-insights button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  
  .range-buttons-campaigns button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  

  .insights-value-row {
    display: flex;
    align-items: baseline; /* or center */
    gap: 6px;
  }
.insights-delta {
    font-size: 0.9em;   /* slightly smaller text */
    font-weight: 400;
  }
  
  .insights-delta.positive {
    color: #17a675;     /* greenish */
  }
  
  .insights-delta.negative {
    color: #c0392b;     /* redish */
  }
  

  #importSourcesContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;

}
#importSourcePie {
    /* max-width: 50%; */
    /* max-height: 400px; */
    /* center */
    margin-left: auto;
    margin-right: auto;

}


.charts-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    height: auto;
}

canvas {
    width: 100%;
    max-width: 1000px;
    height: auto;
    background-color: transparent;
    border-radius: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .charts-container {
        flex-direction: row;
        align-items: center;
        height: auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Adjusted: Changed position to relative and removed top: 0; */
.chat-header, .chat-header-3 {
    flex-shrink: 0;
    padding: 20px;
    /* background-color: var(--sidebar-bg); */
    /* background-color: rgba(68, 171, 215, 0.08); */
    background-color: transparent;
    /* border-bottom: 1px solid var(--border-color); */
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border-radius: 5px; */
    /* only border bototm */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    
    font-size: 12px;
    /* manrop */
    font-family: 'Inter Variable', sans-serif;

    /* border-top: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-left: 1px solid #E8E8E8; */
    /* only border on top, left and right */


    /* make sure the header sticky */
    /* position: sticky; */

}

/* make sure the h2 is max 60% */
/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header h2 {
        max-width: 75%;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header-3 h2 {
        max-width: 75%;
    }
}

/* Allow scrolling only in the chat window */
.chat-window {
    flex-grow: 1; /* Ensure it occupies available space */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px; /* Add padding for content */
    /* background-color: var(--chat-bg); Keep the background color */
    background-color: #Fafafa;
    /* Removed max-height: 100%; */
    /* slight border */
    /* border-radius: 8px; */
    /* border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px; */


    /* border-bottom: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
}

/* Adjusted: Changed position to relative, removed bottom: 0;, added margin-top: auto; */
.chat-input-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: transparent;
    z-index: 101;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    /* border-radius: 8px; */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: 1px solid #E8E8E8;
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */

    box-sizing: border-box;
    position: relative;
    margin-top: auto;

}
/* a shadow on bottom too */
.chat-input-container {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* rounder borders */
    /* border-radius: 15px; */
}



/* chat message spacing top */
.chat-message {
    margin-top: 10px;
}

.chat-message.assistant {
    background-color: #fff;    /* even softer variant: */
    align-self: flex-start;
    color: var(--text-color);
    width: fit-content;
    max-width: 90%;
    padding: 10px 16px; /* More padding for better readability */
    border-radius: 15px; /* Smooth rounded corners */
    border-bottom-left-radius: 0;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5; /* Better line spacing */
    letter-spacing: 0.3px; /* Slightly spaced letters for readability */
    box-shadow: 0px 2px 6px rgba(122, 122, 122, 0.1); /* Soft shadow for elevation */
    border-left: 3px solid rgba(68, 171, 215, 0.25); /* Subtle left border accent */
    word-wrap: break-word;
    transition: all 0.3s ease-in-out;
}

.chat-message.user {
    background-color: rgb(227, 247, 255);
    align-self: flex-end;
    color: var(--text-color);
    text-align: right;
    margin-left: auto;
    width: fit-content;
    max-width: 85%;
    padding: 10px 16px;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    border-radius: 15px;
    border-bottom-right-radius: 0;
    line-height: 1.5;
    letter-spacing: 0.3px;
    box-shadow: 0px 2px 6px rgba(122, 122, 122, 0.1);
    transition: all 0.3s ease-in-out;
}

/* Optional: A slight fade-in animation for messages */
@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    animation: fadeInMessage 0.2s ease-in-out;
}






/* make chatbot-settings scrollable */
.chatbot-settings {
    overflow-y: auto;
}

/* Suggestions */
.chat-window .suggestion {
    background-color: #fff;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 25px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.chat-window .suggestion:hover {
    /* background-color: var(--suggestion-hover-bg); */
    transform: scale(1.015);
    /* change text color */
    /* color: var(--primary-color); */
}

.suggestion::before {
    content: "💡 ";
    margin-right: 5px;
}





/* Loading Message */
.loading-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--chat-assistant-bg);
    padding: 10px 15px;
    border-radius: 15px;
    color: var(--text-color);
}

.loading-message::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--loading-dot-color);
    border-radius: 50%;
    animation: glow 1.2s infinite;
    margin-left: 5px;
}

.loading-text {
    display: inline-block;
    color: var(--text-color);
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: text-flow 2s linear infinite;
}

@keyframes text-flow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Input Field */
.chat-input-container .input-field {
    flex-grow: 1;
    border-radius: 10px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--chat-bg);
    color: #444;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    font-family: 'Manrope', sans-serif;
}




/* make input fielf in chatbot page wider */
.chat-input-container .input-field {
    width: 80%;
}

.chat-input-container .input-field::placeholder {
    color: #bbb;
}

.chat-input-container .input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

/* Send Button */
.send-button {
    padding: 10px 16px;
    font-size: 17px;
    border-radius: 10px;
    background-color: #fff;
    color: var(--text-color);
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed), transform var(--transition-speed);
    font-family: 'Inter Variable', sans-serif;
    border: 1px solid var(--border-color);
    /* border: 1px solid var(--button-hover); */
}

.send-button:hover {
    /* background-color: rgba(68, 171, 215, 0.3); */
    background-color: var(--sidebar-bg3);
}

/* Download Button - Updated to match shopify-fetch-button styling */
.download-button {
    position: relative;
    background-color: var(--sidebar-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    margin: 20px auto 0 auto;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    max-width: 200px;
    margin-bottom: 15px;
    font-family: 'manrope', sans-serif;
}

.download-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.download-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

.download-button:hover {
    background: var(--sidebar-bg2);
}

/* Spinner for Buttons */
.spinner {
    border: 4px solid var(--sidebar-bg);
    border-top: 4px solid var(--spinner-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Responsive Adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar Overlay for Mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-speed) ease;
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }

    /* Ensure chat input and send button are side by side */
    .chat-input-container {
        flex-direction: row;
    }

    .send-button {
        margin-left: 0;
        width: auto;
    }
}

/* Further Media Queries for Extremely Small Screens */
@media (max-width: 480px) {
    /* Ensure chat input and send button remain side by side */
    .chat-input-container {
        flex-direction: row;
        gap: 10px;
    }

 
}

/* Products Header */
.products-header, .connections-header, .chatbot-header, .keywords-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    position: sticky;
    top: 0 !important;
    z-index: 100;
    height: 60px;
}

/* Background color for content sections */
.content {
    /* background-color: #fdfdfd; */
    background-color: #fafafa;
    border-radius: 10px;

    border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    /* padding: 10px; */
    border-top: 1px solid #E8E8E8;


}



.insightsInterface {
    overflow: hidden;
}

.charts-container {
    overflow-y: auto;
}

/* Chart Container */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--card-shadow);
    margin: 20px auto;
    max-width: 1200px;
    width: 95%;
    height: auto;
    min-height: 500px;
}




/* Keyword Insights Table Styling */
#keywordInsights table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#keywordInsights th, #keywordInsights td {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

#keywordInsights th {
    background-color: var(--primary-color);
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 1;
    /* less height */
    padding: 5px 5px;
    /* no space above it */
    margin-top: 0;
    /* make the height small */
    /* font manrope */
    font-family: 'manrope', sans-serif;
    font-size: 10px;
}

.info-text {
    text-align: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-color);
    /* position on bottom centre */
    /* position: sticky; */
    bottom: 0;
    z-index: 1;
    margin-top: 5px;


}

#keywordInsights tr:nth-child(even) {
    background-color: var(--chat-bg);
}

/* Add hover effect for table rows */
#keywordInsights tr:hover {
    background-color: var(--suggestion-bg);
    cursor: pointer;
}

/* Adjust Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px auto;
    max-width: 800px;
    width: 95%;
}

.keyword-search-container .input-field {
    flex: 1;
    min-width: 200px;
    padding: 5px 15px;
    /*  */
}


/* Adjusted Chat Header
.chat-header {
    padding: 10px 20px;
    margin-bottom: 10px;
} */

/* Adjust Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px auto; /* Add vertical margin */
    gap: 15px; /* Adjust spacing between elements */
    max-width: 800px;
    width: 95%;
}

.keyword-search-container .input-field {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
}

.keyword-search-container .input-field,
.keyword-search-container button {
    margin-top: 10px;
    margin-bottom: 10px;
}

.keyword-search-container button {
    width: auto; /* Adjust to content size */
    padding: 8px 12px; /* Smaller padding */
    font-size: 14px; /* Adjust font size */
    align-self: center; /* Center within the grid */
}

/* Info Text Styling */
.info-text {
    text-align: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-color);
    margin-top: 5px;
}


/* Spinner Styles */
.spinner {
    border: 4px solid var(--primary-color);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart Container Adjustments */
.chart-container canvas {
    width: 100% !important;
    height: auto !important;
}


.select2-dropdown {
    position: relative;
  }




  
  .suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
  }
  

  .suggestion {
    padding-bottom: 5px;
  }



  .chart-suggestion {
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-color);
    transition: color var(--transition-speed);
    margin-bottom: 35px;
    background-color: var(--suggestion-bg);
  }
  
  .chart-suggestion:hover {
    color: var(--primary-color);
  }





/* make chart-suggestion just like question suggestion */
.chart-suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
    /* it should take the widht of the content */
    width: fit-content;
    margin-bottom: 35px;
    /* make sure the button is centered */
    margin: 0 auto;

}   




/* Adjust SVG size and alignment */
.connection-logo {
    width: 50px; /* Smaller size */
    height: auto;
    margin: 0 auto; /* Centered by default */
}

/* Desktop: Align SVGs to the left */
/* @media (min-width: 768px) {
    .connection-item {
        flex-direction: row;
        align-items: center;
    }

    .connection-logo {
        margin: 0 15px 0 0; 
    }

    .connection-item h3,
    .connection-item .input-field,
    .connection-item .connect-button {
        text-align: left;
    }
} */

/* Mobile: SVGs centered */
/* @media (max-width: 767px) {
    .connection-item {
        flex-direction: column;
        align-items: center;
    }
} */








/* Adjust SVG size and alignment */
.connection-logo {
    width: 50px; /* Smaller size */
    height: auto;
    margin: 0 auto; /* Centered by default */
    /* bit spacing to the top */
    margin-top: 10px;
}

/* Desktop: Adjust layout */
@media (min-width: 768px) {
    .connection-item {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center elements */
    }

    .connection-logo {
        margin-bottom: 10px; /* Add space below the icon */
    }

    .connection-item h3 {
        margin-bottom: 15px; /* Add space below the title */
        text-align: center;
    }

    .connection-item .input-field {
        width: 100%; /* Full width for better responsiveness */
        max-width: 400px; /* Wider than buttons for better UX */
        margin-bottom: 15px; /* Space below the input field */
    }

    .connection-item .connect-button,
    .connection-item .expander-button,
    .connection-item .btn-primary {
        width: 100%; /* Full width of container */
        max-width: 200px; /* Smaller than input fields */
        margin: 5px 0; /* Add vertical spacing */
        text-align: center;
    }

    .expander-button {
        display: flex;
        justify-content: center; /* Center the content of the button */
        /* center */
        margin: 0 auto;

    }
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px); /* ✅ Ensures two items per row */
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* Responsive: 1 column on smaller screens */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
        max-width: 100%;
    }
}






.domainIput .domainSearchButton {
    margin: 0 auto;
    justify-content: center;
    display: flex;
}


/* Desktop Styles */
@media (min-width: 1024px) {
    .keyword-search-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns for most items */
        grid-gap: 15px; /* Space between items */
        justify-items: center;
        align-items: center;
        margin: 20px auto; /* Centered horizontally */
        max-width: 800px;
    }

    /* Titles: Full-width rows */
    .keyword-search-container h3 {
        grid-column: span 2; /* Span across both columns */
        text-align: center;
        font-size: 18px;
        margin-bottom: 10px;
        color: var(--text-color);
        margin-top: 20px;
    }

    /* Language and Location Selectors */
    #locationSelect, 
    #languageSelect {
        grid-column: span 1; /* Each occupies one column */
        width: 80%; 
    }

    /* Input and Button for Keyword Search */
    #keywordInput {
        grid-column: span 1; /* Larger input */
        flex: 2; /* Input takes more space */
        min-width: 400px; /* Ensure a reasonable size */
    }

    #keywordSearchButton {
        grid-column: span 1; /* Button beside the input */
        flex: 1;
        padding: 8px 15px; /* Smaller button */
    }

    /* Input and Button for Domain Search */
    #DomainInput {
        grid-column: span 1; /* Larger input */
        flex: 2;
        min-width: 400px;
        /* width: 100%; */
    }

    #domainSearchButton {
        grid-column: span 1; /* Button beside the input */
        flex: 1;
        padding: 8px 15px;
    }
}

/* Mobile Styles */
@media (max-width: 1023px) {
    .keyword-search-container {
        display: flex;
        flex-direction: column;
        gap: 5px;
        justify-content: center;
        align-items: center;
        margin: 20px auto;
        width: 95%; /* Full width for mobile */
    }

    /* Titles: Full-width rows */
    .keyword-search-container h3 {
        text-align: center;
        font-size: 16px;
        margin-bottom: 10px;
        color: var(--text-color);
        margin-top: 20px;
    }

    /* Language and Location Selectors */
    #locationSelect, 
    #languageSelect {
        width: 80%; /* Full width on mobile */
    }

    /* Input and Button for Keyword Search */
    #keywordInput, 
    #DomainInput {
        width: 80%;
        margin-bottom: 5px;
    }

    #keywordSearchButton, 
    #domainSearchButton {
        width: 25%; /* Smaller buttons */
    }


}

/* General Styles */
.chart-suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
    margin-bottom: 35px;
}

.chart-suggestion:hover {
    color: var(--primary-color);
}

.products-buttons {
    display: flex; /* Enables horizontal layout */
    justify-content: space-between; /* Pushes text left, button right */
    align-items: center; /* Aligns items vertically */
    width: 80%;
    max-width: 900px;
    margin:  auto;
    gap: 20px; /* Space between text & button */
}

.products-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-radius: 5px;
  width: 80%;
  max-width: 900px;
  margin: auto;
  margin-top: 50px;
  gap: 20px;
  box-sizing: border-box;
}


.products-content {
    max-width: 500px; /* Ensures text doesn't stretch too wide */
    /* margin-left: auto;  */
}

.products-buttons h3,
.products-buttons p {
    margin: 10px 0;
}

.products-buttons p {
    color: #6B7280;
}

/* Ensure only THIS button moves right */
#shopify-fetch-button1 {
    margin-left: auto; /* Pushes button to the right */
}

/* Responsive: Center button below text on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .products-buttons {
        flex-direction: column; /* Stack text & button */
        align-items: center; /* Center align */
    }

    #shopify-fetch-button1 {
        margin-left: 0; /* Reset margin */
        width: 100%; /* Optional: Make button full-width */
    }
}

/* on mobile, centre and stack the buttons */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

/* @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .products-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;

        margin: 0 auto;

    }
} */


#shopify-fetch-button1, #shopify-fetch-button2 {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    margin-top: 10px;
    /* center the button in middle */
    margin: 0 auto;
    /* small border */
    border: 1px solid var(--border-color);
    width: 125px;
}   

#shopify-fetch-button1 {
    margin-top: 50px;
}

#shopify-fetch-button3 {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}


.input-field-csv {

    padding: 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 10px;
    /* background */
    background-color: var(--input-bg);
    color: var(--input-text);
    /* font manrope */
    font-family: 'Manrope', sans-serif;
    /* pointer */
    cursor: pointer;
}



.column-adder input, .column-adder textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 10px;
    /* background */
    background-color: var(--input-bg);
    color: var(--input-text);
    /* font manrope */
    font-family: 'Manrope', sans-serif;
}

/* border input field when typing */
.column-adder input:focus, .column-adder textarea:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 5px var(--primary-color); */
}

/* make sure the column-adder h3 text is centered */
.column-adder h3 {
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: var(--text-color);
}

/* .add-store-button {
    color: #333;
    background-color: rgba(68, 171, 215, 0.2);
    font-family: 'manrope', sans-serif;
} */

/* More specific selector */
.store-form-container button.add-store-button {
  background-color: #fff !important;
  color: #444 !important;
  padding: 6px 12px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  font-family: 'Inter Variable', 'Manrope', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto; /* Keep center alignment */
}

/* Keep icon blue */
.store-form-container button.add-store-button i {
  color: #129ed9;
}

/* Hover state */
.store-form-container button.add-store-button:hover {
  background-color: #f7f7f7 !important;
}


/* make this button as wide as its text content */
.add-column-button {
    width: auto;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background var(--transition-speed);
    /* center the button */
    margin: 0 auto;
}


/* Styles for the '+' icon button */
.upload-csv-button {
    padding: 10px;
    font-size: 15px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.upload-csv-button:hover {
    color: var(--primary-color);
}

.upload-csv-button i {
    pointer-events: none;
}

.hidden {
    display: none;
}


/* make sure <div class="chat-window" id="chatWindow"> is only vertically scrollable, disable horizontal scrolling */
.chat-window {
    overflow-x: hidden;
    overflow-y: auto;


    width: 100%;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

/* On desktop, apply inner padding only to content */
@media (min-width: 768px) {
    .chat-window {
        padding-left: 5%;
        padding-right: 5%;
    }
}
    /* margin-left: 15%;
    margin-right: 15%; */


/* Apply margins only on wider screens */
/* @media (min-width: 768px) {
  .chat-window {
      margin-left: 15%;
      margin-right: 15%;
  }
} */

/* chat window user message 10 px top margin */
.chat-window .chat-message.user {
    margin-top: 10px;
}

.chatWindow .chat-message.user {
    margin-top: 10px;
}


/* Update the product-card styles */
.product-card {
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
    max-width: 700px;
    width: 85%; /* Ensure the card has a fixed width */
    max-height: 95%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
}

/* Image styling inside product-card */
.product-card img {
    width: 70%; /* Make the image fill the width of the card */
    height: 70%;
    /* border: 2px solid var(--primary-color); Add primary colored border */
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Styles for Buttons */
.product-card button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-color);
    transition: background var(--transition-speed);
}

.product-card button:hover {
    background-color: var(--button-bg);
}


/* while product card is opened, make the background blurry */
.overlay {
    backdrop-filter: blur(15px);
}

/* Loading Placeholder Animation */
@keyframes loadingAnimation {
    0% { background-position: 100% 100; }
    100% { background-position: -100% 0; }
}



/* Designer Interface Styles */
.designer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#designerImageContainer {
    margin-top: 20px;
    width: 700px;
    height: 700px;
}

.ai-enhance-prompt p {
    max-width: 500px;
    /* align center */
    margin: 0 auto;
    text-align: center;
    font-family: 'manrope', sans-serif;
    color: #6B7280;
    font-size: 15px;

}


.ai-enhance-prompt {
    max-width: 500px;
    /* center */
    /* margin: 0 auto !important; */
    text-align: center;
    font-family: 'manrope', sans-serif;
    margin-bottom: 30px;
    margin-top: 20px;
}


#designerImageContainer img {
    max-width: 100%;
    border-radius: 10px;
    /* center in its container/section */
    margin: 0 auto;
    display: block;

}




/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

/* Image Editor Canvas */
.image-editor-canvas {
    cursor: url('eraser-cursor.png'), auto; /* Customize cursor if desired */
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Adjust Sidebar Menu Item Icon */

/* Adjustments for the New Menu Item */
.menu-item i.fa-paint-brush {
    font-size: 16px;
}


/* Ensure icons have the correct weight */
.far, .fa-regular {
    font-weight: 400;
}

/* Apply colors */

/* i.fa-comment { color: #33b5e5 !important; } /* Blue */
/* i.fa-link { color: #f44336 !important; } Red */

/* i.fa-tag { color: #9c27b0 !important; } Purple */
/* i.fa-cart-shopping { color: #ff9800 !important; } Orange */
/* i.fa-chart-line { color: #4caf50 !important; } Green */ */
/* i.fa-credit-card { color: rgb(244, 105, 54) !important; } Red-Orange */

/* fa-store purple */
/* i.fa-store { color: #9c27b0 !important; } */




/* Buttons container inside product-card */
.product-card .buttons-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Styling for additional thumbnails */
.additional-images-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
    
}

/* max height on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .product-card {
        max-height: 660px;
        overflow-y: auto;
    }
}

.additional-images-container .thumbnail {
    width: 60px;
    height: auto;
    cursor: pointer;
    border: 2px solid transparent; /* Default border */
    border-radius: 5px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

/* Highlight the selected thumbnail */
.additional-images-container .thumbnail.selected {
    border-color: var(--primary-color);
    transform: scale(1.1); /* Slightly enlarge the selected thumbnail */
}

/* Add hover effect for thumbnails */
.additional-images-container .thumbnail:hover {
    border-color: var(--button-hover);
}





.loading-overlay {
    animation: glowingEffect 1.5s infinite;
    /* place  */
}

@keyframes glowingEffect {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}






.chatbot-customization {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    /* background-color: #f9f9f9; */
    border-radius: 10px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    font-family: 'manrope', sans-serif;
    /* margin left and right */
}

/* on desktop */
@media (min-width: 768px) {
    .chatbot-customization {
        width: 80%;
        margin: 0 auto;
    }
}


.customization-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.customization-row label {
    flex: 1;
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    /* color: #333; */
}

.customization-row .input-field {
    flex: 2;
    /* padding: 8px; */
    /* border: 1px solid #ddd; */
    /* border-radius: 5px; */
    /* font-size: 14px; */
}

.customization-row .input-field[type="color"] {
    padding: 0;
    height: 35px;
    width: 60px;
    cursor: pointer;
}



@media screen and (max-width: 768px) {
    .customization-row {
        flex-direction: column;
        align-items: flex-start;
    }

    /* customization input fields with text (not color) 90% width */
    .customization-row .input-field[type="text"] {
        width: 90%;
    }

    .customization-row label {
        min-width: unset;
        flex: unset;
    }

    .shopify-fetch-button {
        align-self: center;
        width: 100%;
    }
}


.nice-button {
    position: relative; 
    border: none;
    padding: 12px 20px;
    margin: 8px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}


.sidebar-header-store {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 14px;
}



/* alignt items above each other */
.store-display {
    /* display: flex; */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* gap: 20px; */
    /* margin-top: 10px; */
    padding: 12px 20px;
}

.form-subtitle {
    font-size: 1.1em;
    margin: 10px 0;
    font-family: 'manrope', sans-serif;
}

.highlight-word {
    font-weight: 550;
    transition: color 0.3s ease;
    /* italic */
}

/* no italic */
.options-content {
    font-style: normal;
}

.options-content p {
    font-style: normal;
}

.options-content h4 {
    font-style: normal;
    /* no bold */
    font-weight: 600;
}

.options-content h3 {
    font-style: normal;
}

.store-name-settings {
    font-style: normal;
}


/* logo max width */
.subscribe-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    margin-top: 20px;
}


.store-form-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    background: var(--sidebar-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.store-form-container h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.store-form-container h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-form-container .icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(18, 158, 217, 0.1);
    border-radius: 8px;
}

.store-form-container input[type="text"],
.store-form-container textarea,
.store-form-container select {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--input-bg);
    color: var(--input-text);
    font-family: 'Inter Variable', sans-serif;
    width: 100%;
}

.store-form-container input[type="text"]:focus,
.store-form-container textarea:focus,
.store-form-container select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1);
}

.store-form-container button {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: 'Inter Variable', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.store-form-container button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-1px);
}

.store-form-container button i {
    font-size: 16px;
}

.store-form-container textarea {
    height: 125px;
}

.store-form-container h4 {
    text-align: left;
    font-family: 'manrope', sans-serif;
    /* font-size: 16px; */
    color: var(--text-color);
    margin-bottom: 5px;
}

.store-form-container h3 {
    text-align: center;
    margin-bottom: 5px;
}

.store-content h3 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 20px;
}



.store-dropdown {
    /* /* position: absolute; */
    top: 100%;
    left: 0; 
    width: 100%;
    background-color: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(18,158,217,0.07) !important;
    border: 1.5px solid #e8eef5 !important;
    padding: 12px 0 !important;
    margin-top: 6px !important;
    min-width: 220px !important;
    max-width: 260px !important;
    font-family: 'Inter Variable', 'Manrope', sans-serif !important;
    z-index: 10002 !important;
    /* display: none; */
    color: var(--sidebar-bg);
    width: 225px;
    margin-top: 2px;
    /* rounded borders */
    border-radius: 5px;
    /* center it */
    margin: 0 auto;
    /* spac etop */
    margin-top: 3px;
    /* height: fit-content; */
    max-height: 300px;
    min-height: 100px;
    overflow-y: auto;
    border: 0.5px solid var(--border-color);
}



.button-chatbot-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* on desktop */
@media (min-width: 768px) {
    .button-chatbot-container {
        width: 80%;
        margin: 0 auto;
    }
}











/* Rule Management Section */
.rule-management {
    margin: 20px 0;
    color: #fff;
    margin-top: 20px !important;
}

.rule-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    width: 80%;
}

.rule-form.hidden {
    display: none;
}

.rule-condition,
.rule-action {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rule-select {
    margin: 0 5px;
    padding: 5px;
    color: var(--text-color);
}

.rule-input {
    margin-left: 5px;
    padding: 5px;
    color: var(--text-color);
}

/* Buttons */
.add-rule-button,
.save-rule-button,
.cancel-rule-button,
.edit-rule-button {
    margin: 5px;
    padding: 6px 10px;
    background-color: #129ed9;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.apply-rules-button,
.apply-rules-button-checkout {
    margin: 5px;
    padding: 6px 10px;
    background-color: #7c3aed; /* Brand purple */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.apply-rules-button:hover,
.apply-rules-button-checkout:hover {
    background-color: #6d28d9; /* Darker purple on hover */
}

/* 
.apply-rules-button:hover,
.save-rule-button:hover,
.cancel-rule-button:hover,
.edit-rule-button:hover {
    background-color: var(--button-bg);
} */


.add-rule-button:hover {
    background-color: var(--sidebar-bg2)
}

.delete-rule-button {
    margin: 5px;
    padding: 10px 15px;
    color: #129ed9;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* center the delete button */
.delete-rule-button {
    margin: 0 auto;
    display: block;
}

/* Container Layout */


.rules-list-container {
    flex: 1 1 45%;
    max-height: 660px;
    overflow-y: auto;
    background: var(--sidebar-bg2);
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 40px;
}

.rule-form-container {
    flex: 1 1 45%;
    /* background: var(--sidebar-bg); */
    border-radius: 10px;
    padding: 5px;
    color: #333;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 20px;
}

.button-container p {
    /* color: #333; */
    color: #333333ce;
}



/* Rules List Items */
.rule-item {
    background: var(--suggestion-bg);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none; /* Standard syntax */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE10+/Edge */
}

.rule-item:hover {
    background: var(--suggestion-hover-bg);
}

/* Divider Line */
.rule-item:not(:last-child) {
    border-bottom: 1px solid rgba(14, 13, 13, 0.1);
}

/* Change cursor during dragging */
.rule-item:active {
    cursor: grabbing;
}

/* Optional: Style for the drag handle */
.rule-handle {
    margin-right: 10px;
    cursor: pointer;
}


/* same for removeShippingRow */
.removeShippingRow {
    /* margin-top: 10px; */
    padding: 6px 10px;
    color: #333;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}



/* Rule Form */
.rule-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--chat-bg);
    border-radius: 8px;
    width: 100%;
    max-width: none;
    border: 1px solid var(--border-color);
}

.input[type="radio" i] {
    background-color: var(--primary-color);
    color: var(--primary-color);
}

/* when active */
.input[type="radio" i]:checked {
    background-color: var(--primary-color);
    color: var(--primary-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #ffffff;
}

.rule-condition, .rule-action {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rule-select, .rule-input {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #959393;
    background: var(--background-color);
    color: #333;
    min-width: 120px;
}

.rule-select:focus, .rule-input:focus {
    border-color: #129ed9;
    outline: none;
}

.action-field-container.hidden, #actionValueContainer.hidden, #replaceTextContainer.hidden {
    display: none;
}

.rule-scope {
    margin: 15px 0;
    color: #333;
    font-family: 'manrope', sans-serif;
    font-size: 14px;
}

.rule-scope label {
    margin-right: 15px;
    cursor: pointer;
}

.button-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px !important;
  justify-content: center;

  margin: 0;
}

/* Optional: adjust button width for stacking on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .button-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .button-bar button {
    width: 100%;
  }
}


#copyRulesList {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background-color: #fafafa;
}

/* Optional: scrollbar styling */
#copyRulesList::-webkit-scrollbar {
  width: 6px;
}
#copyRulesList::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.15);
  border-radius: 4px;
}







.add-rule-button, .add-column-button, .save-rule-button, .copy-rule-button, .cancel-rule-button, .apply-rules-button, .apply-rules-button-checkout, .handle-sync-button {
    padding: 6px 10px;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    font-family: 'manrope', sans-serif;
    font-size: 14px;
    border: none;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

/* save-rule-button white text */
.save-rule-button, .copy-rule-button {
    color: #fff;
    border: none;
}

.cancel-rule-button {
    border: none;
}





.add-rule-button, .apply-rules-button, .apply-rules-button-checkout, .handle-sync-button {
    background: #129ed9;
}

.apply-rules-button:hover, .apply-rules-button-checkout:hover, .handle-sync-button:hover {
    background: var(--sidebar-bg2);
}

/* center on middle horizontally */
.add-rule-button {
    margin: 0 auto;
}

.add-rule-button, .handle-sync-button {
    position: relative; 
    border: none;
    padding: 6px 10px !important;
    margin: 8px 20px;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}

.apply-rules-button, .apply-rules-button-checkout {
    /* position: relative;  */
    border: none;
    padding: 6px 10px;
    margin: 8px 20px;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}





.cancel-rule-button {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 12px;
}


/* Apply and Sync Buttons */
.apply-sync-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.sync-options {
    display: flex;
    gap: 15px;
}

.custom-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

.handle-sync-button {
    /* position: relative;  */
    border: none;
    padding: 6px 10px;
    margin: 8px 20px;
    width: 200px !important;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}

.handle-sync-button {
    margin-right: 0px;
}

.copy-rule-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.copy-rule-item input[type="checkbox"] {
  margin-top: 5px;
  flex-shrink: 0;
}

.copy-rule-item label {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  font-family: Inter, sans-serif;
}


.handle-sync-button.loading::after, .copy-rule-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }


/* Glowing effect for import buttons */
.import-button, .import-button1, .import-button2, .import-button3, .import-button-x,
.import-button4, .import-button5, .import-button6, .import-button7, 
.import-button8, .import-button9, .import-button10, .import-button11, .import-button12, .import-button13, .import-button14, .import-button15, .import-button-import {
    position: relative;
    overflow: hidden;
}

/* Pseudo-element for glow effect */
.import-button::after, .import-button1::after, .import-button2::after, .import-button-x::after,
.import-button3::after, .import-button4::after, .import-button5::after, 
.import-button6::after, .import-button7::after, .import-button8::after, 
.import-button9::after, .import-button10::after, .import-button11::after, .import-button12::after,  .import-button13::after, .import-button14::after, .import-button15::after, .import-button-import::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

/* When the button has the "loading" class, run the glow animation */
.import-button.loading::after, .import-button1.loading::after, .import-button2.loading::after, .import-button-x.loading::after,
.import-button3.loading::after, .import-button4.loading::after, .import-button5.loading::after,
.import-button6.loading::after, .import-button7.loading::after, .import-button8.loading::after,
.import-button9.loading::after, .import-button10.loading::after, .import-button11.loading::after,
.import-button12.loading::after,  .import-button13.loading::after, .import-button14.loading::after,
.import-button15.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

/* Glowing animation */
@keyframes glowFlow {
    0% { left: -100%; }
    50% { left: 0%; }
    100% { left: 100%; }
}

.handle-sync-button:hover, .apply-rules-button:hover, .apply-rules-button-checkout:hover {
    background-color: var(--sidebar-bg2);
}


.apply-rules-button-checkout {
    border: 0.5px solid #129ed9;
}

/* center the checkout button in the middle of its box its in */
.apply-rules-button-checkout {
    margin: 0 auto;
    display: block;
}

.handle-sync-button::after, .copy-rule-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }

  #handle-sync-button2::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }

/* apply-rules-button and handle-sync-button both next to each other instead of stacking */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .apply-sync-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .sync-options {
        justify-content: center;
    }
}

/* closer to each other */
.apply-sync-section {
    gap: 10px;
}

/* Validation Errors */
.validation-errors-container {
    background: var(--background-color);
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.validation-errors-container h3 {
    margin-top: 0;
    color: #f44336;
}

.validation-errors-container ul {
    list-style: none;
    padding: 0;
}

.validation-errors-container li {
    background: var(--background-color);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
}

.validation-errors-container li p {
    margin: 5px 0;
    color: #ffcccb;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .rule-management {
        width: 80%;
        margin: 0 auto;
    }
}

/* some spacing */
.rules-and-form-container {
    /* display: flex; */
    gap: 20px;
    margin-top: 20px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .rules-and-form-container {
        flex-direction: column;
        padding: 0 10px;
    }
    
    .rules-list-container, .rule-form-container {
        width: 100%;
    }
    
    .rules-list-container {
        max-height: 300px; 
    }
    
    .apply-sync-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .sync-options {
        justify-content: center;
    }
}





.subscribe-form {
    /* hide */
    /* display: none; */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    z-index: 100011212121;
}

/* on mobile, make the form correct height, and scrollable */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .subscribe-form {
        height: 100%;
        width: 100%;
        /* make sure the top doenst exceed the screen */
        top: 0;
        
        
    }
}


.subscribe-form-content {
    position: relative; /* Ensures the close button is positioned relative to the form */
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 1000px; /* Limits the width of the popup */
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .subscribe-form-content {
        max-height: 500px;
        overflow-y: auto;
    }
}


.subscribe-form.hidden {
    display: none;
}



/* Close Button */
.close-button {
    position: absolute;
    top: 13px;
    right: 13px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #333;
}

/* Title and Subtitle */
.form-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.form-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    color: #666;
}

/* Pricing Tiers */
.pricing-tiers {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pricing-tier {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tier-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: normal;
}

.tier-description {
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
}

.tier-price {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 10px;
    color: #444;
}

.tier-features {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    font-size: 14px;
    color: #555;
}

.tier-features li {
    margin-bottom: 5px;
}

/* Buttons */
.subscribe-button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.subscribe-button:hover {
    background: var(--primary-color);
}

/* Responsive Design for Mobile */



.tooltip {
    position: relative;
    /* cursor: help; */
  }
  
.tooltip .tooltiptext {
    visibility: hidden;
    width: 160px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 99;
    bottom: 125%; /* Show above the element */
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: opacity 0.2s;
  }
  
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }

/* ========== Modernized Feed Settings Container ========== */

.feed-settings-container {
    /* background: var(--chat-bg); 
    border: 1px solid #ddd; */
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    font-family: 'Manrope', sans-serif;
    color: #333;
    /* box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05); Soft outer shadow */


    /* background and border transparent and none */
    background-color: transparent !important;
    border: none !important;
  }
  
  /* Title: slightly larger, bolder, with a bottom border for emphasis */
  .feed-settings-container h3 {
    text-align: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #129ed9;     /* A modern highlight color for the title */
    border-bottom: 1px solid #eee; 
    padding-bottom: 8px; 
  }
  
  /* Optional: limit the paragraph width slightly for better readability */
  .feed-settings-container p {
    max-width: 600px;
    margin: 0 auto 16px; 
    line-height: 1.5;
    /* color: #555; */
    color: #6B7280;
  }
  
  /* The row containers remain largely the same, 
     just a bit more margin & gap for clarity */
  .settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
  }
  
  /* For 3-column or 2-column layouts on larger screens */
  @media (min-width: 769px) {
    .settings-row.three-items > div {
      flex: 1 1 calc(33.333% - 20px);
    }
    .settings-row.two-items > div {
      /* make sure they are next to each other */
        flex: 1 1 calc(50% + 20px);
    }
    .settings-row.single-item > div {
      flex: 1 1 100% !important;
    width: 100% !important;
    }
  }
  
  /* Each field-group (label+input) 
     gets a mild background, border, etc., to stand out. */
  .field-group {
    display: flex;
    align-items: center;
    gap: 8px; 
    background: var(--chat-bg); /* Slightly darker background */
    /* border: 1px solid #ddd; */
    border-radius: 6px;
    padding: 8px 10px;
    transition: background-color 0.2s ease;
  }
  

  
  /* Label text */
  .field-group label {
    cursor: default;
    font-weight: 500;
    margin: 0;
    color: #333;
  }
  
  /* Input & select styling */
  .field-group select,
  .field-group input[type="text"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    min-width: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
  }
  
  .field-group select:focus,
  .field-group input[type="text"]:focus {
    border-color: #129ed9;
    outline: none;
  }
  
  /* For checkboxes, add a bit of spacing after label text */
  .field-group input[type="checkbox"] {
    margin-left: 5px;
    cursor: pointer;
  }
  
  /* Modernize the tooltip text (already in your CSS, 
     but we can refine it for consistency) */
  .feed-settings-container .tooltip {
    position: relative;
    min-width: 100px;
  }
  
  .feed-settings-container .tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #333 !important;
    color: #fff !important;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* tooltip should appear a bit above the mouse, and have white background with a border */
    .feed-settings-container .tooltip .tooltiptext {
        bottom: 125% !important;
        background-color: var(--sidebar-bg3);
        color: #333;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 8px;
        margin-bottom: 5px;
        margin-left: 20px;
        font-size: 15px;
        font-family: 'manrope', sans-serif;
    }
  
  .feed-settings-container .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -4px); /* Slight upward shift on hover */
  }


.product-buttons h3 {
    /* color: rgba(68, 171, 215, 0.20); */
    color: #333;
    /* align left */
    text-align: left;
    /* bit margin left and botton */
    /* margin-left: 10px; */
    margin-bottom: 10px;
}



.button-container h3 {
    /* color: rgba(68, 171, 215, 0.20); */
    color: #333;
    /* align left */
    text-align: left;
    /* bit margin left and botton */
    /* margin-left: 10px; */
    margin-bottom: 10px;
    margin-top: 20px;
}



.button-container p {
    max-width: 800px;
    font-family: 'manrope', sans-serif;
}


.custom-radio.tooltip {
    max-width: 200px;
}

/* Style for the keyword insights section */
#keywordInsightsSection {
    margin-top: 20px;
    /* No fixed max-height here as it's handled by the table container */
}

/* Style for the keyword insights table */
#keywordInsightsTable table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'manrope', sans-serif; /* Nice font */
}

#keywordInsightsTable th, #keywordInsightsTable td {
    border: 1px solid #ddd;
    padding: 8px;
}

#keywordInsightsTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#keywordInsightsTable tr:hover {
    background-color: #f1f1f1;
}

#keywordInsightsTable th {
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: rgba(243, 243, 243, 0.5);
    color: #333; /* Updated text color from white to #333 */
    text-align: left;
    font-size: 14px;


}

/* Style for the chart container */
#keywordChartContainer {
    width: 100%;
    height: 400px; /* Adjust as needed */
    font-family: 'manrope', sans-serif; /* Nice font */
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (min-width: 769px) {
    #keywordInsightsTable {
        display: inline-block;
        width: 48%;
        vertical-align: top;
        max-height: 400px; /* Ensure it matches the chart's height */
    }

    #keywordChartContainer {
        display: inline-block;
        width: 48%;
        margin-left: 4%;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    #keywordInsightsTable {
        width: 100%;
        margin-bottom: 20px;
        max-height: none; /* Remove max-height on mobile to allow full height if needed */
        overflow-y: auto;  /* Keep scrollable on smaller screens */
    }

    #keywordChartContainer {
        width: 100%;
        height: 400px; /* Maintain chart height */
        margin-left: 0;
    }
}

#merchantOverviewSection {
    display: flex;
    flex-wrap: wrap;  /* so the charts can wrap to the next line on small screens */
    gap: 20px;        /* space between charts */
  }
  
#merchantOverviewSection > div {
    /* each chart container gets a max width so they appear side by side on desktop */
    flex: 1 0 45%;  /* 45% width, allows 2 side-by-side plus some margin */
    box-sizing: border-box;
}



/* Tooltip label */
.field-group label {
    cursor: default;
    font-weight: 500;
    margin: 0; /* reset margin if needed */
    color: #333;
}





#saveAutoSync {
    padding: 8px 8px;
    background-color: #129ed9;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'manrope', sans-serif;
    font-size: 13px;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}






/* Create Content Container */
.create-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    width: 95%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}
/* Create Examples Grid */
.create-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row on larger screens */
    gap: 20px; /* Spacing between cards */
    justify-items: center; /* Center cards horizontally */
}

/* Responsive Behavior */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .create-examples {
        grid-template-columns: 1fr; /* 1 card per row on smaller screens */
    }

    .create-card {
        width: 100%; /* Ensure cards take the full width */
        max-width: none; /* Override max-width if set */
    }
}

/* Example Card */
.create-card {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    
    text-align: center;
}

/* Create Button */


/* center h4 in create content */
.create-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.create-content h4 {
    margin-bottom: 10px;
}



.create-button {
    border: none;
    padding: 12px 20px;
    width: 100%;
    max-width: 110px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: color var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-hover);
    /* center text within to fint content */
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
    
    /* fit content */
    /* width: fit-content; */
}




.create-button i {
    color: var(--primary-color);
    margin-right: 10px;
}

.create-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-top: 15px; /* Optional spacing */
    margin-bottom: 15px; /* Optional spacing */
}




/* center align error-message and center its p text too */
.error-message {
    text-align: center;
    font-family: 'manrope', sans-serif;
    font-size: 16px;
    color: var(--input-text);
    margin-top: 10px;
}



/* center align  its p text too */
.error-message p {
    text-align: center;
    font-family: 'manrope', sans-serif;
    font-size: 15px;
    color: var(--input-text);
    margin-top: 10px;
}

/* Modern Toast Styling - Right Lower Corner */
.toast {
    visibility: hidden;
    min-width: 280px;
    max-width: 400px;
    background: rgba(50, 50, 50, 0.7); /* Dark semi-transparent */
    color: #fff; /* White text */
    text-align: left; /* Align text properly */
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    bottom: 20px;
    right: 20px; /* Anchored to the right */
    transform: translateY(100px); /* Initially hidden */
    z-index: 1000;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 12px; /* Space between icon & text */
    transition: opacity 0.4s, transform 0.4s ease-in-out;
}

/* Toast Icon */
.toast i {
    font-size: 18px;
    color: #00D26A; /* Success green by default */
}

/* Visible State */
.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Auto-dismiss animation */
@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Stack multiple toasts nicely */
.toast + .toast {
    margin-top: 10px;
}

/* mobile fix */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .toast {
        max-width: 100%;
        right: 0;
        left: 0;
        margin: 0 20px;
    }
}



.modal-image {
  max-width: 120px;
  max-height: 120px;
  margin: 6px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.modal-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}


.ali-description img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin: 8px 0;
  display: block;
}


@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(100% + 200px) 0;
  }
}

.product-row.shimmer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  background-size: 200px 100%;
  animation: shimmer 1s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: 6px;
}
.product-row {
  position: relative; /* required for ::before to work */
}
  
  .import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  
  .template-switcher {
    display: flex;
    align-items: center;
  }
  
  .template-switcher label {
    margin-right: 8px;
    font-weight: bold;
  }
  
  .import-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .url-import,
  .multi-url-import {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .url-import input,
  .multi-url-import textarea {
    padding: 8px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;


  }
  
  .url-import {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  
  .url-import input {
    flex: 1;
  }
  
  .multi-url-import textarea {
    resize: vertical;
    height: 80px;
  }
  

  .import-button, .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button12,  .import-button13, .import-button14, .import-button15, .import-button-import {
    position: relative;
    border: none;
    padding: 6px 10px;
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: #333;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    justify-content: center;
    font-family: 'Inter Variable', sans-serif;
    margin-top: 10px !important;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    
    /* width: 125px; */
  }


  
  .import-butt .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button13, .import-button14, .import-button15, .import-button12:hover, .import-button-import {
    background-color: var(--sidebar-bg2);
}

  
  .feed-settings {
    display: flex;
    gap: 20px;
  }
  
  .setting label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
  }
  
  .setting select {
    padding: 6px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  .template-content {
    margin-bottom: 20px;
  }
  
  .template-area {
    display: block;
  }
  
  .template-area.hidden {
    display: none;
  }
  
  .template-textarea {
    width: 100%;
    height: 100px;
    padding: 8px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
  }


  .ai-custom-templates-section {
    margin-top: 50px;
    background-color: transparent;
    width: 90%;
  }
  
  .import-preview {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
  }
  
  .import-preview-content {
    padding: 10px;
    background: var(--sidebar-bg);
    border-radius: 4px;
    min-height: 50px;
  }
  
  /* Product List / Selection Styles */
  .product-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--sidebar-bg);
    margin-bottom: 10px;
  }
  
  .select-all-row {
    padding: 10px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
  }
  
/* Modern Product Rows - Optimized Layout */
.product-row {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
  position: relative;
}

/* ⚠️ DISABLED - causing extreme flickering with 5+ images
.product-row:hover {
  border-color: #129ed9;
  box-shadow: 0 2px 8px rgba(18, 158, 217, 0.06);
}
*/

.product-row:last-child {
  margin-bottom: 16px;
}
  





/* Options Panel */
.options-panel {
    position: fixed;
    top: 10px;
    right: -400px; /* Hidden by default */
    width: 400px;
    height: 98%;
    background-color: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e6f0;
    transition: right 0.3s ease;
    z-index: 10003;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    margin-bottom: 10px;
}

/* on mobile panel full screen */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .options-panel {
        width: 100%;
        right: -100%;
        border-radius: 0;
    }
}

.options-panel.open {
    right: 0;
    transition: right 0.3s ease;
}

/* Options Header */
.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
    border-bottom: 1px solid #e1e6f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: auto;
    min-height: 70px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.options-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.options-header h3::before {
    content: '🎓';
    font-size: 24px;
}

.close-btn {
    background: #f8fafb;
    border: 1px solid #e1e6f0;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #129ed9;
    color: white;
    border-color: #129ed9;
    transform: scale(1.05);
}

.options-content {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: #ffffff;
    color: #374151;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-left: 0.5px solid #E8E8E8;
    border-right: 0.5px solid #E8E8E8;
    border-bottom: 0.5px solid #E8E8E8;
}

/* Checkbox Group - Vertical Alignment */
.checkbox-group {
    display: flex;
    flex-direction: column; /* Stack checkboxes vertically */
    align-items: flex-start; /* Align checkboxes to the start (left) */
    gap: 10px; /* Space between each checkbox-label pair */
    margin-bottom: 10px; /* Adjust as needed */
}


/* h3 in checkbox group 18 font */
.checkbox-group h3 {
    font-size: 18px;
    color: var(--text-color);
    font-family: 'manrope', sans-serif;
    margin-top: 10px;
    margin-bottom: 10px;
}



/* Billing container */
.billing-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background: var(--background-color)
  }
  
  /* Each billing card */
  .billing-card {
    background: #fff;
    border-radius: 5px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    /* less shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    width: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    /* minimal border line */
    border: 0.5px solid var(--border-color);
    font-family: 'Inter Variable', sans-serif;
  }
  
  .billing-card:hover {
    /* transform: translateY(-1px); */
    /* box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); */
    /* less shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Card Header */
  .billing-card h3 {
    font-family: 'Inter Variable', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333333e2;
    font-weight: normal;
  }
  
  /* Description & Price */
  .billing-card p {
    font-family: 'Inter Variable', sans-serif;
    margin: 4px 0;
    margin-left: 5px;
    color: #777;
  }
  
  .billing-card h4 {
    font-family: 'Inter Variable', sans-serif;
    font-size: 1.3rem;
    margin: 10px 0 4px;
    margin-left: 5px;
    color: #333333e2;
    font-weight: normal;
  }
  
  /* Feature List */
  .billing-card ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    width: 100%;
    margin-left: 30px;
  }
  
  .billing-card ul li {
    display: flex;
    align-items: center;
    font-family: 'Inter Variable', sans-serif;
    color: #555;
    margin: 6px 0;
  }
  
  .billing-card ul li i {
    color: #129ed9;
    margin-right: 8px;
  }
  
  .billing-card ul li.not-included {
    color: #bbb; /* Gray out the text */
}

.billing-card ul li.not-included span {
    text-decoration: line-through; /* Only strike through the text */
    margin-left: 7px;
}

.billing-card ul li.not-included i {
    color: #bbb; /* Keep the icon in red */
    text-decoration: none; /* Ensure the icon has no line-through */
    margin-right: 8px;
}

#ownedFeaturesContainer {
  /* max-width: 500px; */
  text-align: center;
  background-color: #ffffff;
  border-radius: 16px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  width: 400px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 0.5px solid var(--border-color);

  /* center in middle */
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  margin-bottom: 50px;

}

#ownedFeaturesContainer h4 {
  font-size: 17px;
  margin-bottom: 16px;
  color: #333;
}

.owned-feature-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  /* background: #fff; */
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.owned-feature-row span {
  font-weight: 500;
  color: #444;
}

.cancel-feature-button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #444;
  transition: background 0.2s, color 0.2s;
}

/* Card wrapper */
.modern-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 24px;
  margin-bottom: 24px;
}

/* Feed settings grid */
.feed-settings-container .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

/* Field grouping */
/* .field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
} */

/* .field-group label {
  font-weight: 500;
  color: #333;
} */

.field-group select,
.field-group input[type="text"],
.field-group input[type="checkbox"] + span {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Shipping section tweak */
.shipping-section {
  grid-column: span 2;
}

/* Rules two-column layout */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

/* Rule list pane */
.rules-list {
  max-height: 600px;
  overflow-y: auto;
}

.rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: grab;
}
.rule-item:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* Rule form pane */
.rule-form-panel .rule-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rule-form-panel .rule-form .form-group {
  display: flex;
  flex-direction: column;
}
.rule-form-panel .rule-form label {
  font-weight: 500;
}
.rule-form-panel .rule-form input,
.rule-form-panel .rule-form select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Buttons */
.btn-primary {
  background: #129ed9;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary:hover {
  background: #0f8bb8;
}

.btn-outline {
  background: transparent;
  color: #129ed9;
  border: 1px solid #129ed9;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-outline:hover {
  background: #129ed9;
  color: #fff;
}


.feature-subheadline {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  /* center in middle */
  text-align: center;
  font-family: 'Inter Variable', sans-serif;
  /* center in screen */
  margin-left: auto;
  margin-right: auto;

}

  
  /* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .billing-content {
      flex-direction: column;
      align-items: center;
    }
    .billing-card {
      width: 90%;
    }
  }



  #creditsWrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    padding: 10px 20px;
    
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: system-ui, sans-serif;
    border: 0.5px solid #ddd;
  }
  
  #creditsLabel, #autoListCreditsLabel {
    font-size: 16px;
    font-weight: 500;
    color: #333;
  }
  
  #addCreditsBtn {
    padding: 6px 12px;
    font-size: 14px;
    border: 0.5px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    cursor: pointer;
  }
/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* Info Box (fixed height) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 80px !important; /* Fixed height to avoid movement */
    /* make sure it doesnt extend where its in */
    max-width: 100% !important;
    /* center */
    margin-left: auto !important;
    margin-right: auto !important;
    /* make max width */
    max-width: 500px !important;
}

/* Button Container */
.button-container {
    margin-top: auto; /* Pushes buttons to bottom */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ensure all suggestion buttons align */
.suggestion-button {
    background-color: transparent;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: none;
    margin-top: 20px;
}

/* Ensure all connect buttons align */
.shopify-fetch-button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
}

/* Responsive - Ensure 2 in a row for tablets, 1 in mobile */
@media (max-width: 1024px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Connection Status Label (Positioned in top-right) */
.status-label {
    /* position: absolute; */
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
}


/* Not Connected State */
.status-label.not-connected {
    background-color: #d6d6d6e0;
    color: #555;
}

/* Connected State */
.status-label.connected {
    background-color: #4caf4fc4;
    color: #fff;
}

/* Checking Status */
.status-label.checking {
    background-color: #f0ac4ecb;
    color: #fff;
}

.icon-container {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: rgba(68, 171, 215, 0.2);
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}

.icon-container-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(68, 171, 215, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  width: 1.5em;
  height: 1.5em;
}



.icon-container-csv-imports {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: transparent;
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}


/* Adjust the actual icon inside */
.icon-blue {
    color: var(--button-hover) !important;
    font-size: 16px; /* Adjust icon size */
}

.icon-blue-csv-imports {
    color: var(--button-hover) !important;
    font-size: 20px; /* Adjust icon size */
    margin-bottom: 3px;
    margin-right: -3px;
}

.shopify-fetch-button {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    /* margin: 5px; */
    width: 175px !important;
    height: 44px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}

.shopify-fetch-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
.shopify-fetch-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }



.shopify-fetch-button:hover {
    background: var(--sidebar-bg2);
}

.shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}
.shopify-fetch-button2:hover {
    background: var(--sidebar-bg2);
}

#shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}


/* create-store-button */
.create-store-button {
    background-color: var(--primary-color);
    color: var(--input-text);
    border: none;
    padding: 12px 20px;
    margin: 5px 5px 5px 0;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
    width: fit-content;
    /* center the button */
    margin-left: auto;
    margin-right: auto;
    /* manrope */
    /* font-family: 'Manrope', sans-serif; */
}





.store-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* Info Box (fixed height) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 80px !important; /* Fixed height to avoid movement */
    /* make sure it doesnt extend where its in */
    max-width: 100% !important;
    /* center */
    margin-left: auto !important;
    margin-right: auto !important;
    /* make max width */
    max-width: 500px !important;
}

/* Button Container */
.button-container {
    margin-top: auto; /* Pushes buttons to bottom */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ensure all suggestion buttons align */
.suggestion-button {
    background-color: transparent;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: none;
    margin-top: 20px;
}

/* Ensure all connect buttons align */
.shopify-fetch-button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
}

/* Responsive - Ensure 2 in a row for tablets, 1 in mobile */
@media (max-width: 1024px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Connection Status Label (Positioned in top-right) */
.status-label {
    /* position: absolute; */
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
}


/* Not Connected State */
.status-label.not-connected {
    background-color: #d6d6d6e0;
    color: #555;
}

/* Connected State */
.status-label.connected {
    background-color: #4caf4fc4;
    color: #fff;
}

/* Checking Status */
.status-label.checking {
    background-color: #f0ac4ecb;
    color: #fff;
}

.icon-container {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: rgba(68, 171, 215, 0.2);
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}

.icon-container-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(68, 171, 215, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  width: 1.5em;
  height: 1.5em;
}



.icon-container-csv-imports {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: transparent;
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}


/* Adjust the actual icon inside */
.icon-blue {
    color: var(--button-hover) !important;
    font-size: 16px; /* Adjust icon size */
}

.icon-blue-csv-imports {
    color: var(--button-hover) !important;
    font-size: 20px; /* Adjust icon size */
    margin-bottom: 3px;
    margin-right: -3px;
}

.shopify-fetch-button {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    /* margin: 5px; */
    width: 175px !important;
    height: 44px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}

.shopify-fetch-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
.shopify-fetch-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }



.shopify-fetch-button:hover {
    background: var(--sidebar-bg2);
}

.shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}
.shopify-fetch-button2:hover {
    background: var(--sidebar-bg2);
}

#shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}


/* create-store-button */
.create-store-button {
    background-color: var(--primary-color);
    color: var(--input-text);
    border: none;
    padding: 12px 20px;
    margin: 5px 5px 5px 0;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
    width: fit-content;
    /* center the button */
    margin-left: auto;
    margin-right: auto;
    /* manrope */
    /* font-family: 'Manrope', sans-serif; */
}





.store-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* center texts in store-content */
.store-content h4 {
    text-align: center;
    margin-top: 20px;
}


/* Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.keyword-search-container .input-field {
    flex: 1;
    margin-left: 20px;
}

/* Input Fields */
.input-field {
    background-color: var(--input-bg);
    color: var(--input-text);
    padding: 10px;
    font-size: 16px;
    border: 0.5px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-field::placeholder {
    color: #bbb;
}

.input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

.keywordChart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.csv-display {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;  /* Switch from var(--sidebar-bg2) to white for clarity */
    border: 1px solid #ddd;  /* Light border */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* Soft outer shadow */
    font-family: 'Manrope', sans-serif; /* Use a modern font instead of monospace */
    color: #333;
    overflow-y: auto;
    width: 100%;
    max-width: 800px; /* Prevent it from being too wide */
    margin-left: auto;
    margin-right: auto;
    min-height: 425px !important;
    max-height: 600px !important;
  }

  /* #csvDisplayPreview extra margin-bottom */
  #csvDisplayPreview {
    margin-bottom: 30px;
  }
  
    /* #csvDisplayPreview extra margin-bottom */
    #csvDisplay{
      margin-bottom: 30px;
    }
    
  /* Slightly larger min-height on desktop */
  /* @media (min-width: 769px) {
    .csv-display {
      min-height: 600px;
    }
  } */

  .product-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    z-index: 99999;
    overflow-y: scroll;
    /* make it somehwat larger */
    width: 80%;

  }



  /* on mobile width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .csv-display {
      width: 100%;
      min-height: 300px;
    }
  }
  
  /* The table inside .csv-display */
  .csv-display table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Slightly bigger than default 10-12px */
  }
  
  /* Table header cells */
  .csv-display th {
    background-color: #f3f3f3;
    color: #333;
    font-weight: 500; /* Bolder text */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-family: 'Inter Variable', sans-serif;
    position: sticky; /* So header stays in place if the data scrolls */
    top: 0;
    z-index: 2; /* So it stays above the rows */
  }
  
  /* Table data cells */
  .csv-display td {
    border: 1px solid #ddd;
    padding: 10px;
    /* color: #555; Slightly lighter than #333 for data cells */
    color: #6B7280;
  }
  
  /* Optional row striping */
  .csv-display tr:nth-child(even) td {
    background-color: #fafafa; 
  }
  
  /* Hover highlight on table rows */
  .csv-display tr:hover td {
    background-color: #f0f0f0;
  }

  .csv-display tr {
    cursor: pointer; /* 👈 pointer cursor on row */
    transition: background-color 0.15s ease;
  }


/* Column Adder */
.column-adder {
    margin-top: 20px;
    margin-bottom: 35px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--sidebar-bg);
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column-adder textarea {
    min-height: 100px;
    resize: vertical;
}

.add-column-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
}

.add-column-button:hover {
    background-color: var(--suggestion-hover-bg);
}

/* Flow Overlay */
.flow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 9000;
}

.flow-content {
    text-align: center;
    padding: 30px;
    background: rgba(30, 30, 47, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.spinner-overlay {
    border: 6px solid var(--border-color);
    border-top: 6px solid var(--spinner-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.loading-dots span {
    font-size: 3rem;
    color: var(--loading-dot-color);
    animation: glow 1.2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Insights Interface */
.insights-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* For the date-range button row */
.range-buttons-insights, .range-buttons-campaigns {
    display: flex;
    gap: 10px;
    padding: 10px 0;
  }



  .range-buttons-insights button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  .range-buttons-insights button:hover {
    background-color: #e2e6ea;
  }

  /* center those buttons in the screen */
    .range-buttons-insights {
        justify-content: center;
    }


.range-buttons-campaigns button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    }
    .range-buttons-campaigns button:hover {
    background-color: #e2e6ea;
    }

/* center those buttons in the screen */
.range-buttons-campaigns {
    justify-content: center;
}

  /* Metric Cards Row */
  .insights-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 30px;
  }

  /* center the cards */
    .insights-cards-row {
        justify-content: center;
    }

  


  .insights-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 220px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
  }

  .insights-card2 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 430px;
    padding: 15px;
    /* cursor: pointer; */
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;

  }

  .insights-card:hover {
    transform: translateY(-2px);
  }
  .insights-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .insights-card-value {
    font-size: 22px;
    color: #333;
  }


  /* Instead of 'display: none', do something like: */
.insights-chart-container.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Give it a decent min-width so it can't collapse */
  #insightsChartContainer {
    visibility: visible;    /* default */
    opacity: 1;            /* default */
    pointer-events: auto;  /* default */
    width: 100%;           /* or whatever you prefer */
    min-width: 600px;      /* ensures it never shrinks too narrow */
    max-width: 800px;
    margin: 0 auto;
    /* rest of your styling */
  }
    /* Fix a stable height on the container so it doesn't grow infinitely */
.insights-chart-container {
    position: relative;     /* Chart.js needs a positioning context */
    width: 100%;            /* your desired width or max-width */
    max-width: 800px;       /* optional max width */
    height: 400px;          /* or max-height: 400px + overflow if you prefer */
    margin: 0 auto;         /* center horizontally */
    /* whichever background/border styles you like */
  }
  
  #insightsChart {
    display: block;         /* don't let it be inline */
    width: 100%;            /* fill container's width */
    height: 100%;           /* fill container's height, so it doesn't auto-expand */
  }

  .range-buttons-insights button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  
  .range-buttons-campaigns button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  

  .insights-value-row {
    display: flex;
    align-items: baseline; /* or center */
    gap: 6px;
  }
.insights-delta {
    font-size: 0.9em;   /* slightly smaller text */
    font-weight: 400;
  }
  
  .insights-delta.positive {
    color: #17a675;     /* greenish */
  }
  
  .insights-delta.negative {
    color: #c0392b;     /* redish */
  }
  

  #importSourcesContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;

}
#importSourcePie {
    /* max-width: 50%; */
    /* max-height: 400px; */
    /* center */
    margin-left: auto;
    margin-right: auto;

}


.charts-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    height: auto;
}

canvas {
    width: 100%;
    max-width: 1000px;
    height: auto;
    background-color: transparent;
    border-radius: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .charts-container {
        flex-direction: row;
        align-items: center;
        height: auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Adjusted: Changed position to relative and removed top: 0; */
.chat-header, .chat-header-3 {
    flex-shrink: 0;
    padding: 20px;
    /* background-color: var(--sidebar-bg); */
    /* background-color: rgba(68, 171, 215, 0.08); */
    background-color: transparent;
    /* border-bottom: 1px solid var(--border-color); */
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border-radius: 5px; */
    /* only border bototm */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    
    font-size: 12px;
    /* manrop */
    font-family: 'Inter Variable', sans-serif;

    /* border-top: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-left: 1px solid #E8E8E8; */
    /* only border on top, left and right */


    /* make sure the header sticky */
    /* position: sticky; */

}

/* make sure the h2 is max 60% */
/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header h2 {
        max-width: 75%;
    }
}

/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: transparent;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* Info Box (fixed height) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 80px !important; /* Fixed height to avoid movement */
    /* make sure it doesnt extend where its in */
    max-width: 100% !important;
    /* center */
    margin-left: auto !important;
    margin-right: auto !important;
    /* make max width */
    max-width: 500px !important;
}

/* Button Container */
.button-container {
    margin-top: auto; /* Pushes buttons to bottom */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ensure all suggestion buttons align */
.suggestion-button {
    background-color: transparent;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: none;
    margin-top: 20px;
}

/* Ensure all connect buttons align */
.shopify-fetch-button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
}

/* Responsive - Ensure 2 in a row for tablets, 1 in mobile */
@media (max-width: 1024px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Connection Status Label (Positioned in top-right) */
.status-label {
    /* position: absolute; */
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
}


/* Not Connected State */
.status-label.not-connected {
    background-color: #d6d6d6e0;
    color: #555;
}

/* Connected State */
.status-label.connected {
    background-color: #4caf4fc4;
    color: #fff;
}

/* Checking Status */
.status-label.checking {
    background-color: #f0ac4ecb;
    color: #fff;
}

.icon-container {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: rgba(68, 171, 215, 0.2);
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}

.icon-container-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(68, 171, 215, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  width: 1.5em;
  height: 1.5em;
}



.icon-container-csv-imports {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: transparent;
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}


/* Adjust the actual icon inside */
.icon-blue {
    color: var(--button-hover) !important;
    font-size: 16px; /* Adjust icon size */
}

.icon-blue-csv-imports {
    color: var(--button-hover) !important;
    font-size: 20px; /* Adjust icon size */
    margin-bottom: 3px;
    margin-right: -3px;
}

.shopify-fetch-button {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    /* margin: 5px; */
    width: 175px !important;
    height: 44px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}

.shopify-fetch-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
.shopify-fetch-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }



.shopify-fetch-button:hover {
    background: var(--sidebar-bg2);
}

.shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}
.shopify-fetch-button2:hover {
    background: var(--sidebar-bg2);
}

#shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}


/* create-store-button */
.create-store-button {
    background-color: var(--primary-color);
    color: var(--input-text);
    border: none;
    padding: 12px 20px;
    margin: 5px 5px 5px 0;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
    width: fit-content;
    /* center the button */
    margin-left: auto;
    margin-right: auto;
    /* manrope */
    /* font-family: 'Manrope', sans-serif; */
}





.store-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* center texts in store-content */
.store-content h4 {
    text-align: center;
    margin-top: 20px;
}


/* Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.keyword-search-container .input-field {
    flex: 1;
    margin-left: 20px;
}

/* Input Fields */
.input-field {
    background-color: var(--input-bg);
    color: var(--input-text);
    padding: 10px;
    font-size: 16px;
    border: 0.5px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-field::placeholder {
    color: #bbb;
}

.input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

.keywordChart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.csv-display {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;  /* Switch from var(--sidebar-bg2) to white for clarity */
    border: 1px solid #ddd;  /* Light border */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* Soft outer shadow */
    font-family: 'Manrope', sans-serif; /* Use a modern font instead of monospace */
    color: #333;
    overflow-y: auto;
    width: 100%;
    max-width: 800px; /* Prevent it from being too wide */
    margin-left: auto;
    margin-right: auto;
    min-height: 425px !important;
    max-height: 600px !important;
  }

  /* #csvDisplayPreview extra margin-bottom */
  #csvDisplayPreview {
    margin-bottom: 30px;
  }
  
    /* #csvDisplayPreview extra margin-bottom */
    #csvDisplay{
      margin-bottom: 30px;
    }
    
  /* Slightly larger min-height on desktop */
  /* @media (min-width: 769px) {
    .csv-display {
      min-height: 600px;
    }
  } */

  .product-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    z-index: 99999;
    overflow-y: scroll;
    /* make it somehwat larger */
    width: 80%;

  }



  /* on mobile width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .csv-display {
      width: 100%;
      min-height: 300px;
    }
  }
  
  /* The table inside .csv-display */
  .csv-display table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Slightly bigger than default 10-12px */
  }
  
  /* Table header cells */
  .csv-display th {
    background-color: #f3f3f3;
    color: #333;
    font-weight: 500; /* Bolder text */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-family: 'Inter Variable', sans-serif;
    position: sticky; /* So header stays in place if the data scrolls */
    top: 0;
    z-index: 2; /* So it stays above the rows */
  }
  
  /* Table data cells */
  .csv-display td {
    border: 1px solid #ddd;
    padding: 10px;
    /* color: #555; Slightly lighter than #333 for data cells */
    color: #6B7280;
  }
  
  /* Optional row striping */
  .csv-display tr:nth-child(even) td {
    background-color: #fafafa; 
  }
  
  /* Hover highlight on table rows */
  .csv-display tr:hover td {
    background-color: #f0f0f0;
  }

  .csv-display tr {
    cursor: pointer; /* 👈 pointer cursor on row */
    transition: background-color 0.15s ease;
  }


/* Column Adder */
.column-adder {
    margin-top: 20px;
    margin-bottom: 35px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--sidebar-bg);
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column-adder textarea {
    min-height: 100px;
    resize: vertical;
}

.add-column-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
}

.add-column-button:hover {
    background-color: var(--suggestion-hover-bg);
}

/* Flow Overlay */
.flow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 9000;
}

.flow-content {
    text-align: center;
    padding: 30px;
    background: rgba(30, 30, 47, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.spinner-overlay {
    border: 6px solid var(--border-color);
    border-top: 6px solid var(--spinner-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.loading-dots span {
    font-size: 3rem;
    color: var(--loading-dot-color);
    animation: glow 1.2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Insights Interface */
.insights-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* For the date-range button row */
.range-buttons-insights, .range-buttons-campaigns {
    display: flex;
    gap: 10px;
    padding: 10px 0;
  }



  .range-buttons-insights button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  .range-buttons-insights button:hover {
    background-color: #e2e6ea;
  }

  /* center those buttons in the screen */
    .range-buttons-insights {
        justify-content: center;
    }


.range-buttons-campaigns button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    }
    .range-buttons-campaigns button:hover {
    background-color: #e2e6ea;
    }

/* center those buttons in the screen */
.range-buttons-campaigns {
    justify-content: center;
}

  /* Metric Cards Row */
  .insights-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 30px;
  }

  /* center the cards */
    .insights-cards-row {
        justify-content: center;
    }

  


  .insights-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 220px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
  }

  .insights-card2 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 430px;
    padding: 15px;
    /* cursor: pointer; */
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;

  }

  .insights-card:hover {
    transform: translateY(-2px);
  }
  .insights-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .insights-card-value {
    font-size: 22px;
    color: #333;
  }


  /* Instead of 'display: none', do something like: */
.insights-chart-container.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Give it a decent min-width so it can't collapse */
  #insightsChartContainer {
    visibility: visible;    /* default */
    opacity: 1;            /* default */
    pointer-events: auto;  /* default */
    width: 100%;           /* or whatever you prefer */
    min-width: 600px;      /* ensures it never shrinks too narrow */
    max-width: 800px;
    margin: 0 auto;
    /* rest of your styling */
  }
    /* Fix a stable height on the container so it doesn't grow infinitely */
.insights-chart-container {
    position: relative;     /* Chart.js needs a positioning context */
    width: 100%;            /* your desired width or max-width */
    max-width: 800px;       /* optional max width */
    height: 400px;          /* or max-height: 400px + overflow if you prefer */
    margin: 0 auto;         /* center horizontally */
    /* whichever background/border styles you like */
  }
  
  #insightsChart {
    display: block;         /* don't let it be inline */
    width: 100%;            /* fill container's width */
    height: 100%;           /* fill container's height, so it doesn't auto-expand */
  }

  .range-buttons-insights button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  
  .range-buttons-campaigns button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  

  .insights-value-row {
    display: flex;
    align-items: baseline; /* or center */
    gap: 6px;
  }
.insights-delta {
    font-size: 0.9em;   /* slightly smaller text */
    font-weight: 400;
  }
  
  .insights-delta.positive {
    color: #17a675;     /* greenish */
  }
  
  .insights-delta.negative {
    color: #c0392b;     /* redish */
  }
  

  #importSourcesContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;

}
#importSourcePie {
    /* max-width: 50%; */
    /* max-height: 400px; */
    /* center */
    margin-left: auto;
    margin-right: auto;

}


.charts-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    height: auto;
}

canvas {
    width: 100%;
    max-width: 1000px;
    height: auto;
    background-color: transparent;
    border-radius: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .charts-container {
        flex-direction: row;
        align-items: center;
        height: auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Adjusted: Changed position to relative and removed top: 0; */
.chat-header, .chat-header-3 {
    flex-shrink: 0;
    padding: 20px;
    /* background-color: var(--sidebar-bg); */
    /* background-color: rgba(68, 171, 215, 0.08); */
    background-color: transparent;
    /* border-bottom: 1px solid var(--border-color); */
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border-radius: 5px; */
    /* only border bototm */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    
    font-size: 12px;
    /* manrop */
    font-family: 'Inter Variable', sans-serif;

    /* border-top: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-left: 1px solid #E8E8E8; */
    /* only border on top, left and right */


    /* make sure the header sticky */
    /* position: sticky; */

}

/* make sure the h2 is max 60% */
/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header h2 {
        max-width: 75%;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header-3 h2 {
        max-width: 75%;
    }
}

/* Allow scrolling only in the chat window */
.chat-window {
    flex-grow: 1; /* Ensure it occupies available space */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px; /* Add padding for content */
    /* background-color: var(--chat-bg); Keep the background color */
    background-color: #Fafafa;
    /* Removed max-height: 100%; */
    /* slight border */
    /* border-radius: 8px; */
    /* border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px; */


    /* border-bottom: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
}

/* Adjusted: Changed position to relative, removed bottom: 0;, added margin-top: auto; */
.chat-input-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: transparent;
    z-index: 101;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    /* border-radius: 8px; */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: 1px solid #E8E8E8;
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */

    box-sizing: border-box;
    position: relative;
    margin-top: auto;

}
/* a shadow on bottom too */
.chat-input-container {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* rounder borders */
    /* border-radius: 15px; */
}



/* chat message spacing top */
.chat-message {
    margin-top: 10px;
}

.chat-message.assistant {
    background-color: #fff;    /* even softer variant: */
    align-self: flex-start;
    color: var(--text-color);
    width: fit-content;
    max-width: 90%;
    padding: 10px 16px; /* More padding for better readability */
    border-radius: 15px; /* Smooth rounded corners */
    border-bottom-left-radius: 0;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5; /* Better line spacing */
    letter-spacing: 0.3px; /* Slightly spaced letters for readability */
    box-shadow: 0px 2px 6px rgba(122, 122, 122, 0.1); /* Soft shadow for elevation */
    border-left: 3px solid rgba(68, 171, 215, 0.25); /* Subtle left border accent */
    word-wrap: break-word;
    transition: all 0.3s ease-in-out;
}

.chat-message.user {
    background-color: rgb(227, 247, 255);
    align-self: flex-end;
    color: var(--text-color);
    text-align: right;
    margin-left: auto;
    width: fit-content;
    max-width: 85%;
    padding: 10px 16px;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    border-radius: 15px;
    border-bottom-right-radius: 0;
    line-height: 1.5;
    letter-spacing: 0.3px;
    box-shadow: 0px 2px 6px rgba(122, 122, 122, 0.1);
    transition: all 0.3s ease-in-out;
}

/* Optional: A slight fade-in animation for messages */
@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    animation: fadeInMessage 0.2s ease-in-out;
}






/* make chatbot-settings scrollable */
.chatbot-settings {
    overflow-y: auto;
}

/* Suggestions */
.chat-window .suggestion {
    background-color: #fff;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 25px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.chat-window .suggestion:hover {
    /* background-color: var(--suggestion-hover-bg); */
    transform: scale(1.015);
    /* change text color */
    /* color: var(--primary-color); */
}

.suggestion::before {
    content: "💡 ";
    margin-right: 5px;
}





/* Loading Message */
.loading-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--chat-assistant-bg);
    padding: 10px 15px;
    border-radius: 15px;
    color: var(--text-color);
}

.loading-message::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--loading-dot-color);
    border-radius: 50%;
    animation: glow 1.2s infinite;
    margin-left: 5px;
}

.loading-text {
    display: inline-block;
    color: var(--text-color);
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: text-flow 2s linear infinite;
}

@keyframes text-flow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Input Field */
.chat-input-container .input-field {
    flex-grow: 1;
    border-radius: 10px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--chat-bg);
    color: #444;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    font-family: 'Manrope', sans-serif;
}




/* make input fielf in chatbot page wider */
.chat-input-container .input-field {
    width: 80%;
}

.chat-input-container .input-field::placeholder {
    color: #bbb;
}

.chat-input-container .input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

/* Send Button */
.send-button {
    padding: 10px 16px;
    font-size: 17px;
    border-radius: 10px;
    background-color: #fff;
    color: var(--text-color);
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed), transform var(--transition-speed);
    font-family: 'Inter Variable', sans-serif;
    border: 1px solid var(--border-color);
    /* border: 1px solid var(--button-hover); */
}

.send-button:hover {
    /* background-color: rgba(68, 171, 215, 0.3); */
    background-color: var(--sidebar-bg3);
}

/* Download Button - Updated to match shopify-fetch-button styling */
.download-button {
    position: relative;
    background-color: var(--sidebar-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    margin: 20px auto 0 auto;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    max-width: 200px;
    margin-bottom: 15px;
    font-family: 'manrope', sans-serif;
}

.download-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.download-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

.download-button:hover {
    background: var(--sidebar-bg2);
}

/* Spinner for Buttons */
.spinner {
    border: 4px solid var(--sidebar-bg);
    border-top: 4px solid var(--spinner-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Responsive Adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar Overlay for Mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-speed) ease;
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }

    /* Ensure chat input and send button are side by side */
    .chat-input-container {
        flex-direction: row;
    }

    .send-button {
        margin-left: 0;
        width: auto;
    }
}

/* Further Media Queries for Extremely Small Screens */
@media (max-width: 480px) {
    /* Ensure chat input and send button remain side by side */
    .chat-input-container {
        flex-direction: row;
        gap: 10px;
    }

 
}

/* Products Header */
.products-header, .connections-header, .chatbot-header, .keywords-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    position: sticky;
    top: 0 !important;
    z-index: 100;
    height: 60px;
}

/* Background color for content sections */
.content {
    /* background-color: #fdfdfd; */
    background-color: #fafafa;
    border-radius: 10px;

    border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    /* padding: 10px; */
    border-top: 1px solid #E8E8E8;


}



.insightsInterface {
    overflow: hidden;
}

.charts-container {
    overflow-y: auto;
}

/* Chart Container */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--card-shadow);
    margin: 20px auto;
    max-width: 1200px;
    width: 95%;
    height: auto;
    min-height: 500px;
}




/* Keyword Insights Table Styling */
#keywordInsights table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#keywordInsights th, #keywordInsights td {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

#keywordInsights th {
    background-color: var(--primary-color);
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 1;
    /* less height */
    padding: 5px 5px;
    /* no space above it */
    margin-top: 0;
    /* make the height small */
    /* font manrope */
    font-family: 'manrope', sans-serif;
    font-size: 10px;
}

.info-text {
    text-align: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-color);
    /* position on bottom centre */
    /* position: sticky; */
    bottom: 0;
    z-index: 1;
    margin-top: 5px;


}

#keywordInsights tr:nth-child(even) {
    background-color: var(--chat-bg);
}

/* Add hover effect for table rows */
#keywordInsights tr:hover {
    background-color: var(--suggestion-bg);
    cursor: pointer;
}

/* Adjust Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px auto;
    max-width: 800px;
    width: 95%;
}

.keyword-search-container .input-field {
    flex: 1;
    min-width: 200px;
    padding: 5px 15px;
    /*  */
}


/* Adjusted Chat Header
.chat-header {
    padding: 10px 20px;
    margin-bottom: 10px;
} */

/* Adjust Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px auto; /* Add vertical margin */
    gap: 15px; /* Adjust spacing between elements */
    max-width: 800px;
    width: 95%;
}

.keyword-search-container .input-field {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
}

.keyword-search-container .input-field,
.keyword-search-container button {
    margin-top: 10px;
    margin-bottom: 10px;
}

.keyword-search-container button {
    width: auto; /* Adjust to content size */
    padding: 8px 12px; /* Smaller padding */
    font-size: 14px; /* Adjust font size */
    align-self: center; /* Center within the grid */
}

/* Info Text Styling */
.info-text {
    text-align: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-color);
    margin-top: 5px;
}


/* Spinner Styles */
.spinner {
    border: 4px solid var(--primary-color);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart Container Adjustments */
.chart-container canvas {
    width: 100% !important;
    height: auto !important;
}


.select2-dropdown {
    position: relative;
  }




  
  .suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
  }
  

  .suggestion {
    padding-bottom: 5px;
  }



  .chart-suggestion {
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-color);
    transition: color var(--transition-speed);
    margin-bottom: 35px;
    background-color: var(--suggestion-bg);
  }
  
  .chart-suggestion:hover {
    color: var(--primary-color);
  }





/* make chart-suggestion just like question suggestion */
.chart-suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
    /* it should take the widht of the content */
    width: fit-content;
    margin-bottom: 35px;
    /* make sure the button is centered */
    margin: 0 auto;

}   




/* Adjust SVG size and alignment */
.connection-logo {
    width: 50px; /* Smaller size */
    height: auto;
    margin: 0 auto; /* Centered by default */
}

/* Desktop: Align SVGs to the left */
/* @media (min-width: 768px) {
    .connection-item {
        flex-direction: row;
        align-items: center;
    }

    .connection-logo {
        margin: 0 15px 0 0; 
    }

    .connection-item h3,
    .connection-item .input-field,
    .connection-item .connect-button {
        text-align: left;
    }
} */

/* Mobile: SVGs centered */
/* @media (max-width: 767px) {
    .connection-item {
        flex-direction: column;
        align-items: center;
    }
} */








/* Adjust SVG size and alignment */
.connection-logo {
    width: 50px; /* Smaller size */
    height: auto;
    margin: 0 auto; /* Centered by default */
    /* bit spacing to the top */
    margin-top: 10px;
}

/* Desktop: Adjust layout */
@media (min-width: 768px) {
    .connection-item {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center elements */
    }

    .connection-logo {
        margin-bottom: 10px; /* Add space below the icon */
    }

    .connection-item h3 {
        margin-bottom: 15px; /* Add space below the title */
        text-align: center;
    }

    .connection-item .input-field {
        width: 100%; /* Full width for better responsiveness */
        max-width: 400px; /* Wider than buttons for better UX */
        margin-bottom: 15px; /* Space below the input field */
    }

    .connection-item .connect-button,
    .connection-item .expander-button,
    .connection-item .btn-primary {
        width: 100%; /* Full width of container */
        max-width: 200px; /* Smaller than input fields */
        margin: 5px 0; /* Add vertical spacing */
        text-align: center;
    }

    .expander-button {
        display: flex;
        justify-content: center; /* Center the content of the button */
        /* center */
        margin: 0 auto;

    }
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px); /* ✅ Ensures two items per row */
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* Responsive: 1 column on smaller screens */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
        max-width: 100%;
    }
}






.domainIput .domainSearchButton {
    margin: 0 auto;
    justify-content: center;
    display: flex;
}


/* Desktop Styles */
@media (min-width: 1024px) {
    .keyword-search-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns for most items */
        grid-gap: 15px; /* Space between items */
        justify-items: center;
        align-items: center;
        margin: 20px auto; /* Centered horizontally */
        max-width: 800px;
    }

    /* Titles: Full-width rows */
    .keyword-search-container h3 {
        grid-column: span 2; /* Span across both columns */
        text-align: center;
        font-size: 18px;
        margin-bottom: 10px;
        color: var(--text-color);
        margin-top: 20px;
    }

    /* Language and Location Selectors */
    #locationSelect, 
    #languageSelect {
        grid-column: span 1; /* Each occupies one column */
        width: 80%; 
    }

    /* Input and Button for Keyword Search */
    #keywordInput {
        grid-column: span 1; /* Larger input */
        flex: 2; /* Input takes more space */
        min-width: 400px; /* Ensure a reasonable size */
    }

    #keywordSearchButton {
        grid-column: span 1; /* Button beside the input */
        flex: 1;
        padding: 8px 15px; /* Smaller button */
    }

    /* Input and Button for Domain Search */
    #DomainInput {
        grid-column: span 1; /* Larger input */
        flex: 2;
        min-width: 400px;
        /* width: 100%; */
    }

    #domainSearchButton {
        grid-column: span 1; /* Button beside the input */
        flex: 1;
        padding: 8px 15px;
    }
}

/* Mobile Styles */
@media (max-width: 1023px) {
    .keyword-search-container {
        display: flex;
        flex-direction: column;
        gap: 5px;
        justify-content: center;
        align-items: center;
        margin: 20px auto;
        width: 95%; /* Full width for mobile */
    }

    /* Titles: Full-width rows */
    .keyword-search-container h3 {
        text-align: center;
        font-size: 16px;
        margin-bottom: 10px;
        color: var(--text-color);
        margin-top: 20px;
    }

    /* Language and Location Selectors */
    #locationSelect, 
    #languageSelect {
        width: 80%; /* Full width on mobile */
    }

    /* Input and Button for Keyword Search */
    #keywordInput, 
    #DomainInput {
        width: 80%;
        margin-bottom: 5px;
    }

    #keywordSearchButton, 
    #domainSearchButton {
        width: 25%; /* Smaller buttons */
    }


}

/* General Styles */
.chart-suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
    margin-bottom: 35px;
}

.chart-suggestion:hover {
    color: var(--primary-color);
}

.products-buttons {
    display: flex; /* Enables horizontal layout */
    justify-content: space-between; /* Pushes text left, button right */
    align-items: center; /* Aligns items vertically */
    width: 80%;
    max-width: 900px;
    margin:  auto;
    gap: 20px; /* Space between text & button */
}

.products-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-radius: 5px;
  width: 80%;
  max-width: 900px;
  margin: auto;
  margin-top: 50px;
  gap: 20px;
  box-sizing: border-box;
}


.products-content {
    max-width: 500px; /* Ensures text doesn't stretch too wide */
    /* margin-left: auto;  */
}

.products-buttons h3,
.products-buttons p {
    margin: 10px 0;
}

.products-buttons p {
    color: #6B7280;
}

/* Ensure only THIS button moves right */
#shopify-fetch-button1 {
    margin-left: auto; /* Pushes button to the right */
}

/* Responsive: Center button below text on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .products-buttons {
        flex-direction: column; /* Stack text & button */
        align-items: center; /* Center align */
    }

    #shopify-fetch-button1 {
        margin-left: 0; /* Reset margin */
        width: 100%; /* Optional: Make button full-width */
    }
}

/* on mobile, centre and stack the buttons */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

/* @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .products-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;

        margin: 0 auto;

    }
} */


#shopify-fetch-button1, #shopify-fetch-button2 {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    margin-top: 10px;
    /* center the button in middle */
    margin: 0 auto;
    /* small border */
    border: 1px solid var(--border-color);
    width: 125px;
}   

#shopify-fetch-button1 {
    margin-top: 50px;
}

#shopify-fetch-button3 {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}


.input-field-csv {

    padding: 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 10px;
    /* background */
    background-color: var(--input-bg);
    color: var(--input-text);
    /* font manrope */
    font-family: 'Manrope', sans-serif;
    /* pointer */
    cursor: pointer;
}



.column-adder input, .column-adder textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 10px;
    /* background */
    background-color: var(--input-bg);
    color: var(--input-text);
    /* font manrope */
    font-family: 'Manrope', sans-serif;
}

/* border input field when typing */
.column-adder input:focus, .column-adder textarea:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 5px var(--primary-color); */
}

/* make sure the column-adder h3 text is centered */
.column-adder h3 {
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: var(--text-color);
}

/* .add-store-button {
    color: #333;
    background-color: rgba(68, 171, 215, 0.2);
    font-family: 'manrope', sans-serif;
} */

/* More specific selector */
.store-form-container button.add-store-button {
  background-color: #fff !important;
  color: #444 !important;
  padding: 6px 12px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  font-family: 'Inter Variable', 'Manrope', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto; /* Keep center alignment */
}

/* Keep icon blue */
.store-form-container button.add-store-button i {
  color: #129ed9;
}

/* Hover state */
.store-form-container button.add-store-button:hover {
  background-color: #f7f7f7 !important;
}


/* make this button as wide as its text content */
.add-column-button {
    width: auto;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background var(--transition-speed);
    /* center the button */
    margin: 0 auto;
}


/* Styles for the '+' icon button */
.upload-csv-button {
    padding: 10px;
    font-size: 15px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.upload-csv-button:hover {
    color: var(--primary-color);
}

.upload-csv-button i {
    pointer-events: none;
}

.hidden {
    display: none;
}


/* make sure <div class="chat-window" id="chatWindow"> is only vertically scrollable, disable horizontal scrolling */
.chat-window {
    overflow-x: hidden;
    overflow-y: auto;


    width: 100%;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

/* On desktop, apply inner padding only to content */
@media (min-width: 768px) {
    .chat-window {
        padding-left: 5%;
        padding-right: 5%;
    }
}
    /* margin-left: 15%;
    margin-right: 15%; */


/* Apply margins only on wider screens */
/* @media (min-width: 768px) {
  .chat-window {
      margin-left: 15%;
      margin-right: 15%;
  }
} */

/* chat window user message 10 px top margin */
.chat-window .chat-message.user {
    margin-top: 10px;
}

.chatWindow .chat-message.user {
    margin-top: 10px;
}


/* Update the product-card styles */
.product-card {
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
    max-width: 700px;
    width: 85%; /* Ensure the card has a fixed width */
    max-height: 95%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
}

/* Image styling inside product-card */
.product-card img {
    width: 70%; /* Make the image fill the width of the card */
    height: 70%;
    /* border: 2px solid var(--primary-color); Add primary colored border */
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Styles for Buttons */
.product-card button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-color);
    transition: background var(--transition-speed);
}

.product-card button:hover {
    background-color: var(--button-bg);
}


/* while product card is opened, make the background blurry */
.overlay {
    backdrop-filter: blur(15px);
}

/* Loading Placeholder Animation */
@keyframes loadingAnimation {
    0% { background-position: 100% 100; }
    100% { background-position: -100% 0; }
}



/* Designer Interface Styles */
.designer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#designerImageContainer {
    margin-top: 20px;
    width: 700px;
    height: 700px;
}

.ai-enhance-prompt p {
    max-width: 500px;
    /* align center */
    margin: 0 auto;
    text-align: center;
    font-family: 'manrope', sans-serif;
    color: #6B7280;
    font-size: 15px;

}


.ai-enhance-prompt {
    max-width: 500px;
    /* center */
    /* margin: 0 auto !important; */
    text-align: center;
    font-family: 'manrope', sans-serif;
    margin-bottom: 30px;
    margin-top: 20px;
}


#designerImageContainer img {
    max-width: 100%;
    border-radius: 10px;
    /* center in its container/section */
    margin: 0 auto;
    display: block;

}




/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

/* Image Editor Canvas */
.image-editor-canvas {
    cursor: url('eraser-cursor.png'), auto; /* Customize cursor if desired */
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Adjust Sidebar Menu Item Icon */

/* Adjustments for the New Menu Item */
.menu-item i.fa-paint-brush {
    font-size: 16px;
}


/* Ensure icons have the correct weight */
.far, .fa-regular {
    font-weight: 400;
}

/* Apply colors */

/* i.fa-comment { color: #33b5e5 !important; } /* Blue */
/* i.fa-link { color: #f44336 !important; } Red */

/* i.fa-tag { color: #9c27b0 !important; } Purple */
/* i.fa-cart-shopping { color: #ff9800 !important; } Orange */
/* i.fa-chart-line { color: #4caf50 !important; } Green */ */
/* i.fa-credit-card { color: rgb(244, 105, 54) !important; } Red-Orange */

/* fa-store purple */
/* i.fa-store { color: #9c27b0 !important; } */




/* Buttons container inside product-card */
.product-card .buttons-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Styling for additional thumbnails */
.additional-images-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
    
}

/* max height on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .product-card {
        max-height: 660px;
        overflow-y: auto;
    }
}

.additional-images-container .thumbnail {
    width: 60px;
    height: auto;
    cursor: pointer;
    border: 2px solid transparent; /* Default border */
    border-radius: 5px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

/* Highlight the selected thumbnail */
.additional-images-container .thumbnail.selected {
    border-color: var(--primary-color);
    transform: scale(1.1); /* Slightly enlarge the selected thumbnail */
}

/* Add hover effect for thumbnails */
.additional-images-container .thumbnail:hover {
    border-color: var(--button-hover);
}





.loading-overlay {
    animation: glowingEffect 1.5s infinite;
    /* place  */
}

@keyframes glowingEffect {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}






.chatbot-customization {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    /* background-color: #f9f9f9; */
    border-radius: 10px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    font-family: 'manrope', sans-serif;
    /* margin left and right */
}

/* on desktop */
@media (min-width: 768px) {
    .chatbot-customization {
        width: 80%;
        margin: 0 auto;
    }
}


.customization-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.customization-row label {
    flex: 1;
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    /* color: #333; */
}

.customization-row .input-field {
    flex: 2;
    /* padding: 8px; */
    /* border: 1px solid #ddd; */
    /* border-radius: 5px; */
    /* font-size: 14px; */
}

.customization-row .input-field[type="color"] {
    padding: 0;
    height: 35px;
    width: 60px;
    cursor: pointer;
}



@media screen and (max-width: 768px) {
    .customization-row {
        flex-direction: column;
        align-items: flex-start;
    }

    /* customization input fields with text (not color) 90% width */
    .customization-row .input-field[type="text"] {
        width: 90%;
    }

    .customization-row label {
        min-width: unset;
        flex: unset;
    }

    .shopify-fetch-button {
        align-self: center;
        width: 100%;
    }
}


.nice-button {
    position: relative; 
    border: none;
    padding: 12px 20px;
    margin: 8px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}


.sidebar-header-store {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 14px;
}



/* alignt items above each other */
.store-display {
    /* display: flex; */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* gap: 20px; */
    /* margin-top: 10px; */
    padding: 12px 20px;
}

.form-subtitle {
    font-size: 1.1em;
    margin: 10px 0;
    font-family: 'manrope', sans-serif;
}

.highlight-word {
    font-weight: 550;
    transition: color 0.3s ease;
    /* italic */
}

/* no italic */
.options-content {
    font-style: normal;
}

.options-content p {
    font-style: normal;
}

.options-content h4 {
    font-style: normal;
    /* no bold */
    font-weight: 600;
}

.options-content h3 {
    font-style: normal;
}

.store-name-settings {
    font-style: normal;
}


/* logo max width */
.subscribe-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    margin-top: 20px;
}


.store-form-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    background: var(--sidebar-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.store-form-container h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.store-form-container h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-form-container .icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(18, 158, 217, 0.1);
    border-radius: 8px;
}

.store-form-container input[type="text"],
.store-form-container textarea,
.store-form-container select {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--input-bg);
    color: var(--input-text);
    font-family: 'Inter Variable', sans-serif;
    width: 100%;
}

.store-form-container input[type="text"]:focus,
.store-form-container textarea:focus,
.store-form-container select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1);
}

.store-form-container button {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: 'Inter Variable', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.store-form-container button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-1px);
}

.store-form-container button i {
    font-size: 16px;
}

.store-form-container textarea {
    height: 125px;
}

.store-form-container h4 {
    text-align: left;
    font-family: 'manrope', sans-serif;
    /* font-size: 16px; */
    color: var(--text-color);
    margin-bottom: 5px;
}

.store-form-container h3 {
    text-align: center;
    margin-bottom: 5px;
}

.store-content h3 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 20px;
}



.store-dropdown {
    /* /* position: absolute; */
    top: 100%;
    left: 0; 
    width: 100%;
    background-color: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(18,158,217,0.07) !important;
    border: 1.5px solid #e8eef5 !important;
    padding: 12px 0 !important;
    margin-top: 6px !important;
    min-width: 220px !important;
    max-width: 260px !important;
    font-family: 'Inter Variable', 'Manrope', sans-serif !important;
    z-index: 10002 !important;
    /* display: none; */
    color: var(--sidebar-bg);
    width: 225px;
    margin-top: 2px;
    /* rounded borders */
    border-radius: 5px;
    /* center it */
    margin: 0 auto;
    /* spac etop */
    margin-top: 3px;
    /* height: fit-content; */
    max-height: 300px;
    min-height: 100px;
    overflow-y: auto;
    border: 0.5px solid var(--border-color);
}



.button-chatbot-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* on desktop */
@media (min-width: 768px) {
    .button-chatbot-container {
        width: 80%;
        margin: 0 auto;
    }
}











/* Rule Management Section */
.rule-management {
    margin: 20px 0;
    color: #fff;
    margin-top: 20px !important;
}

.rule-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    width: 80%;
}

.rule-form.hidden {
    display: none;
}

.rule-condition,
.rule-action {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rule-select {
    margin: 0 5px;
    padding: 5px;
    color: var(--text-color);
}

.rule-input {
    margin-left: 5px;
    padding: 5px;
    color: var(--text-color);
}

/* Buttons */
.add-rule-button,
.apply-rules-button,
.apply-rules-button-checkout,
.save-rule-button,
.cancel-rule-button,
.edit-rule-button {
    margin: 5px;
    padding: 6px 10px;
    background-color: #129ed9;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* 
.apply-rules-button:hover,
.save-rule-button:hover,
.cancel-rule-button:hover,
.edit-rule-button:hover {
    background-color: var(--button-bg);
} */


.add-rule-button:hover {
    background-color: var(--sidebar-bg2)
}

.delete-rule-button {
    margin: 5px;
    padding: 10px 15px;
    color: #129ed9;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* center the delete button */
.delete-rule-button {
    margin: 0 auto;
    display: block;
}

/* Container Layout */


.rules-list-container {
    flex: 1 1 45%;
    max-height: 660px;
    overflow-y: auto;
    background: var(--sidebar-bg2);
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 40px;
}

.rule-form-container {
    flex: 1 1 45%;
    /* background: var(--sidebar-bg); */
    border-radius: 10px;
    padding: 5px;
    color: #333;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 20px;
}

.button-container p {
    /* color: #333; */
    color: #333333ce;
}



/* Rules List Items */
.rule-item {
    background: var(--suggestion-bg);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none; /* Standard syntax */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE10+/Edge */
}

.rule-item:hover {
    background: var(--suggestion-hover-bg);
}

/* Divider Line */
.rule-item:not(:last-child) {
    border-bottom: 1px solid rgba(14, 13, 13, 0.1);
}

/* Change cursor during dragging */
.rule-item:active {
    cursor: grabbing;
}

/* Optional: Style for the drag handle */
.rule-handle {
    margin-right: 10px;
    cursor: pointer;
}


/* same for removeShippingRow */
.removeShippingRow {
    /* margin-top: 10px; */
    padding: 6px 10px;
    color: #333;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}



/* Rule Form */
.rule-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--chat-bg);
    border-radius: 8px;
    width: 100%;
    max-width: none;
    border: 1px solid var(--border-color);
}

.input[type="radio" i] {
    background-color: var(--primary-color);
    color: var(--primary-color);
}

/* when active */
.input[type="radio" i]:checked {
    background-color: var(--primary-color);
    color: var(--primary-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #ffffff;
}

.rule-condition, .rule-action {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rule-select, .rule-input {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #959393;
    background: var(--background-color);
    color: #333;
    min-width: 120px;
}

.rule-select:focus, .rule-input:focus {
    border-color: #129ed9;
    outline: none;
}

.action-field-container.hidden, #actionValueContainer.hidden, #replaceTextContainer.hidden {
    display: none;
}

.rule-scope {
    margin: 15px 0;
    color: #333;
    font-family: 'manrope', sans-serif;
    font-size: 14px;
}

.rule-scope label {
    margin-right: 15px;
    cursor: pointer;
}

.button-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px !important;
  justify-content: center;

  margin: 0;
}

/* Optional: adjust button width for stacking on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .button-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .button-bar button {
    width: 100%;
  }
}


#copyRulesList {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background-color: #fafafa;
}

/* Optional: scrollbar styling */
#copyRulesList::-webkit-scrollbar {
  width: 6px;
}
#copyRulesList::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.15);
  border-radius: 4px;
}







.add-rule-button, .add-column-button, .save-rule-button, .copy-rule-button, .cancel-rule-button, .apply-rules-button, .apply-rules-button-checkout, .handle-sync-button {
    padding: 6px 10px;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    font-family: 'manrope', sans-serif;
    font-size: 14px;
    border: none;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

/* save-rule-button white text */
.save-rule-button, .copy-rule-button {
    color: #fff;
    border: none;
}

.cancel-rule-button {
    border: none;
}





.add-rule-button, .apply-rules-button, .apply-rules-button-checkout, .handle-sync-button {
    background: #129ed9;
}

.apply-rules-button:hover, .apply-rules-button-checkout:hover, .handle-sync-button:hover {
    background: var(--sidebar-bg2);
}

/* center on middle horizontally */
.add-rule-button {
    margin: 0 auto;
}

.add-rule-button, .handle-sync-button {
    position: relative; 
    border: none;
    padding: 6px 10px !important;
    margin: 8px 20px;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}

.apply-rules-button, .apply-rules-button-checkout {
    /* position: relative;  */
    border: none;
    padding: 6px 10px;
    margin: 8px 20px;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}





.cancel-rule-button {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 12px;
}


/* Apply and Sync Buttons */
.apply-sync-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.sync-options {
    display: flex;
    gap: 15px;
}

.custom-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

.handle-sync-button {
    /* position: relative;  */
    border: none;
    padding: 6px 10px;
    margin: 8px 20px;
    width: 200px !important;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}

.handle-sync-button {
    margin-right: 0px;
}

.copy-rule-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.copy-rule-item input[type="checkbox"] {
  margin-top: 5px;
  flex-shrink: 0;
}

.copy-rule-item label {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  font-family: Inter, sans-serif;
}


.handle-sync-button.loading::after, .copy-rule-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }


/* Glowing effect for import buttons */
.import-button, .import-button1, .import-button2, .import-button3, .import-button-x,
.import-button4, .import-button5, .import-button6, .import-button7, 
.import-button8, .import-button9, .import-button10, .import-button11, .import-button12, .import-button13, .import-button14, .import-button15, .import-button-import {
    position: relative;
    overflow: hidden;
}

/* Pseudo-element for glow effect */
.import-button::after, .import-button1::after, .import-button2::after, .import-button-x::after,
.import-button3::after, .import-button4::after, .import-button5::after, 
.import-button6::after, .import-button7::after, .import-button8::after, 
.import-button9::after, .import-button10::after, .import-button11::after, .import-button12::after,  .import-button13::after, .import-button14::after, .import-button15::after, .import-button-import::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

/* When the button has the "loading" class, run the glow animation */
.import-button.loading::after, .import-button1.loading::after, .import-button2.loading::after, .import-button-x.loading::after,
.import-button3.loading::after, .import-button4.loading::after, .import-button5.loading::after,
.import-button6.loading::after, .import-button7.loading::after, .import-button8.loading::after,
.import-button9.loading::after, .import-button10.loading::after, .import-button11.loading::after,
.import-button12.loading::after,  .import-button13.loading::after, .import-button14.loading::after,
.import-button15.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

/* Glowing animation */
@keyframes glowFlow {
    0% { left: -100%; }
    50% { left: 0%; }
    100% { left: 100%; }
}

.handle-sync-button:hover, .apply-rules-button:hover, .apply-rules-button-checkout:hover {
    background-color: var(--sidebar-bg2);
}


.apply-rules-button-checkout {
    border: 0.5px solid #129ed9;
}

/* center the checkout button in the middle of its box its in */
.apply-rules-button-checkout {
    margin: 0 auto;
    display: block;
}

.handle-sync-button::after, .copy-rule-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }

  #handle-sync-button2::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }

/* apply-rules-button and handle-sync-button both next to each other instead of stacking */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .apply-sync-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .sync-options {
        justify-content: center;
    }
}

/* closer to each other */
.apply-sync-section {
    gap: 10px;
}

/* Validation Errors */
.validation-errors-container {
    background: var(--background-color);
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.validation-errors-container h3 {
    margin-top: 0;
    color: #f44336;
}

.validation-errors-container ul {
    list-style: none;
    padding: 0;
}

.validation-errors-container li {
    background: var(--background-color);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
}

.validation-errors-container li p {
    margin: 5px 0;
    color: #ffcccb;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .rule-management {
        width: 80%;
        margin: 0 auto;
    }
}

/* some spacing */
.rules-and-form-container {
    /* display: flex; */
    gap: 20px;
    margin-top: 20px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .rules-and-form-container {
        flex-direction: column;
        padding: 0 10px;
    }
    
    .rules-list-container, .rule-form-container {
        width: 100%;
    }
    
    .rules-list-container {
        max-height: 300px; 
    }
    
    .apply-sync-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .sync-options {
        justify-content: center;
    }
}





.subscribe-form {
    /* hide */
    /* display: none; */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    z-index: 100011212121;
}

/* on mobile, make the form correct height, and scrollable */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .subscribe-form {
        height: 100%;
        width: 100%;
        /* make sure the top doenst exceed the screen */
        top: 0;
        
        
    }
}


.subscribe-form-content {
    position: relative; /* Ensures the close button is positioned relative to the form */
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 1000px; /* Limits the width of the popup */
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .subscribe-form-content {
        max-height: 500px;
        overflow-y: auto;
    }
}


.subscribe-form.hidden {
    display: none;
}



/* Close Button */
.close-button {
    position: absolute;
    top: 13px;
    right: 13px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #333;
}

/* Title and Subtitle */
.form-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.form-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    color: #666;
}

/* Pricing Tiers */
.pricing-tiers {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pricing-tier {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tier-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: normal;
}

.tier-description {
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
}

.tier-price {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 10px;
    color: #444;
}

.tier-features {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    font-size: 14px;
    color: #555;
}

.tier-features li {
    margin-bottom: 5px;
}

/* Buttons */
.subscribe-button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.subscribe-button:hover {
    background: var(--primary-color);
}

/* Responsive Design for Mobile */



.tooltip {
    position: relative;
    /* cursor: help; */
  }
  
.tooltip .tooltiptext {
    visibility: hidden;
    width: 160px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 99;
    bottom: 125%; /* Show above the element */
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: opacity 0.2s;
  }
  
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }

/* ========== Modernized Feed Settings Container ========== */

.feed-settings-container {
    /* background: var(--chat-bg); 
    border: 1px solid #ddd; */
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    font-family: 'Manrope', sans-serif;
    color: #333;
    /* box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05); Soft outer shadow */


    /* background and border transparent and none */
    background-color: transparent !important;
    border: none !important;
  }
  
  /* Title: slightly larger, bolder, with a bottom border for emphasis */
  .feed-settings-container h3 {
    text-align: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #129ed9;     /* A modern highlight color for the title */
    border-bottom: 1px solid #eee; 
    padding-bottom: 8px; 
  }
  
  /* Optional: limit the paragraph width slightly for better readability */
  .feed-settings-container p {
    max-width: 600px;
    margin: 0 auto 16px; 
    line-height: 1.5;
    /* color: #555; */
    color: #6B7280;
  }
  
  /* The row containers remain largely the same, 
     just a bit more margin & gap for clarity */
  .settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
  }
  
  /* For 3-column or 2-column layouts on larger screens */
  @media (min-width: 769px) {
    .settings-row.three-items > div {
      flex: 1 1 calc(33.333% - 20px);
    }
    .settings-row.two-items > div {
      /* make sure they are next to each other */
        flex: 1 1 calc(50% + 20px);
    }
    .settings-row.single-item > div {
      flex: 1 1 100% !important;
    width: 100% !important;
    }
  }
  
  /* Each field-group (label+input) 
     gets a mild background, border, etc., to stand out. */
  .field-group {
    display: flex;
    align-items: center;
    gap: 8px; 
    background: var(--chat-bg); /* Slightly darker background */
    /* border: 1px solid #ddd; */
    border-radius: 6px;
    padding: 8px 10px;
    transition: background-color 0.2s ease;
  }
  

  
  /* Label text */
  .field-group label {
    cursor: default;
    font-weight: 500;
    margin: 0;
    color: #333;
  }
  
  /* Input & select styling */
  .field-group select,
  .field-group input[type="text"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    min-width: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
  }
  
  .field-group select:focus,
  .field-group input[type="text"]:focus {
    border-color: #129ed9;
    outline: none;
  }
  
  /* For checkboxes, add a bit of spacing after label text */
  .field-group input[type="checkbox"] {
    margin-left: 5px;
    cursor: pointer;
  }
  
  /* Modernize the tooltip text (already in your CSS, 
     but we can refine it for consistency) */
  .feed-settings-container .tooltip {
    position: relative;
    min-width: 100px;
  }
  
  .feed-settings-container .tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #333 !important;
    color: #fff !important;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* tooltip should appear a bit above the mouse, and have white background with a border */
    .feed-settings-container .tooltip .tooltiptext {
        bottom: 125% !important;
        background-color: var(--sidebar-bg3);
        color: #333;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 8px;
        margin-bottom: 5px;
        margin-left: 20px;
        font-size: 15px;
        font-family: 'manrope', sans-serif;
    }
  
  .feed-settings-container .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -4px); /* Slight upward shift on hover */
  }


.product-buttons h3 {
    /* color: rgba(68, 171, 215, 0.20); */
    color: #333;
    /* align left */
    text-align: left;
    /* bit margin left and botton */
    /* margin-left: 10px; */
    margin-bottom: 10px;
}



.button-container h3 {
    /* color: rgba(68, 171, 215, 0.20); */
    color: #333;
    /* align left */
    text-align: left;
    /* bit margin left and botton */
    /* margin-left: 10px; */
    margin-bottom: 10px;
    margin-top: 20px;
}



.button-container p {
    max-width: 800px;
    font-family: 'manrope', sans-serif;
}


.custom-radio.tooltip {
    max-width: 200px;
}

/* Style for the keyword insights section */
#keywordInsightsSection {
    margin-top: 20px;
    /* No fixed max-height here as it's handled by the table container */
}

/* Style for the keyword insights table */
#keywordInsightsTable table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'manrope', sans-serif; /* Nice font */
}

#keywordInsightsTable th, #keywordInsightsTable td {
    border: 1px solid #ddd;
    padding: 8px;
}

#keywordInsightsTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#keywordInsightsTable tr:hover {
    background-color: #f1f1f1;
}

#keywordInsightsTable th {
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: rgba(243, 243, 243, 0.5);
    color: #333; /* Updated text color from white to #333 */
    text-align: left;
    font-size: 14px;


}

/* Style for the chart container */
#keywordChartContainer {
    width: 100%;
    height: 400px; /* Adjust as needed */
    font-family: 'manrope', sans-serif; /* Nice font */
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (min-width: 769px) {
    #keywordInsightsTable {
        display: inline-block;
        width: 48%;
        vertical-align: top;
        max-height: 400px; /* Ensure it matches the chart's height */
    }

    #keywordChartContainer {
        display: inline-block;
        width: 48%;
        margin-left: 4%;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    #keywordInsightsTable {
        width: 100%;
        margin-bottom: 20px;
        max-height: none; /* Remove max-height on mobile to allow full height if needed */
        overflow-y: auto;  /* Keep scrollable on smaller screens */
    }

    #keywordChartContainer {
        width: 100%;
        height: 400px; /* Maintain chart height */
        margin-left: 0;
    }
}

#merchantOverviewSection {
    display: flex;
    flex-wrap: wrap;  /* so the charts can wrap to the next line on small screens */
    gap: 20px;        /* space between charts */
  }
  
#merchantOverviewSection > div {
    /* each chart container gets a max width so they appear side by side on desktop */
    flex: 1 0 45%;  /* 45% width, allows 2 side-by-side plus some margin */
    box-sizing: border-box;
}



/* Tooltip label */
.field-group label {
    cursor: default;
    font-weight: 500;
    margin: 0; /* reset margin if needed */
    color: #333;
}





#saveAutoSync {
    padding: 8px 8px;
    background-color: #129ed9;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'manrope', sans-serif;
    font-size: 13px;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}






/* Create Content Container */
.create-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    width: 95%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}
/* Create Examples Grid */
.create-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row on larger screens */
    gap: 20px; /* Spacing between cards */
    justify-items: center; /* Center cards horizontally */
}

/* Responsive Behavior */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .create-examples {
        grid-template-columns: 1fr; /* 1 card per row on smaller screens */
    }

    .create-card {
        width: 100%; /* Ensure cards take the full width */
        max-width: none; /* Override max-width if set */
    }
}

/* Example Card */
.create-card {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    
    text-align: center;
}

/* Create Button */


/* center h4 in create content */
.create-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.create-content h4 {
    margin-bottom: 10px;
}



.create-button {
    border: none;
    padding: 12px 20px;
    width: 100%;
    max-width: 110px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: color var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-hover);
    /* center text within to fint content */
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
    
    /* fit content */
    /* width: fit-content; */
}




.create-button i {
    color: var(--primary-color);
    margin-right: 10px;
}

.create-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-top: 15px; /* Optional spacing */
    margin-bottom: 15px; /* Optional spacing */
}




/* center align error-message and center its p text too */
.error-message {
    text-align: center;
    font-family: 'manrope', sans-serif;
    font-size: 16px;
    color: var(--input-text);
    margin-top: 10px;
}



/* center align  its p text too */
.error-message p {
    text-align: center;
    font-family: 'manrope', sans-serif;
    font-size: 15px;
    color: var(--input-text);
    margin-top: 10px;
}

/* Modern Toast Styling - Right Lower Corner */
.toast {
    visibility: hidden;
    min-width: 280px;
    max-width: 400px;
    background: rgba(50, 50, 50, 0.7); /* Dark semi-transparent */
    color: #fff; /* White text */
    text-align: left; /* Align text properly */
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    bottom: 20px;
    right: 20px; /* Anchored to the right */
    transform: translateY(100px); /* Initially hidden */
    z-index: 1000;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 12px; /* Space between icon & text */
    transition: opacity 0.4s, transform 0.4s ease-in-out;
}

/* Toast Icon */
.toast i {
    font-size: 18px;
    color: #00D26A; /* Success green by default */
}

/* Visible State */
.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Auto-dismiss animation */
@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Stack multiple toasts nicely */
.toast + .toast {
    margin-top: 10px;
}

/* mobile fix */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .toast {
        max-width: 100%;
        right: 0;
        left: 0;
        margin: 0 20px;
    }
}



.modal-image {
  max-width: 120px;
  max-height: 120px;
  margin: 6px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.modal-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}


.ali-description img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin: 8px 0;
  display: block;
}


@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(100% + 200px) 0;
  }
}

.product-row.shimmer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  background-size: 200px 100%;
  animation: shimmer 1s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: 6px;
}
.product-row {
  position: relative; /* required for ::before to work */
}
  
  .import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  
  .template-switcher {
    display: flex;
    align-items: center;
  }
  
  .template-switcher label {
    margin-right: 8px;
    font-weight: bold;
  }
  
  .import-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .url-import,
  .multi-url-import {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .url-import input,
  .multi-url-import textarea {
    padding: 8px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;


  }
  
  .url-import {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  
  .url-import input {
    flex: 1;
  }
  
  .multi-url-import textarea {
    resize: vertical;
    height: 80px;
  }
  

  .import-button, .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button12,  .import-button13, .import-button14, .import-button15, .import-button-import {
    position: relative;
    border: none;
    padding: 6px 10px;
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: #333;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    justify-content: center;
    font-family: 'Inter Variable', sans-serif;
    margin-top: 10px !important;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    
    /* width: 125px; */
  }


  
  .import-butt .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button13, .import-button14, .import-button15, .import-button12:hover, .import-button-import {
    background-color: var(--sidebar-bg2);
}

  
  .feed-settings {
    display: flex;
    gap: 20px;
  }
  
  .setting label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
  }
  
  .setting select {
    padding: 6px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  .template-content {
    margin-bottom: 20px;
  }
  
  .template-area {
    display: block;
  }
  
  .template-area.hidden {
    display: none;
  }
  
  .template-textarea {
    width: 100%;
    height: 100px;
    padding: 8px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
  }


  .ai-custom-templates-section {
    margin-top: 50px;
    background-color: transparent;
    width: 90%;
  }
  
  .import-preview {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
  }
  
  .import-preview-content {
    padding: 10px;
    background: var(--sidebar-bg);
    border-radius: 4px;
    min-height: 50px;
  }
  
  /* Product List / Selection Styles */
  .product-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--sidebar-bg);
    margin-bottom: 10px;
  }
  
  .select-all-row {
    padding: 10px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
  }
  
  .product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .product-row:last-child {
    border-bottom: none;
  }
  





/* Options Panel */
.options-panel {
    position: fixed;
    top: 10px; /* Adjusted to the earliest definition */
    right: -400px; /* Hidden by default */
    width: 400px;
    height: 98%; /* Adjust height */
    background-color: var(--sidebar-bg);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.01);
    transition: right 0.3 ease;
    z-index: 10003; /* Above sidebar */
    display: flex;
    flex-direction: column;
    border-radius: 10px; /* Slightly rounded corners */
    margin-bottom: 10px;
    
}

/* on mobile panel full screen */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .options-panel {
        width: 100%;
        right: -100%;
    }
}

.options-panel.open {
    /* Slide in when open  */
    right: 0;
    /* faster */
    transition: right 0.3s ease;
}

/* Options Header */
.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px;
    background-color: var(--sidebar-bg2);
    /* border-bottom: 0.5px solid var(--border-color); */
    /* slight shadow bottom */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    height: 65px;
    /* border-radius: 8px; */
    /* radius only top left */
    border-top-left-radius: 8px;
}

.options-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-family: 'Inter Variable', sans-serif;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
}

.options-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    /* margin-bottom: 10px; */
    background-color: #FDFDFD;
    padding-top: 5px;
    color: var(--primary-color);
    /* margin-bottom: 10px; */
    /* border-bottom: 1px solid var(--border-color); */
    /* rounded borders on bottom, and border */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-left: 0.5px solid #E8E8E8;
    border-right: 0.5px solid #E8E8E8;
    border-bottom: 0.5px solid #E8E8E8;
}

/* Checkbox Group - Vertical Alignment */
.checkbox-group {
    display: flex;
    flex-direction: column; /* Stack checkboxes vertically */
    align-items: flex-start; /* Align checkboxes to the start (left) */
    gap: 10px; /* Space between each checkbox-label pair */
    margin-bottom: 10px; /* Adjust as needed */
}


/* h3 in checkbox group 18 font */
.checkbox-group h3 {
    font-size: 18px;
    color: var(--text-color);
    font-family: 'manrope', sans-serif;
    margin-top: 10px;
    margin-bottom: 10px;
}



/* Billing container */
.billing-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background: var(--background-color)
  }
  
  /* Each billing card */
  .billing-card {
    background: #fff;
    border-radius: 5px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    /* less shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    width: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    /* minimal border line */
    border: 0.5px solid var(--border-color);
    font-family: 'Inter Variable', sans-serif;
  }
  
  .billing-card:hover {
    /* transform: translateY(-1px); */
    /* box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); */
    /* less shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Card Header */
  .billing-card h3 {
    font-family: 'Inter Variable', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333333e2;
    font-weight: normal;
  }
  
  /* Description & Price */
  .billing-card p {
    font-family: 'Inter Variable', sans-serif;
    margin: 4px 0;
    margin-left: 5px;
    color: #777;
  }
  
  .billing-card h4 {
    font-family: 'Inter Variable', sans-serif;
    font-size: 1.3rem;
    margin: 10px 0 4px;
    margin-left: 5px;
    color: #333333e2;
    font-weight: normal;
  }
  
  /* Feature List */
  .billing-card ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    width: 100%;
    margin-left: 30px;
  }
  
  .billing-card ul li {
    display: flex;
    align-items: center;
    font-family: 'Inter Variable', sans-serif;
    color: #555;
    margin: 6px 0;
  }
  
  .billing-card ul li i {
    color: #129ed9;
    margin-right: 8px;
  }
  
  .billing-card ul li.not-included {
    color: #bbb; /* Gray out the text */
}

.billing-card ul li.not-included span {
    text-decoration: line-through; /* Only strike through the text */
    margin-left: 7px;
}

.billing-card ul li.not-included i {
    color: #bbb; /* Keep the icon in red */
    text-decoration: none; /* Ensure the icon has no line-through */
    margin-right: 8px;
}

#ownedFeaturesContainer {
  /* max-width: 500px; */
  text-align: center;
  background-color: #ffffff;
  border-radius: 16px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  width: 400px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 0.5px solid var(--border-color);

  /* center in middle */
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  margin-bottom: 50px;

}

#ownedFeaturesContainer h4 {
  font-size: 17px;
  margin-bottom: 16px;
  color: #333;
}

.owned-feature-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  /* background: #fff; */
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.owned-feature-row span {
  font-weight: 500;
  color: #444;
}

.cancel-feature-button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #444;
  transition: background 0.2s, color 0.2s;
}

/* Card wrapper */
.modern-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 24px;
  margin-bottom: 24px;
}

/* Feed settings grid */
.feed-settings-container .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

/* Field grouping */
/* .field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
} */

/* .field-group label {
  font-weight: 500;
  color: #333;
} */

.field-group select,
.field-group input[type="text"],
.field-group input[type="checkbox"] + span {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Shipping section tweak */
.shipping-section {
  grid-column: span 2;
}

/* Rules two-column layout */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

/* Rule list pane */
.rules-list {
  max-height: 600px;
  overflow-y: auto;
}

.rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: grab;
}
.rule-item:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* Rule form pane */
.rule-form-panel .rule-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rule-form-panel .rule-form .form-group {
  display: flex;
  flex-direction: column;
}
.rule-form-panel .rule-form label {
  font-weight: 500;
}
.rule-form-panel .rule-form input,
.rule-form-panel .rule-form select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Buttons */
.btn-primary {
  background: #129ed9;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary:hover {
  background: #0f8bb8;
}

.btn-outline {
  background: transparent;
  color: #129ed9;
  border: 1px solid #129ed9;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-outline:hover {
  background: #129ed9;
  color: #fff;
}


.feature-subheadline {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  /* center in middle */
  text-align: center;
  font-family: 'Inter Variable', sans-serif;
  /* center in screen */
  margin-left: auto;
  margin-right: auto;

}

  
  /* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .billing-content {
      flex-direction: column;
      align-items: center;
    }
    .billing-card {
      width: 90%;
    }
  }



  #creditsWrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    padding: 10px 20px;
    
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: system-ui, sans-serif;
    border: 0.5px solid #ddd;
  }
  
  #creditsLabel, #autoListCreditsLabel {
    font-size: 16px;
    font-weight: 500;
    color: #333;
  }
  
  #addCreditsBtn {
    padding: 6px 12px;
    font-size: 14px;
    border: 0.5px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    cursor: pointer;
  }
/* CSS Variables for Dark Theme */
:root {
    --background-color: #fdfdfd;
    --sidebar-bg: #ffffff;
    --sidebar-bg2: #ffffff;
    --sidebar-bg3: #ffffff;
    --sidebar-text: #444;
    --sidebar-hover: #e8e8e8;
    --primary-color: #129ed9; 
    --secondary-color: #e74c3c;
    --button-bg: #d5d5d5;
    --button-hover: #129ed9;
    --button-hover2:rgba(18, 157, 217, 0.75);
    --input-bg: #fff;
    --input-text: #333;
    --chat-bg: #ffffff;
    --chat-user-bg: #eff6fb;
    --chat-assistant-bg: rgba(243, 243, 243, 0.5);
    --text-color: #333;
    --border-color: #ccc;
    --spinner-color: #129ed9;
    --loading-dot-color: #129ed9;
    --card-shadow: rgba(0, 0, 0, 0.01);
    --transition-speed: 0.3s;
    --font-body: 'manrope', sans-serif;
    --font-title: 'Manrope', sans-serif;
  }
  



/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;

}

/* Adjusted: Removed overflow: hidden */
html, body {
    height: 100%;
}

body {
    font-family: 'manrope', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    display: flex;
    width: 100%;
    height: 100%; /* Changed from 100vh to 100% */
    background-color: #F3F3F3F3;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: 2px 0 12px rgba(18,158,217,0.04);
    border-right: 1.5px solid #e8eef5;
    padding-top: 18px;
    padding-bottom: 18px;
    width: 275px; /* Fixed width */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* border-right: 1px solid var(--border-color); */
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05); */
    /* same but shadow also below */
    /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05); */
    transition: transform var(--transition-speed) ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%; /* Changed from 100vh to 100% */
    overflow-y: auto;
    z-index: 10001 !important;
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* make right upper corner slightly rounded */
    /* border-top-right-radius: 5px; */
}




/* On mobile, no margin-top */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .sidebar {
        margin-top: 0;
    }
}

/* Universal Header Styling */
.section-header {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

/* Adjust for mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .section-header {
        position: sticky;
        top: 0;
    }
}

/* Sidebar Collapsed State for Mobile */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Logo */
.logo {
    margin: 20px auto;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    /* remove margin */
    margin: 0;
}

.menu-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
}



.menu {
    padding: 20px;
    flex-grow: 1;
}

.menu-item,
.menu-item-store,
.menu-item-store2,
.menu-item-billing,
.menu-item-newchat,
.menu-item-settings,
.menu-item-voice,
.sidebar-footer-card {
  border: none !important;
}

.menu-item {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;

}

.menu-item-billing {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    font-size: 15px;
    /* color: var(--input-text); */
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* align text left */
    justify-content: flex-start;
    font-family: 'Inter Variable', sans-serif;
    /* center the button */
    margin-left: auto;

}

/* id="enhanceButton" button styled similarly as menu-item */
#enhanceButton {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 10px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
    margin-top: 15px;
}

/* enhancebutton on hover */
#enhanceButton:hover {
    background: var(--sidebar-bg2);
}


/* Pseudo-element for glow effect */
#enhanceButton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
  #enhanceButton.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }




.menu-item:hover {
    background: var(--sidebar-hover);
    transform: translateX(3px);
}



.sidebar-header-newchat {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    /* transparent */
    background-color: #fcfcfc;
    /* border-top: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
    /* round the top corners */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px; 
    /* padding: 10px; */

    /* border-top: 1px solid #E8E8E8; */
    box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.05);

}

.sidebar-header-newchat2 {
    /* box-shadow: 0 2px 5px rgba(28, 27, 27, 0.08); */
    z-index: 10000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between; /* Ensure left & right alignment */
    position: relative;
    width: 100%;
    background-color: var(--chat-bg);
    /* padding: 10px; */
}


/* for the menu item in the chat page, make width fit content, center button */
.menu-item-newchat, .menu-item-settings, .menu-item-voice {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: fit-content;
    font-size: 16px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: transparent;
    /* center button in container */
    margin-left: auto;
    margin-right: auto;
    font-family: 'Inter Variable', sans-serif;
    /* border: 0.5px solid var(--border-color); */
}

/* disable voice and hide it, and make it non clicable */
.menu-item-voice {
    pointer-events: none;
    color: transparent;
    background-color: transparent;
}

.menu-item-settings {
    margin-right: 10px;
}

/* Center-align "New Chat" */
.menu-item-newchat {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* on mobile align left */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-newchat {
        position: relative;
        left: 5px;
        transform: none;
        white-space: nowrap;
        /* more to the left */
        margin-left: 5px;
        /* its still centered... */
        text-align: left;

    }
}

.menu-item-voice {
    color: transparent;
    background-color: transparent;
}

/* on mobile hide menu-item */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .menu-item-voice {
        display: none;
    }
}

.menu-item-newchat:hover, .menu-item-settings:hover, .menu-item-voice:hover {
    background: #eeeeee;
}



.menu-item-store {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 14px;
    margin: 8px 0;
    width: 100%;
    max-width: 200px;
    font-size: 16px;
    color: #333;
    text-align: center;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: #f3f3f3;
    border: 1px solid var(--border-color);

}

.menu-item-store {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* on hover */
.menu-item-store:hover {
    color: var(--primary-color);
}


.menu-item-store2 {
    border-radius: 8px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 12px 20px;
    margin: 8px 0;
    max-width: 175px;
    font-size: 16px;
    color: var(--background-color);
    text-align: left;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--primary-color);
}

.menu-item-store2 {
    display: flex;
    justify-content: center;
    align-items: center;
}




.menu-item.active {
    color: #333333;
    background-color: var(--sidebar-hover);
}




.sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    padding-top: 10px;
    /* center its buttons within */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
}


.menu-item#login-button {
    background-color: var(--primary-color);
    color: #ffffff;
    margin: 0 auto;
    margin-bottom: 10px;
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#logout-button {
    background-color: transparent;
    /* color: var(--primary-color); */
    margin: 0 auto;
    /* margin-bottom: 10px; */
    text-align: center;
    justify-content: center;
    max-width: 175px;
}

.menu-item#login-button:hover {
    transform: none;
    background-color: var(--button-hover);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    /* transition: background var(--transition-speed); */
    z-index: 10002 !important;
}
/* on mobile */
.toggle-btn {
    top: 20px;
}



/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar becomes overlay on mobile */
    .sidebar {
        position: absolute;
        z-index: 1000;
        height: 100%;
        width: 100%;
        transform: translateX(-100%);
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }
}

/* Content Container */
.content-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-left: 275px; /* Equal to sidebar width */
    height: 100%; /* Changed from 100vh to 100% */
    padding: 10px;
    /* transition: margin-left var(--transition-speed) ease; */
    /* Removed overflow: hidden */
    transition: margin-left var(--transition-speed) ease, margin-right var(--transition-speed) ease;
    background-color: var(--sidebar-bg3);
}

/* Shift the content container when options panel is open */
.content-container.shifted {
    margin-right: 400px; /* Width of the options panel */
}

/* On mobile, adjust content container */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-top: auto;
        margin-bottom: auto;
        margin-left: 0;
    }
}

.charts-container {
    background-color: var(--chat-bg);
}

/* Hide sidebar collapsed state margin adjustments on desktop */
@media (min-width: 769px) {
    .sidebar.collapsed ~ .content-container {
        margin-left: 275px;
    }
}

/* Content Sections */
.content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Changed from fixed height to flex-grow */
    overflow-y: auto; /* Added overflow-y: auto */
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Centered Title */
.centered-title {
    margin: 20px 0;
    font-size: 1.8em;
    color: var(--text-color);
    text-align: center;
}




/* Connections List Container */
.connections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
    background-color: #fafafa;
    /* width: 90%; */
    max-width: 1600px; /* Allow cards to be wider */
    margin-left: auto;
    margin-right: auto;
    /* border: 1px solid #E8E8E8; */

    /* box-shadow: inset 0px 10px 10px -8px rgba(0, 0, 0, 0.1); */

}

/* mobile smaller width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item, .connections-list {
    }
}



/* Information Box (Modern Look) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    margin-top: 20px !important;
    /* border-left: 4px solid #129ed9; */
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
}

/* Icons inside info box */
.info-box2 i {
    color: #129ed9;
    margin-right: 8px;
}

/* Code-style formatting inside info-box */
.info-box2 code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    max-width: 80%;

}

/* on mobile code max width 250 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .info-box2 code {
        max-width: 100px;
    }
}

/* make sure it cannot exceed the infobox itself */
.info-box2 code {
    max-width: 50%;
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* rows of 2 instead */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}



/* Connection Logo */
.connection-logo {
    max-width: 60px;
    margin: 0 auto 10px;
    display: block;
}

/* Connection Heading */
.connection-item h3 {
    font-family: 'Manrope', sans-serif;
    color: var(--text-color);
    margin-bottom: 10px;
}

/* Input Field (reuse existing styling) */
.input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    /* margin-bottom: 10px; */
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
}

/* Connect Button */
.connect-button {
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s;
}

/* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Ensure Connection Items are uniform */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 100% !important;
    width: 100% !important; /* 2 items per row */
    text-align: center;
    border: 1px solid #E8E8E8;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes items evenly */
    min-height: 320px; /* Ensures all cards are same height */
}

/* Ensure uniform input section */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

/* Info Box (fixed height) */
.info-box2 {
    background-color: rgba(18, 158, 217, 0.1) !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: 'Manrope', sans-serif !important;
    min-height: 80px !important; /* Fixed height to avoid movement */
    /* make sure it doesnt extend where its in */
    max-width: 100% !important;
    /* center */
    margin-left: auto !important;
    margin-right: auto !important;
    /* make max width */
    max-width: 500px !important;
}

/* Button Container */
.button-container {
    margin-top: auto; /* Pushes buttons to bottom */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Ensure all suggestion buttons align */
.suggestion-button {
    background-color: transparent;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: none;
    margin-top: 20px;
}

/* Ensure all connect buttons align */
.shopify-fetch-button {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
}

/* Responsive - Ensure 2 in a row for tablets, 1 in mobile */
@media (max-width: 1024px) {
    .connection-item {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
    }
}

/* Connection Status Label (Positioned in top-right) */
.status-label {
    /* position: absolute; */
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
}


/* Not Connected State */
.status-label.not-connected {
    background-color: #d6d6d6e0;
    color: #555;
}

/* Connected State */
.status-label.connected {
    background-color: #4caf4fc4;
    color: #fff;
}

/* Checking Status */
.status-label.checking {
    background-color: #f0ac4ecb;
    color: #fff;
}

.icon-container {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: rgba(68, 171, 215, 0.2);
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}

.icon-container-h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(68, 171, 215, 0.2);
  border-radius: 6px;
  margin-right: 8px;
  width: 1.5em;
  height: 1.5em;
}



.icon-container-csv-imports {
    display: inline-flex; /* Center content inside */
    align-items: center;
    justify-content: center;
    width: 32px; /* Adjust icon container size */
    height: 32px;
    border-radius: 8px; /* Makes it circular */
    background-color: transparent;
    padding: 8px;
    margin-right: 8px; /* Space between icon and text */
}


/* Adjust the actual icon inside */
.icon-blue {
    color: var(--button-hover) !important;
    font-size: 16px; /* Adjust icon size */
}

.icon-blue-csv-imports {
    color: var(--button-hover) !important;
    font-size: 20px; /* Adjust icon size */
    margin-bottom: 3px;
    margin-right: -3px;
}

.shopify-fetch-button {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    /* margin: 5px; */
    width: 175px !important;
    height: 44px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}

.shopify-fetch-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }
  
  /* When the button has the "loading" class, run an infinite glow animation */
.shopify-fetch-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }



.shopify-fetch-button:hover {
    background: var(--sidebar-bg2);
}

.shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}
.shopify-fetch-button2:hover {
    background: var(--sidebar-bg2);
}

#shopify-fetch-button1:hover {
    background: var(--sidebar-bg2);
}


/* create-store-button */
.create-store-button {
    background-color: var(--primary-color);
    color: var(--input-text);
    border: none;
    padding: 12px 20px;
    margin: 5px 5px 5px 0;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
    width: fit-content;
    /* center the button */
    margin-left: auto;
    margin-right: auto;
    /* manrope */
    /* font-family: 'Manrope', sans-serif; */
}





.store-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* center texts in store-content */
.store-content h4 {
    text-align: center;
    margin-top: 20px;
}


/* Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}

.keyword-search-container .input-field {
    flex: 1;
    margin-left: 20px;
}

/* Input Fields */
.input-field {
    background-color: var(--input-bg);
    color: var(--input-text);
    padding: 10px;
    font-size: 16px;
    border: 0.5px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-field::placeholder {
    color: #bbb;
}

.input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

.keywordChart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.csv-display {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;  /* Switch from var(--sidebar-bg2) to white for clarity */
    border: 1px solid #ddd;  /* Light border */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* Soft outer shadow */
    font-family: 'Manrope', sans-serif; /* Use a modern font instead of monospace */
    color: #333;
    overflow-y: auto;
    width: 100%;
    max-width: 1100px; /* Prevent it from being too wide */
    margin-left: auto;
    margin-right: auto;
    min-height: 425px !important;
    max-height: 600px !important;
  }

  /* #csvDisplayPreview extra margin-bottom */
  #csvDisplayPreview {
    margin-bottom: 30px;
  }
  
    /* #csvDisplayPreview extra margin-bottom */
    #csvDisplay{
      margin-bottom: 30px;
    }
    
  /* Slightly larger min-height on desktop */
  /* @media (min-width: 769px) {
    .csv-display {
      min-height: 600px;
    }
  } */

  .product-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    z-index: 99999;
    overflow-y: scroll;
    /* make it somehwat larger */
    width: 80%;

  }



  /* on mobile width */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .csv-display {
      width: 100%;
      min-height: 300px;
    }
  }
  
  /* The table inside .csv-display */
  .csv-display table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Slightly bigger than default 10-12px */
  }
  
  /* Table header cells */
  .csv-display th {
    background-color: #f3f3f3;
    color: #333;
    font-weight: 500; /* Bolder text */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-family: 'Inter Variable', sans-serif;
    position: sticky; /* So header stays in place if the data scrolls */
    top: 0;
    z-index: 2; /* So it stays above the rows */
  }
  
  /* Table data cells */
  .csv-display td {
    border: 1px solid #ddd;
    padding: 10px;
    /* color: #555; Slightly lighter than #333 for data cells */
    color: #6B7280;
  }
  
  /* Optional row striping */
  .csv-display tr:nth-child(even) td {
    background-color: #fafafa; 
  }
  
  /* Hover highlight on table rows */
  .csv-display tr:hover td {
    background-color: #f0f0f0;
  }

  .csv-display tr {
    cursor: pointer; /* 👈 pointer cursor on row */
    transition: background-color 0.15s ease;
  }


/* Column Adder */
.column-adder {
    margin-top: 20px;
    margin-bottom: 35px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--sidebar-bg);
    box-shadow: 0 4px 8px var(--card-shadow);
    width: 95%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.column-adder textarea {
    min-height: 100px;
    resize: vertical;
}

.add-column-button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: background var(--transition-speed);
}

.add-column-button:hover {
    background-color: var(--suggestion-hover-bg);
}

/* Flow Overlay */
.flow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.5rem;
    z-index: 9000;
}

.flow-content {
    text-align: center;
    padding: 30px;
    background: rgba(30, 30, 47, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
}

.spinner-overlay {
    border: 6px solid var(--border-color);
    border-top: 6px solid var(--spinner-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 1px;
}

.loading-dots span {
    font-size: 3rem;
    color: var(--loading-dot-color);
    animation: glow 1.2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Insights Interface */
.insights-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* For the date-range button row */
.range-buttons-insights, .range-buttons-campaigns {
    display: flex;
    gap: 10px;
    padding: 10px 0;
  }



  .range-buttons-insights button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  .range-buttons-insights button:hover {
    background-color: #e2e6ea;
  }

  /* center those buttons in the screen */
    .range-buttons-insights {
        justify-content: center;
    }


.range-buttons-campaigns button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    }
    .range-buttons-campaigns button:hover {
    background-color: #e2e6ea;
    }

/* center those buttons in the screen */
.range-buttons-campaigns {
    justify-content: center;
}

  /* Metric Cards Row */
  .insights-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 30px;
  }

  /* center the cards */
    .insights-cards-row {
        justify-content: center;
    }

  


  .insights-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 220px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
  }

  .insights-card2 {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 430px;
    padding: 15px;
    /* cursor: pointer; */
    transition: transform 0.15s ease;
    font-family: 'Poppins', sans-serif;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;

  }

  .insights-card:hover {
    transform: translateY(-2px);
  }
  .insights-card-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .insights-card-value {
    font-size: 22px;
    color: #333;
  }


  /* Instead of 'display: none', do something like: */
.insights-chart-container.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  /* Give it a decent min-width so it can't collapse */
  #insightsChartContainer {
    visibility: visible;    /* default */
    opacity: 1;            /* default */
    pointer-events: auto;  /* default */
    width: 100%;           /* or whatever you prefer */
    min-width: 600px;      /* ensures it never shrinks too narrow */
    max-width: 800px;
    margin: 0 auto;
    /* rest of your styling */
  }
    /* Fix a stable height on the container so it doesn't grow infinitely */
.insights-chart-container {
    position: relative;     /* Chart.js needs a positioning context */
    width: 100%;            /* your desired width or max-width */
    max-width: 800px;       /* optional max width */
    height: 400px;          /* or max-height: 400px + overflow if you prefer */
    margin: 0 auto;         /* center horizontally */
    /* whichever background/border styles you like */
  }
  
  #insightsChart {
    display: block;         /* don't let it be inline */
    width: 100%;            /* fill container's width */
    height: 100%;           /* fill container's height, so it doesn't auto-expand */
  }

  .range-buttons-insights button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  
  .range-buttons-campaigns button.active-range-btn {
    background-color: #129ed9;
    color: #fff;
    border-color: #129ed9;
  }
  

  .insights-value-row {
    display: flex;
    align-items: baseline; /* or center */
    gap: 6px;
  }
.insights-delta {
    font-size: 0.9em;   /* slightly smaller text */
    font-weight: 400;
  }
  
  .insights-delta.positive {
    color: #17a675;     /* greenish */
  }
  
  .insights-delta.negative {
    color: #c0392b;     /* redish */
  }
  

  #importSourcesContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;

}
#importSourcePie {
    /* max-width: 50%; */
    /* max-height: 400px; */
    /* center */
    margin-left: auto;
    margin-right: auto;

}


.charts-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    height: auto;
}

canvas {
    width: 100%;
    max-width: 1000px;
    height: auto;
    background-color: transparent;
    border-radius: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .charts-container {
        flex-direction: row;
        align-items: center;
        height: auto;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Adjusted: Changed position to relative and removed top: 0; */
.chat-header, .chat-header-3 {
    flex-shrink: 0;
    padding: 20px;
    /* background-color: var(--sidebar-bg); */
    /* background-color: rgba(68, 171, 215, 0.08); */
    background-color: transparent;
    /* border-bottom: 1px solid var(--border-color); */
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border-radius: 5px; */
    /* only border bototm */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    
    font-size: 12px;
    /* manrop */
    font-family: 'Inter Variable', sans-serif;

    /* border-top: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-left: 1px solid #E8E8E8; */
    /* only border on top, left and right */


    /* make sure the header sticky */
    /* position: sticky; */

}

/* make sure the h2 is max 60% */
/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header h2 {
        max-width: 75%;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .chat-header-3 h2 {
        max-width: 75%;
    }
}

/* Allow scrolling only in the chat window */
.chat-window {
    flex-grow: 1; /* Ensure it occupies available space */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px; /* Add padding for content */
    /* background-color: var(--chat-bg); Keep the background color */
    background-color: #fcfcfc;
    /* Removed max-height: 100%; */
    /* slight border */
    /* border-radius: 8px; */
    /* border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px; */


    /* border-bottom: 1px solid #E8E8E8; */
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */
}

/* Adjusted: Changed position to relative, removed bottom: 0;, added margin-top: auto; */
.chat-input-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: transparent;
    z-index: 101;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    /* border-radius: 8px; */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-bottom: 1px solid #E8E8E8;
    /* border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8; */

    box-sizing: border-box;
    position: relative;
    margin-top: auto;

}
/* a shadow on bottom too */
.chat-input-container {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* rounder borders */
    /* border-radius: 15px; */
}



/* chat message spacing top */
.chat-message {
    margin-top: 10px;
}

.chat-message.assistant {
    background-color: #fff;    /* even softer variant: */
    align-self: flex-start;
    color: var(--text-color);
    width: fit-content;
    max-width: 90%;
    padding: 10px 16px; /* More padding for better readability */
    border-radius: 15px; /* Smooth rounded corners */
    border-bottom-left-radius: 0;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5; /* Better line spacing */
    letter-spacing: 0.3px; /* Slightly spaced letters for readability */
    box-shadow: 0px 2px 6px rgba(122, 122, 122, 0.1); /* Soft shadow for elevation */
    border-left: 3px solid rgba(68, 171, 215, 0.25); /* Subtle left border accent */
    word-wrap: break-word;
    transition: all 0.3s ease-in-out;
}

.chat-message.user {
    background-color: rgb(227, 247, 255);
    align-self: flex-end;
    color: var(--text-color);
    text-align: right;
    margin-left: auto;
    width: fit-content;
    max-width: 85%;
    padding: 10px 16px;
    font-size: 17px;
    font-family: 'Poppins', sans-serif;
    border-radius: 15px;
    border-bottom-right-radius: 0;
    line-height: 1.5;
    letter-spacing: 0.3px;
    box-shadow: 0px 2px 6px rgba(122, 122, 122, 0.1);
    transition: all 0.3s ease-in-out;
}

/* Optional: A slight fade-in animation for messages */
@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    animation: fadeInMessage 0.2s ease-in-out;
}






/* make chatbot-settings scrollable */
.chatbot-settings {
    overflow-y: auto;
}

/* Suggestions */
.chat-window .suggestion {
    background-color: #fff;
    color: var(--button-hover);
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 25px;
    font-size: 15px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.chat-window .suggestion:hover {
    /* background-color: var(--suggestion-hover-bg); */
    transform: scale(1.015);
    /* change text color */
    /* color: var(--primary-color); */
}

.suggestion::before {
    content: "💡 ";
    margin-right: 5px;
}





/* Loading Message */
.loading-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--chat-assistant-bg);
    padding: 10px 15px;
    border-radius: 15px;
    color: var(--text-color);
}

.loading-message::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--loading-dot-color);
    border-radius: 50%;
    animation: glow 1.2s infinite;
    margin-left: 5px;
}

.loading-text {
    display: inline-block;
    color: var(--text-color);
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: text-flow 2s linear infinite;
}

@keyframes text-flow {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Input Field */
.chat-input-container .input-field {
    flex-grow: 1;
    border-radius: 10px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background-color: var(--chat-bg);
    color: #444;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    font-family: 'Manrope', sans-serif;
}




/* make input fielf in chatbot page wider */
.chat-input-container .input-field {
    width: 80%;
}

.chat-input-container .input-field::placeholder {
    color: #bbb;
}

.chat-input-container .input-field:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 4px var(--primary-color); */
}

/* Send Button */
.send-button {
    padding: 10px 16px;
    font-size: 17px;
    border-radius: 10px;
    background-color: #fff;
    color: var(--text-color);
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed), transform var(--transition-speed);
    font-family: 'Inter Variable', sans-serif;
    border: 1px solid var(--border-color);
    /* border: 1px solid var(--button-hover); */
}

.send-button:hover {
    /* background-color: rgba(68, 171, 215, 0.3); */
    background-color: var(--sidebar-bg3);
}

/* Download Button - Updated to match shopify-fetch-button styling */
.download-button {
    position: relative;
    background-color: var(--sidebar-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    margin: 20px auto 0 auto;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    max-width: 200px;
    margin-bottom: 15px;
    font-family: 'manrope', sans-serif;
}

.download-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.download-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

.download-button:hover {
    background: var(--sidebar-bg2);
}

/* Spinner for Buttons */
.spinner {
    border: 4px solid var(--sidebar-bg);
    border-top: 4px solid var(--spinner-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Responsive Adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Sidebar Overlay for Mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-speed) ease;
        background-color: #ffffff !important; /* Force solid white background on mobile */
        opacity: 1 !important; /* Ensure full opacity */
    }

    .sidebar.active {
        transform: translateX(0);
        position: fixed;
        background-color: #ffffff !important; /* Force solid white background when active */
        opacity: 1 !important; /* Ensure full opacity when active */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1) !important; /* Add shadow for depth */
    }

    /* Mobile sidebar backdrop for extra opacity */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
        z-index: -1;
        opacity: 1;
    }

    /* Show toggle button on mobile */
    .toggle-btn {
        display: block;
    }

    /* Adjust main content to full width */
    .content-container {
        width: 100%;
        margin-left: 0;
    }

    /* Ensure chat input and send button are side by side */
    .chat-input-container {
        flex-direction: row;
    }

    .send-button {
        margin-left: 0;
        width: auto;
    }
}

/* Further Media Queries for Extremely Small Screens */
@media (max-width: 480px) {
    /* Ensure chat input and send button remain side by side */
    .chat-input-container {
        flex-direction: row;
        gap: 10px;
    }

 
}

/* Products Header */
.products-header, .connections-header, .chatbot-header, .keywords-header {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    position: sticky;
    top: 0 !important;
    z-index: 100;
    height: 60px;
}

/* Background color for content sections */
.content {
    /* background-color: #fdfdfd; */
    background-color: #fcfcfc;
    border-radius: 10px;

    border-left: 1px solid #E8E8E8;
    border-right: 1px solid #E8E8E8;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    /* padding: 10px; */
    border-top: 1px solid #E8E8E8;


}



.insightsInterface {
    overflow: hidden;
}

.charts-container {
    overflow-y: auto;
}

/* Chart Container */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--card-shadow);
    margin: 20px auto;
    max-width: 1200px;
    width: 95%;
    height: auto;
    min-height: 500px;
}




/* Keyword Insights Table Styling */
#keywordInsights table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#keywordInsights th, #keywordInsights td {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

#keywordInsights th {
    background-color: var(--primary-color);
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 1;
    /* less height */
    padding: 5px 5px;
    /* no space above it */
    margin-top: 0;
    /* make the height small */
    /* font manrope */
    font-family: 'manrope', sans-serif;
    font-size: 10px;
}

.info-text {
    text-align: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-color);
    /* position on bottom centre */
    /* position: sticky; */
    bottom: 0;
    z-index: 1;
    margin-top: 5px;


}

#keywordInsights tr:nth-child(even) {
    background-color: var(--chat-bg);
}

/* Add hover effect for table rows */
#keywordInsights tr:hover {
    background-color: var(--suggestion-bg);
    cursor: pointer;
}

/* Adjust Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px auto;
    max-width: 800px;
    width: 95%;
}

.keyword-search-container .input-field {
    flex: 1;
    min-width: 200px;
    padding: 5px 15px;
    /*  */
}


/* Adjusted Chat Header
.chat-header {
    padding: 10px 20px;
    margin-bottom: 10px;
} */

/* Adjust Keyword Search Container */
.keyword-search-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px auto; /* Add vertical margin */
    gap: 15px; /* Adjust spacing between elements */
    max-width: 800px;
    width: 95%;
}

.keyword-search-container .input-field {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
}

.keyword-search-container .input-field,
.keyword-search-container button {
    margin-top: 10px;
    margin-bottom: 10px;
}

.keyword-search-container button {
    width: auto; /* Adjust to content size */
    padding: 8px 12px; /* Smaller padding */
    font-size: 14px; /* Adjust font size */
    align-self: center; /* Center within the grid */
}

/* Info Text Styling */
.info-text {
    text-align: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-color);
    margin-top: 5px;
}


/* Spinner Styles */
.spinner {
    border: 4px solid var(--primary-color);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chart Container Adjustments */
.chart-container canvas {
    width: 100% !important;
    height: auto !important;
}


.select2-dropdown {
    position: relative;
  }




  
  .suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
  }
  

  .suggestion {
    padding-bottom: 5px;
  }



  .chart-suggestion {
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-color);
    transition: color var(--transition-speed);
    margin-bottom: 35px;
    background-color: var(--suggestion-bg);
  }
  
  .chart-suggestion:hover {
    color: var(--primary-color);
  }





/* make chart-suggestion just like question suggestion */
.chart-suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
    /* it should take the widht of the content */
    width: fit-content;
    margin-bottom: 35px;
    /* make sure the button is centered */
    margin: 0 auto;

}   




/* Adjust SVG size and alignment */
.connection-logo {
    width: 50px; /* Smaller size */
    height: auto;
    margin: 0 auto; /* Centered by default */
}

/* Desktop: Align SVGs to the left */
/* @media (min-width: 768px) {
    .connection-item {
        flex-direction: row;
        align-items: center;
    }

    .connection-logo {
        margin: 0 15px 0 0; 
    }

    .connection-item h3,
    .connection-item .input-field,
    .connection-item .connect-button {
        text-align: left;
    }
} */

/* Mobile: SVGs centered */
/* @media (max-width: 767px) {
    .connection-item {
        flex-direction: column;
        align-items: center;
    }
} */








/* Adjust SVG size and alignment */
.connection-logo {
    width: 50px; /* Smaller size */
    height: auto;
    margin: 0 auto; /* Centered by default */
    /* bit spacing to the top */
    margin-top: 10px;
}

/* Desktop: Adjust layout */
@media (min-width: 768px) {
    .connection-item {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center elements */
    }

    .connection-logo {
        margin-bottom: 10px; /* Add space below the icon */
    }

    .connection-item h3 {
        margin-bottom: 15px; /* Add space below the title */
        text-align: center;
    }

    .connection-item .input-field {
        width: 100%; /* Full width for better responsiveness */
        max-width: 400px !important; /* Wider than buttons for better UX */
        margin-bottom: 15px; /* Space below the input field */
    }

    .connection-item .connect-button,
    .connection-item .expander-button,
    .connection-item .btn-primary {
        width: 100%; /* Full width of container */
        max-width: 200px; /* Smaller than input fields */
        margin: 5px 0; /* Add vertical spacing */
        text-align: center;
    }

    .expander-button {
        display: flex;
        justify-content: center; /* Center the content of the button */
        /* center */
        margin: 0 auto;

    }
}



/* Connection Item Card */
.connection-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    flex: 1 1 calc(50% - 20px); /* ✅ Ensures two items per row */
    text-align: center;
    transition: transform 0.2s ease-in-out;
    border: 1px solid #E8E8E8;
}

/* Responsive: 1 column on smaller screens */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .connection-item {
        flex: 1 1 100% !important;
    width: 100% !important;
        max-width: 100%;
    }
}






.domainIput .domainSearchButton {
    margin: 0 auto;
    justify-content: center;
    display: flex;
}


/* Desktop Styles */
@media (min-width: 1024px) {
    .keyword-search-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns for most items */
        grid-gap: 15px; /* Space between items */
        justify-items: center;
        align-items: center;
        margin: 20px auto; /* Centered horizontally */
        max-width: 800px;
    }

    /* Titles: Full-width rows */
    .keyword-search-container h3 {
        grid-column: span 2; /* Span across both columns */
        text-align: center;
        font-size: 18px;
        margin-bottom: 10px;
        color: var(--text-color);
        margin-top: 20px;
    }

    /* Language and Location Selectors */
    #locationSelect, 
    #languageSelect {
        grid-column: span 1; /* Each occupies one column */
        width: 80%; 
    }

    /* Input and Button for Keyword Search */
    #keywordInput {
        grid-column: span 1; /* Larger input */
        flex: 2; /* Input takes more space */
        min-width: 400px; /* Ensure a reasonable size */
    }

    #keywordSearchButton {
        grid-column: span 1; /* Button beside the input */
        flex: 1;
        padding: 8px 15px; /* Smaller button */
    }

    /* Input and Button for Domain Search */
    #DomainInput {
        grid-column: span 1; /* Larger input */
        flex: 2;
        min-width: 400px;
        /* width: 100%; */
    }

    #domainSearchButton {
        grid-column: span 1; /* Button beside the input */
        flex: 1;
        padding: 8px 15px;
    }
}

/* Mobile Styles */
@media (max-width: 1023px) {
    .keyword-search-container {
        display: flex;
        flex-direction: column;
        gap: 5px;
        justify-content: center;
        align-items: center;
        margin: 20px auto;
        width: 95%; /* Full width for mobile */
    }

    /* Titles: Full-width rows */
    .keyword-search-container h3 {
        text-align: center;
        font-size: 16px;
        margin-bottom: 10px;
        color: var(--text-color);
        margin-top: 20px;
    }

    /* Language and Location Selectors */
    #locationSelect, 
    #languageSelect {
        width: 80%; /* Full width on mobile */
    }

    /* Input and Button for Keyword Search */
    #keywordInput, 
    #DomainInput {
        width: 80%;
        margin-bottom: 5px;
    }

    #keywordSearchButton, 
    #domainSearchButton {
        width: 25%; /* Smaller buttons */
    }


}

/* General Styles */
.chart-suggestion {
    background-color: var(--suggestion-bg);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
    margin-bottom: 35px;
}

.chart-suggestion:hover {
    color: var(--primary-color);
}

.products-buttons {
    display: flex; /* Enables horizontal layout */
    justify-content: space-between; /* Pushes text left, button right */
    align-items: center; /* Aligns items vertically */
    width: 80%;
    max-width: 900px;
    margin:  auto;
    gap: 20px; /* Space between text & button */
}

.products-buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-radius: 5px;
  width: 80%;
  max-width: 900px;
  margin: auto;
  margin-top: 50px;
  gap: 20px;
  box-sizing: border-box;
}


.products-content {
    max-width: 500px; /* Ensures text doesn't stretch too wide */
    /* margin-left: auto;  */
}

.products-buttons h3,
.products-buttons p {
    margin: 10px 0;
}

.products-buttons p {
    color: #6B7280;
}

/* Ensure only THIS button moves right */
#shopify-fetch-button1 {
    margin-left: auto; /* Pushes button to the right */
}

/* Responsive: Center button below text on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .products-buttons {
        flex-direction: column; /* Stack text & button */
        align-items: center; /* Center align */
    }

    #shopify-fetch-button1 {
        margin-left: 0; /* Reset margin */
        width: 100%; /* Optional: Make button full-width */
    }
}

/* on mobile, centre and stack the buttons */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

/* @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .products-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;

        margin: 0 auto;

    }
} */


#shopify-fetch-button1, #shopify-fetch-button2 {
    position: relative; 
    border: none;
    padding: 6px 10px;
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    margin-top: 10px;
    /* center the button in middle */
    margin: 0 auto;
    /* small border */
    border: 1px solid var(--border-color);
    width: 125px;
}   

#shopify-fetch-button1 {
    margin-top: 50px;
}

#shopify-fetch-button3 {
    position: relative; 
    border: none;
    /* padding: 10px 10px; */
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}


.input-field-csv {

    padding: 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 10px;
    /* background */
    background-color: var(--input-bg);
    color: var(--input-text);
    /* font manrope */
    font-family: 'Manrope', sans-serif;
    /* pointer */
    cursor: pointer;
}



.column-adder input, .column-adder textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 10px;
    /* background */
    background-color: var(--input-bg);
    color: var(--input-text);
    /* font manrope */
    font-family: 'Manrope', sans-serif;
}

/* border input field when typing */
.column-adder input:focus, .column-adder textarea:focus {
    border-color: var(--primary-color);
    /* box-shadow: 0 0 5px var(--primary-color); */
}

/* make sure the column-adder h3 text is centered */
.column-adder h3 {
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: var(--text-color);
}

/* .add-store-button {
    color: #333;
    background-color: rgba(68, 171, 215, 0.2);
    font-family: 'manrope', sans-serif;
} */

/* More specific selector */
.store-form-container button.add-store-button {
  background-color: #fff !important;
  color: #444 !important;
  padding: 6px 12px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  font-family: 'Inter Variable', 'Manrope', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto; /* Keep center alignment */
}

/* Keep icon blue */
.store-form-container button.add-store-button i {
  color: #129ed9;
}

/* Hover state */
.store-form-container button.add-store-button:hover {
  background-color: #f7f7f7 !important;
}


/* make this button as wide as its text content */
.add-column-button {
    width: auto;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: background var(--transition-speed);
    /* center the button */
    margin: 0 auto;
}


/* Styles for the '+' icon button */
.upload-csv-button {
    padding: 10px;
    font-size: 15px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

.upload-csv-button:hover {
    color: var(--primary-color);
}

.upload-csv-button i {
    pointer-events: none;
}

.hidden {
    display: none;
}


/* make sure <div class="chat-window" id="chatWindow"> is only vertically scrollable, disable horizontal scrolling */
.chat-window {
    overflow-x: hidden;
    overflow-y: auto;


    width: 100%;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

/* On desktop, apply inner padding only to content */
@media (min-width: 768px) {
    .chat-window {
        padding-left: 5%;
        padding-right: 5%;
    }
}
    /* margin-left: 15%;
    margin-right: 15%; */


/* Apply margins only on wider screens */
/* @media (min-width: 768px) {
  .chat-window {
      margin-left: 15%;
      margin-right: 15%;
  }
} */

/* chat window user message 10 px top margin */
.chat-window .chat-message.user {
    margin-top: 10px;
}

.chatWindow .chat-message.user {
    margin-top: 10px;
}


/* Update the product-card styles */
.product-card {
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--card-shadow);
    max-width: 700px;
    width: 85%; /* Ensure the card has a fixed width */
    max-height: 95%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
}

/* Image styling inside product-card */
.product-card img {
    width: 70%; /* Make the image fill the width of the card */
    height: 70%;
    /* border: 2px solid var(--primary-color); Add primary colored border */
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Styles for Buttons */
.product-card button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-color);
    transition: background var(--transition-speed);
}

.product-card button:hover {
    background-color: var(--button-bg);
}


/* while product card is opened, make the background blurry */
.overlay {
    backdrop-filter: blur(15px);
}

/* Loading Placeholder Animation */
@keyframes loadingAnimation {
    0% { background-position: 100% 100; }
    100% { background-position: -100% 0; }
}



/* Designer Interface Styles */
.designer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#designerImageContainer {
    margin-top: 20px;
    width: 700px;
    height: 700px;
}

.ai-enhance-prompt p {
    max-width: 500px;
    /* align center */
    margin: 0 auto;
    text-align: center;
    font-family: 'manrope', sans-serif;
    color: #6B7280;
    font-size: 15px;

}


.ai-enhance-prompt {
    max-width: 500px;
    /* center */
    /* margin: 0 auto !important; */
    text-align: center;
    font-family: 'manrope', sans-serif;
    margin-bottom: 30px;
    margin-top: 20px;
}


#designerImageContainer img {
    max-width: 100%;
    border-radius: 10px;
    /* center in its container/section */
    margin: 0 auto;
    display: block;

}




/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

/* Image Editor Canvas */
.image-editor-canvas {
    cursor: url('eraser-cursor.png'), auto; /* Customize cursor if desired */
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Adjust Sidebar Menu Item Icon */

/* Adjustments for the New Menu Item */
.menu-item i.fa-paint-brush {
    font-size: 16px;
}


/* Ensure icons have the correct weight */
.far, .fa-regular {
    font-weight: 400;
}

/* Apply colors */

/* i.fa-comment { color: #33b5e5 !important; } /* Blue */
/* i.fa-link { color: #f44336 !important; } Red */

/* i.fa-tag { color: #9c27b0 !important; } Purple */
/* i.fa-cart-shopping { color: #ff9800 !important; } Orange */
/* i.fa-chart-line { color: #4caf50 !important; } Green */ */
/* i.fa-credit-card { color: rgb(244, 105, 54) !important; } Red-Orange */

/* fa-store purple */
/* i.fa-store { color: #9c27b0 !important; } */




/* Buttons container inside product-card */
.product-card .buttons-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Styling for additional thumbnails */
.additional-images-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
    
}

/* max height on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .product-card {
        max-height: 660px;
        overflow-y: auto;
    }
}

.additional-images-container .thumbnail {
    width: 60px;
    height: auto;
    cursor: pointer;
    border: 2px solid transparent; /* Default border */
    border-radius: 5px;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

/* Highlight the selected thumbnail */
.additional-images-container .thumbnail.selected {
    border-color: var(--primary-color);
    transform: scale(1.1); /* Slightly enlarge the selected thumbnail */
}

/* Add hover effect for thumbnails */
.additional-images-container .thumbnail:hover {
    border-color: var(--button-hover);
}





.loading-overlay {
    animation: glowingEffect 1.5s infinite;
    /* place  */
}

@keyframes glowingEffect {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}






.chatbot-customization {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    /* background-color: #f9f9f9; */
    border-radius: 10px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    font-family: 'manrope', sans-serif;
    /* margin left and right */
}

/* on desktop */
@media (min-width: 768px) {
    .chatbot-customization {
        width: 80%;
        margin: 0 auto;
    }
}


.customization-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.customization-row label {
    flex: 1;
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    /* color: #333; */
}

.customization-row .input-field {
    flex: 2;
    /* padding: 8px; */
    /* border: 1px solid #ddd; */
    /* border-radius: 5px; */
    /* font-size: 14px; */
}

.customization-row .input-field[type="color"] {
    padding: 0;
    height: 35px;
    width: 60px;
    cursor: pointer;
}



@media screen and (max-width: 768px) {
    .customization-row {
        flex-direction: column;
        align-items: flex-start;
    }

    /* customization input fields with text (not color) 90% width */
    .customization-row .input-field[type="text"] {
        width: 90%;
    }

    .customization-row label {
        min-width: unset;
        flex: unset;
    }

    .shopify-fetch-button {
        align-self: center;
        width: 100%;
    }
}


.nice-button {
    position: relative; 
    border: none;
    padding: 12px 20px;
    margin: 8px auto;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
}


.sidebar-header-store {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 14px;
}



/* alignt items above each other */
.store-display {
    /* display: flex; */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* gap: 20px; */
    /* margin-top: 10px; */
    padding: 12px 20px;
}

.form-subtitle {
    font-size: 1.1em;
    margin: 10px 0;
    font-family: 'manrope', sans-serif;
}

.highlight-word {
    font-weight: 550;
    transition: color 0.3s ease;
    /* italic */
}

/* no italic */
.options-content {
    font-style: normal;
}

.options-content p {
    font-style: normal;
}

.options-content h4 {
    font-style: normal;
    /* no bold */
    font-weight: 600;
}

.options-content h3 {
    font-style: normal;
}

.store-name-settings {
    font-style: normal;
}


/* logo max width */
.subscribe-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    margin-top: 20px;
}


.store-form-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    background: var(--sidebar-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.store-form-container h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.store-form-container h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-form-container .icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(18, 158, 217, 0.1);
    border-radius: 8px;
}

.store-form-container input[type="text"],
.store-form-container textarea,
.store-form-container select {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--input-bg);
    color: var(--input-text);
    font-family: 'Inter Variable', sans-serif;
    width: 100%;
}

.store-form-container input[type="text"]:focus,
.store-form-container textarea:focus,
.store-form-container select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1);
}

.store-form-container button {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: 'Inter Variable', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.store-form-container button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-1px);
}

.store-form-container button i {
    font-size: 16px;
}

.store-form-container textarea {
    height: 125px;
}

.store-form-container h4 {
    text-align: left;
    font-family: 'manrope', sans-serif;
    /* font-size: 16px; */
    color: var(--text-color);
    margin-bottom: 5px;
}

.store-form-container h3 {
    text-align: center;
    margin-bottom: 5px;
}

.store-content h3 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 20px;
}



.store-dropdown {
    /* /* position: absolute; */
    top: 100%;
    left: 0; 
    width: 100%;
    background-color: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(18,158,217,0.07) !important;
    border: 1.5px solid #e8eef5 !important;
    padding: 12px 0 !important;
    margin-top: 6px !important;
    min-width: 220px !important;
    max-width: 260px !important;
    font-family: 'Inter Variable', 'Manrope', sans-serif !important;
    z-index: 10002 !important;
    /* display: none; */
    color: var(--sidebar-bg);
    width: 225px;
    margin-top: 2px;
    /* rounded borders */
    border-radius: 5px;
    /* center it */
    margin: 0 auto;
    /* spac etop */
    margin-top: 3px;
    /* height: fit-content; */
    max-height: 300px;
    min-height: 100px;
    overflow-y: auto;
    border: 0.5px solid var(--border-color);
}



.button-chatbot-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* on desktop */
@media (min-width: 768px) {
    .button-chatbot-container {
        width: 80%;
        margin: 0 auto;
    }
}











/* Rule Management Section */
.rule-management {
    margin: 20px 0;
    color: #fff;
    margin-top: 20px !important;
}

.rule-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--chat-bg);
    border-radius: 5px;
    width: 80%;
}

.rule-form.hidden {
    display: none;
}

.rule-condition,
.rule-action {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rule-select {
    margin: 0 5px;
    padding: 5px;
    color: var(--text-color);
}

.rule-input {
    margin-left: 5px;
    padding: 5px;
    color: var(--text-color);
}

/* Buttons */
.add-rule-button,
.apply-rules-button,
.apply-rules-button-checkout,
.save-rule-button,
.cancel-rule-button,
.edit-rule-button {
    margin: 5px;
    padding: 6px 10px;
    background-color: #129ed9;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
/* 
.apply-rules-button:hover,
.save-rule-button:hover,
.cancel-rule-button:hover,
.edit-rule-button:hover {
    background-color: var(--button-bg);
} */


.add-rule-button:hover {
    background-color: var(--sidebar-bg2)
}

.delete-rule-button {
    margin: 5px;
    padding: 10px 15px;
    color: #129ed9;
    background-color: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* center the delete button */
.delete-rule-button {
    margin: 0 auto;
    display: block;
}

/* Container Layout */


.rules-list-container {
    flex: 1 1 45%;
    max-height: 660px;
    overflow-y: auto;
    background: var(--sidebar-bg2);
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 40px;
}

.rule-form-container {
    flex: 1 1 45%;
    /* background: var(--sidebar-bg); */
    border-radius: 10px;
    padding: 5px;
    color: #333;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 20px;
}

.button-container p {
    /* color: #333; */
    color: #333333ce;
}



/* Rules List Items */
.rule-item {
    background: var(--suggestion-bg);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none; /* Standard syntax */
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE10+/Edge */
}

.rule-item:hover {
    background: var(--suggestion-hover-bg);
}

/* Divider Line */
.rule-item:not(:last-child) {
    border-bottom: 1px solid rgba(14, 13, 13, 0.1);
}

/* Change cursor during dragging */
.rule-item:active {
    cursor: grabbing;
}

/* Optional: Style for the drag handle */
.rule-handle {
    margin-right: 10px;
    cursor: pointer;
}


/* same for removeShippingRow */
.removeShippingRow {
    /* margin-top: 10px; */
    padding: 6px 10px;
    color: #333;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}



/* Rule Form */
.rule-form {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--chat-bg);
    border-radius: 8px;
    width: 100%;
    max-width: none;
    border: 1px solid var(--border-color);
}

.input[type="radio" i] {
    background-color: var(--primary-color);
    color: var(--primary-color);
}

/* when active */
.input[type="radio" i]:checked {
    background-color: var(--primary-color);
    color: var(--primary-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #ffffff;
}

.rule-condition, .rule-action {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rule-select, .rule-input {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #959393;
    background: var(--background-color);
    color: #333;
    min-width: 120px;
}

.rule-select:focus, .rule-input:focus {
    border-color: #129ed9;
    outline: none;
}

.action-field-container.hidden, #actionValueContainer.hidden, #replaceTextContainer.hidden {
    display: none;
}

.rule-scope {
    margin: 15px 0;
    color: #333;
    font-family: 'manrope', sans-serif;
    font-size: 14px;
}

.rule-scope label {
    margin-right: 15px;
    cursor: pointer;
}

.button-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px !important;
  justify-content: center;

  margin: 0;
}

/* Optional: adjust button width for stacking on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .button-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .button-bar button {
    width: 100%;
  }
}


#copyRulesList {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background-color: #fafafa;
}

/* Optional: scrollbar styling */
#copyRulesList::-webkit-scrollbar {
  width: 6px;
}
#copyRulesList::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.15);
  border-radius: 4px;
}







.add-rule-button, .add-column-button, .save-rule-button, .copy-rule-button, .cancel-rule-button, .apply-rules-button, .apply-rules-button-checkout, .handle-sync-button {
    padding: 6px 10px;
    border-radius: 5px;
    color: #333;
    cursor: pointer;
    font-family: 'manrope', sans-serif;
    font-size: 14px;
    border: none;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

/* save-rule-button white text */
.save-rule-button, .copy-rule-button {
    color: #fff;
    border: none;
}

.cancel-rule-button {
    border: none;
}





.add-rule-button, .apply-rules-button, .apply-rules-button-checkout, .handle-sync-button {
    background: #129ed9;
}

.apply-rules-button:hover, .apply-rules-button-checkout:hover, .handle-sync-button:hover {
    background: var(--sidebar-bg2);
}

/* center on middle horizontally */
.add-rule-button {
    margin: 0 auto;
}

.add-rule-button, .handle-sync-button {
    position: relative; 
    border: none;
    padding: 6px 10px !important;
    margin: 8px 20px;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}

.apply-rules-button, .apply-rules-button-checkout {
    /* position: relative;  */
    border: none;
    padding: 6px 10px;
    margin: 8px 20px;
    width: 200px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}





.cancel-rule-button {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 12px;
}


/* Apply and Sync Buttons */
.apply-sync-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.sync-options {
    display: flex;
    gap: 15px;
}

.custom-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

.handle-sync-button {
    /* position: relative;  */
    border: none;
    padding: 6px 10px;
    margin: 8px 20px;
    width: 200px !important;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    /* align text left */
    justify-content: center;
    font-family: 'manrope', sans-serif;
    border: 1px solid var(--border-color);
}

.handle-sync-button {
    margin-right: 0px;
}

.copy-rule-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.copy-rule-item input[type="checkbox"] {
  margin-top: 5px;
  flex-shrink: 0;
}

.copy-rule-item label {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  font-family: Inter, sans-serif;
}


.handle-sync-button.loading::after, .copy-rule-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
  }
  
  @keyframes glowFlow {
    0% {
      left: -100%;
    }
    50% {
      left: 0%;
    }
    100% {
      left: 100%;
    }
  }


/* Glowing effect for import buttons */
.import-button, .import-button1, .import-button2, .import-button3, .import-button-x,
.import-button4, .import-button5, .import-button6, .import-button7, 
.import-button8, .import-button9, .import-button10, .import-button11, .import-button12, .import-button13, .import-button14, .import-button15, .import-button-import {
    position: relative;
    overflow: hidden;
}

/* Pseudo-element for glow effect */
.import-button::after, .import-button1::after, .import-button2::after, .import-button-x::after,
.import-button3::after, .import-button4::after, .import-button5::after, 
.import-button6::after, .import-button7::after, .import-button8::after, 
.import-button9::after, .import-button10::after, .import-button11::after, .import-button12::after,  .import-button13::after, .import-button14::after, .import-button15::after, .import-button-import::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

/* When the button has the "loading" class, run the glow animation */
.import-button.loading::after, .import-button1.loading::after, .import-button2.loading::after, .import-button-x.loading::after,
.import-button3.loading::after, .import-button4.loading::after, .import-button5.loading::after,
.import-button6.loading::after, .import-button7.loading::after, .import-button8.loading::after,
.import-button9.loading::after, .import-button10.loading::after, .import-button11.loading::after,
.import-button12.loading::after,  .import-button13.loading::after, .import-button14.loading::after,
.import-button15.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

/* Glowing animation */
@keyframes glowFlow {
    0% { left: -100%; }
    50% { left: 0%; }
    100% { left: 100%; }
}

.handle-sync-button:hover, .apply-rules-button:hover, .apply-rules-button-checkout:hover {
    background-color: var(--sidebar-bg2);
}


.apply-rules-button-checkout {
    border: 0.5px solid #129ed9;
}

/* center the checkout button in the middle of its box its in */
.apply-rules-button-checkout {
    margin: 0 auto;
    display: block;
}

.handle-sync-button::after, .copy-rule-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }

  #handle-sync-button2::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none; /* Prevent ::after from being clickable */
  }

/* apply-rules-button and handle-sync-button both next to each other instead of stacking */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .apply-sync-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .sync-options {
        justify-content: center;
    }
}

/* closer to each other */
.apply-sync-section {
    gap: 10px;
}

/* Validation Errors */
.validation-errors-container {
    background: var(--background-color);
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.validation-errors-container h3 {
    margin-top: 0;
    color: #f44336;
}

.validation-errors-container ul {
    list-style: none;
    padding: 0;
}

.validation-errors-container li {
    background: var(--background-color);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
}

.validation-errors-container li p {
    margin: 5px 0;
    color: #ffcccb;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .rule-management {
        width: 80%;
        margin: 0 auto;
    }
}

/* some spacing */
.rules-and-form-container {
    /* display: flex; */
    gap: 20px;
    margin-top: 20px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .rules-and-form-container {
        flex-direction: column;
        padding: 0 10px;
    }
    
    .rules-list-container, .rule-form-container {
        width: 100%;
    }
    
    .rules-list-container {
        max-height: 300px; 
    }
    
    .apply-sync-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .sync-options {
        justify-content: center;
    }
}





.subscribe-form {
    /* hide */
    /* display: none; */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    z-index: 100011212121;
}

/* on mobile, make the form correct height, and scrollable */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .subscribe-form {
        height: 100%;
        width: 100%;
        /* make sure the top doenst exceed the screen */
        top: 0;
        
        
    }
}


.subscribe-form-content {
    position: relative; /* Ensures the close button is positioned relative to the form */
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    max-width: 1000px; /* Limits the width of the popup */
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* on mobile */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .subscribe-form-content {
        max-height: 500px;
        overflow-y: auto;
    }
}


.subscribe-form.hidden {
    display: none;
}



/* Close Button */
.close-button {
    position: absolute;
    top: 13px;
    right: 13px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #333;
}

/* Title and Subtitle */
.form-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.form-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    color: #666;
}

/* Pricing Tiers */
.pricing-tiers {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pricing-tier {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tier-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: normal;
}

.tier-description {
    font-size: 14px;
    margin-bottom: 10px;
    color: #666;
}

.tier-price {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 10px;
    color: #444;
}

.tier-features {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    font-size: 14px;
    color: #555;
}

.tier-features li {
    margin-bottom: 5px;
}

/* Buttons */
.subscribe-button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.subscribe-button:hover {
    background: var(--primary-color);
}

/* Responsive Design for Mobile */



.tooltip {
    position: relative;
    /* cursor: help; */
  }
  
.tooltip .tooltiptext {
    visibility: hidden;
    width: 160px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 99;
    bottom: 125%; /* Show above the element */
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: opacity 0.2s;
  }
  
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }

/* ========== Modernized Feed Settings Container ========== */

.feed-settings-container {
    /* background: var(--chat-bg); 
    border: 1px solid #ddd; */
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    font-family: 'Manrope', sans-serif;
    color: #333;
    /* box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05); Soft outer shadow */


    /* background and border transparent and none */
    background-color: transparent !important;
    border: none !important;
  }
  
  /* Title: slightly larger, bolder, with a bottom border for emphasis */
  .feed-settings-container h3 {
    text-align: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #129ed9;     /* A modern highlight color for the title */
    border-bottom: 1px solid #eee; 
    padding-bottom: 8px; 
  }
  
  /* Optional: limit the paragraph width slightly for better readability */
  .feed-settings-container p {
    max-width: 600px;
    margin: 0 auto 16px; 
    line-height: 1.5;
    /* color: #555; */
    color: #6B7280;
  }
  
  /* The row containers remain largely the same, 
     just a bit more margin & gap for clarity */
  .settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
  }
  
  /* For 3-column or 2-column layouts on larger screens */
  @media (min-width: 769px) {
    .settings-row.three-items > div {
      flex: 1 1 calc(33.333% - 20px);
    }
    .settings-row.two-items > div {
      /* make sure they are next to each other */
        flex: 1 1 calc(50% + 20px);
    }
    .settings-row.single-item > div {
      flex: 1 1 100% !important;
    width: 100% !important;
    }
  }
  
  /* Each field-group (label+input) 
     gets a mild background, border, etc., to stand out. */
  .field-group {
    display: flex;
    align-items: center;
    gap: 8px; 
    background: var(--chat-bg); /* Slightly darker background */
    /* border: 1px solid #ddd; */
    border-radius: 6px;
    padding: 8px 10px;
    transition: background-color 0.2s ease;
  }
  

  
  /* Label text */
  .field-group label {
    cursor: default;
    font-weight: 500;
    margin: 0;
    color: #333;
  }
  
  /* Input & select styling */
  .field-group select,
  .field-group input[type="text"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    min-width: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
  }
  
  .field-group select:focus,
  .field-group input[type="text"]:focus {
    border-color: #129ed9;
    outline: none;
  }
  
  /* For checkboxes, add a bit of spacing after label text */
  .field-group input[type="checkbox"] {
    margin-left: 5px;
    cursor: pointer;
  }
  
  /* Modernize the tooltip text (already in your CSS, 
     but we can refine it for consistency) */
  .feed-settings-container .tooltip {
    position: relative;
    min-width: 100px;
  }
  
  .feed-settings-container .tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #333 !important;
    color: #fff !important;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  /* tooltip should appear a bit above the mouse, and have white background with a border */
    .feed-settings-container .tooltip .tooltiptext {
        bottom: 125% !important;
        background-color: var(--sidebar-bg3);
        color: #333;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 8px;
        margin-bottom: 5px;
        margin-left: 20px;
        font-size: 15px;
        font-family: 'manrope', sans-serif;
    }
  
  .feed-settings-container .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -4px); /* Slight upward shift on hover */
  }


.product-buttons h3 {
    /* color: rgba(68, 171, 215, 0.20); */
    color: #333;
    /* align left */
    text-align: left;
    /* bit margin left and botton */
    /* margin-left: 10px; */
    margin-bottom: 10px;
}



.button-container h3 {
    /* color: rgba(68, 171, 215, 0.20); */
    color: #333;
    /* align left */
    text-align: left;
    /* bit margin left and botton */
    /* margin-left: 10px; */
    margin-bottom: 10px;
    margin-top: 20px;
}



.button-container p {
    max-width: 800px;
    font-family: 'manrope', sans-serif;
}


.custom-radio.tooltip {
    max-width: 200px;
}

/* Style for the keyword insights section */
#keywordInsightsSection {
    margin-top: 20px;
    /* No fixed max-height here as it's handled by the table container */
}

/* Style for the keyword insights table */
#keywordInsightsTable table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'manrope', sans-serif; /* Nice font */
}

#keywordInsightsTable th, #keywordInsightsTable td {
    border: 1px solid #ddd;
    padding: 8px;
}

#keywordInsightsTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#keywordInsightsTable tr:hover {
    background-color: #f1f1f1;
}

#keywordInsightsTable th {
    padding-top: 12px;
    padding-bottom: 12px;
    background-color: rgba(243, 243, 243, 0.5);
    color: #333; /* Updated text color from white to #333 */
    text-align: left;
    font-size: 14px;


}

/* Style for the chart container */
#keywordChartContainer {
    width: 100%;
    height: 400px; /* Adjust as needed */
    font-family: 'manrope', sans-serif; /* Nice font */
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (min-width: 769px) {
    #keywordInsightsTable {
        display: inline-block;
        width: 48%;
        vertical-align: top;
        max-height: 400px; /* Ensure it matches the chart's height */
    }

    #keywordChartContainer {
        display: inline-block;
        width: 48%;
        margin-left: 4%;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    #keywordInsightsTable {
        width: 100%;
        margin-bottom: 20px;
        max-height: none; /* Remove max-height on mobile to allow full height if needed */
        overflow-y: auto;  /* Keep scrollable on smaller screens */
    }

    #keywordChartContainer {
        width: 100%;
        height: 400px; /* Maintain chart height */
        margin-left: 0;
    }
}

#merchantOverviewSection {
    display: flex;
    flex-wrap: wrap;  /* so the charts can wrap to the next line on small screens */
    gap: 20px;        /* space between charts */
  }
  
#merchantOverviewSection > div {
    /* each chart container gets a max width so they appear side by side on desktop */
    flex: 1 0 45%;  /* 45% width, allows 2 side-by-side plus some margin */
    box-sizing: border-box;
}



/* Tooltip label */
.field-group label {
    cursor: default;
    font-weight: 500;
    margin: 0; /* reset margin if needed */
    color: #333;
}





#saveAutoSync {
    padding: 8px 8px;
    background-color: #129ed9;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'manrope', sans-serif;
    font-size: 13px;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}






/* Create Content Container */
.create-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: var(--chat-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    width: 95%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}
/* Create Examples Grid */
.create-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row on larger screens */
    gap: 20px; /* Spacing between cards */
    justify-items: center; /* Center cards horizontally */
}

/* Responsive Behavior */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .create-examples {
        grid-template-columns: 1fr; /* 1 card per row on smaller screens */
    }

    .create-card {
        width: 100%; /* Ensure cards take the full width */
        max-width: none; /* Override max-width if set */
    }
}

/* Example Card */
.create-card {
    padding: 20px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    
    text-align: center;
}

/* Create Button */


/* center h4 in create content */
.create-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.create-content h4 {
    margin-bottom: 10px;
}



.create-button {
    border: none;
    padding: 12px 20px;
    width: 100%;
    max-width: 110px;
    font-size: 16px;
    color: var(--input-text);
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: color var(--transition-speed);
    cursor: pointer;
    background-color: var(--sidebar-hover);
    /* center text within to fint content */
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
    
    /* fit content */
    /* width: fit-content; */
}




.create-button i {
    color: var(--primary-color);
    margin-right: 10px;
}

.create-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-top: 15px; /* Optional spacing */
    margin-bottom: 15px; /* Optional spacing */
}




/* center align error-message and center its p text too */
.error-message {
    text-align: center;
    font-family: 'manrope', sans-serif;
    font-size: 16px;
    color: var(--input-text);
    margin-top: 10px;
}



/* center align  its p text too */
.error-message p {
    text-align: center;
    font-family: 'manrope', sans-serif;
    font-size: 15px;
    color: var(--input-text);
    margin-top: 10px;
}

/* Modern Toast Styling - Right Lower Corner */
.toast {
    visibility: hidden;
    min-width: 280px;
    max-width: 400px;
    background: rgba(50, 50, 50, 0.7); /* Dark semi-transparent */
    color: #fff; /* White text */
    text-align: left; /* Align text properly */
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    bottom: 20px;
    right: 20px; /* Anchored to the right */
    transform: translateY(100px); /* Initially hidden */
    z-index: 1000;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 12px; /* Space between icon & text */
    transition: opacity 0.4s, transform 0.4s ease-in-out;
}

/* Toast Icon */
.toast i {
    font-size: 18px;
    color: #00D26A; /* Success green by default */
}

/* Visible State */
.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Auto-dismiss animation */
@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* Stack multiple toasts nicely */
.toast + .toast {
    margin-top: 10px;
}

/* mobile fix */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .toast {
        max-width: 100%;
        right: 0;
        left: 0;
        margin: 0 20px;
    }
}



.modal-image {
  max-width: 120px;
  max-height: 120px;
  margin: 6px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.modal-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}


.ali-description img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin: 8px 0;
  display: block;
}


@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(100% + 200px) 0;
  }
}

.product-row.shimmer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  background-size: 200px 100%;
  animation: shimmer 1s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: 6px;
}
.product-row {
  position: relative; /* required for ::before to work */
}
  
  .import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  
  .template-switcher {
    display: flex;
    align-items: center;
  }
  
  .template-switcher label {
    margin-right: 8px;
    font-weight: bold;
  }
  
  .import-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }
  
  .url-import,
  .multi-url-import {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .url-import input,
  .multi-url-import textarea {
    padding: 8px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;


  }
  
  .url-import {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  
  .url-import input {
    flex: 1;
  }
  
  .multi-url-import textarea {
    resize: vertical;
    height: 80px;
  }
  

  .import-button, .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button12,  .import-button13, .import-button14, .import-button15, .import-button-import {
    position: relative;
    border: none;
    padding: 6px 10px;
    margin: 5px;
    /* width: 200px; */
    font-size: 16px;
    color: #333;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed), transform var(--transition-speed);
    cursor: pointer;
    background-color: var(--chat-bg);
    justify-content: center;
    font-family: 'Inter Variable', sans-serif;
    margin-top: 10px !important;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    
    /* width: 125px; */
  }


  
  .import-butt .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button13, .import-button14, .import-button15, .import-button12:hover, .import-button-import {
    background-color: var(--sidebar-bg2);
}

  
  .feed-settings {
    display: flex;
    gap: 20px;
  }
  
  .setting label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
  }
  
  .setting select {
    padding: 6px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
  }
  
  .template-content {
    margin-bottom: 20px;
  }
  
  .template-area {
    display: block;
  }
  
  .template-area.hidden {
    display: none;
  }
  
  .template-textarea {
    width: 100%;
    height: 100px;
    padding: 8px;
    background-color: var(--input-bg);
    color: var(--input-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
  }


  .ai-custom-templates-section {
    margin-top: 50px;
    background-color: transparent;
    width: 90%;
  }
  
  .import-preview {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
  }
  
  .import-preview-content {
    padding: 10px;
    background: var(--sidebar-bg);
    border-radius: 4px;
    min-height: 50px;
  }
  
  /* Product List / Selection Styles */
  .product-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--sidebar-bg);
    margin-bottom: 10px;
  }
  
  .select-all-row {
    padding: 10px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
  }
  
  .product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .product-row:last-child {
    border-bottom: none;
  }
  





/* Options Panel */
.options-panel {
    position: fixed;
    top: 10px; /* Adjusted to the earliest definition */
    right: -400px; /* Hidden by default */
    width: 400px;
    height: 98%; /* Adjust height */
    background-color: var(--sidebar-bg);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.01);
    transition: right 0.3 ease;
    z-index: 10003; /* Above sidebar */
    display: flex;
    flex-direction: column;
    border-radius: 10px; /* Slightly rounded corners */
    margin-bottom: 10px;
    
}

/* on mobile panel full screen */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .options-panel {
        width: 100%;
        right: -100%;
    }
}

.options-panel.open {
    /* Slide in when open  */
    right: 0;
    /* faster */
    transition: right 0.3s ease;
}

/* Options Header */
.options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px;
    background-color: var(--sidebar-bg2);
    /* border-bottom: 0.5px solid var(--border-color); */
    /* slight shadow bottom */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    height: 65px;
    /* border-radius: 8px; */
    /* radius only top left */
    border-top-left-radius: 8px;
}

.options-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-family: 'Inter Variable', sans-serif;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 24px;
    cursor: pointer;
}

.options-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    /* margin-bottom: 10px; */
    background-color: #FDFDFD;
    padding-top: 5px;
    color: var(--primary-color);
    /* margin-bottom: 10px; */
    /* border-bottom: 1px solid var(--border-color); */
    /* rounded borders on bottom, and border */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-left: 0.5px solid #E8E8E8;
    border-right: 0.5px solid #E8E8E8;
    border-bottom: 0.5px solid #E8E8E8;
}

/* Checkbox Group - Vertical Alignment */
.checkbox-group {
    display: flex;
    flex-direction: column; /* Stack checkboxes vertically */
    align-items: flex-start; /* Align checkboxes to the start (left) */
    gap: 10px; /* Space between each checkbox-label pair */
    margin-bottom: 10px; /* Adjust as needed */
}


/* h3 in checkbox group 18 font */
.checkbox-group h3 {
    font-size: 18px;
    color: var(--text-color);
    font-family: 'manrope', sans-serif;
    margin-top: 10px;
    margin-bottom: 10px;
}



/* Billing container */
.billing-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background: var(--background-color)
  }
  
  /* Each billing card */
  .billing-card {
    background: #fff;
    border-radius: 5px;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); */
    /* less shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    width: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    /* minimal border line */
    border: 0.5px solid var(--border-color);
    font-family: 'Inter Variable', sans-serif;
  }
  
  .billing-card:hover {
    /* transform: translateY(-1px); */
    /* box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); */
    /* less shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Card Header */
  .billing-card h3 {
    font-family: 'Inter Variable', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #333333e2;
    font-weight: normal;
  }
  
  /* Description & Price */
  .billing-card p {
    font-family: 'Inter Variable', sans-serif;
    margin: 4px 0;
    margin-left: 5px;
    color: #777;
  }
  
  .billing-card h4 {
    font-family: 'Inter Variable', sans-serif;
    font-size: 1.3rem;
    margin: 10px 0 4px;
    margin-left: 5px;
    color: #333333e2;
    font-weight: normal;
  }
  
  /* Feature List */
  .billing-card ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    width: 100%;
    margin-left: 30px;
  }
  
  .billing-card ul li {
    display: flex;
    align-items: center;
    font-family: 'Inter Variable', sans-serif;
    color: #555;
    margin: 6px 0;
  }
  
  .billing-card ul li i {
    color: #129ed9;
    margin-right: 8px;
  }
  
  .billing-card ul li.not-included {
    color: #bbb; /* Gray out the text */
}

.billing-card ul li.not-included span {
    text-decoration: line-through; /* Only strike through the text */
    margin-left: 7px;
}

.billing-card ul li.not-included i {
    color: #bbb; /* Keep the icon in red */
    text-decoration: none; /* Ensure the icon has no line-through */
    margin-right: 8px;
}

#ownedFeaturesContainer {
  /* max-width: 500px; */
  text-align: center;
  background-color: #ffffff;
  border-radius: 16px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  width: 400px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 0.5px solid var(--border-color);

  /* center in middle */
  margin-left: auto;
  margin-right: auto;
  margin-top: 50px;
  margin-bottom: 50px;

}

#ownedFeaturesContainer h4 {
  font-size: 17px;
  margin-bottom: 16px;
  color: #333;
}

.owned-feature-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  /* background: #fff; */
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.owned-feature-row span {
  font-weight: 500;
  color: #444;
}

.cancel-feature-button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #444;
  transition: background 0.2s, color 0.2s;
}

/* Card wrapper */
.modern-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 24px;
  margin-bottom: 24px;
}

/* Feed settings grid */
.feed-settings-container .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}

/* Field grouping */
/* .field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
} */

/* .field-group label {
  font-weight: 500;
  color: #333;
} */

.field-group select,
.field-group input[type="text"],
.field-group input[type="checkbox"] + span {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Shipping section tweak */
.shipping-section {
  grid-column: span 2;
}

/* Rules two-column layout */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

/* Rule list pane */
.rules-list {
  max-height: 600px;
  overflow-y: auto;
}

.rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: grab;
}
.rule-item:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* Rule form pane */
.rule-form-panel .rule-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rule-form-panel .rule-form .form-group {
  display: flex;
  flex-direction: column;
}
.rule-form-panel .rule-form label {
  font-weight: 500;
}
.rule-form-panel .rule-form input,
.rule-form-panel .rule-form select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Buttons */
.btn-primary {
  background: #129ed9;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary:hover {
  background: #0f8bb8;
}

.btn-outline {
  background: transparent;
  color: #129ed9;
  border: 1px solid #129ed9;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-outline:hover {
  background: #129ed9;
  color: #fff;
}


.feature-subheadline {
  font-size: 16px;
  color: #555;
  margin-bottom: 10px;
  /* center in middle */
  text-align: center;
  font-family: 'Inter Variable', sans-serif;
  /* center in screen */
  margin-left: auto;
  margin-right: auto;

}

  
  /* Responsive adjustments */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .billing-content {
      flex-direction: column;
      align-items: center;
    }
    .billing-card {
      width: 90%;
    }
  }



  #creditsWrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    padding: 10px 20px;
    
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: system-ui, sans-serif;
    border: 0.5px solid #ddd;
  }
  
  #creditsLabel, #autoListCreditsLabel {
    font-size: 16px;
    font-weight: 500;
    color: #333;
  }
  
  #addCreditsBtn {
    padding: 6px 12px;
    font-size: 14px;
    border: 0.5px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  





  /*******************************************
 * FEATURE SELECTION ROW
 *******************************************/
.feature-selection-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
  }
  
  .feature-card {
    position: relative; 
    flex: 0 0 auto;
    background-color: #fff;
    border: 0.7px solid #ddd;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    min-width: 140px;
    text-align: center;
    font-family: 'inter variable', sans-serif;
    font-size: 1rem;
    color: #555;
  }

  .feature-card {
    overflow: visible; /* ensure label can overflow */
  }
  
  .label-free {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #28c76f;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
  }

  .feature-card img {
    width: 125px;
    height: auto;
    display: block;
    margin: 0 auto; /* optional: centers the image */
  }

  .logo-header {
    width: auto;
    height: 25px;
    display: block;
    margin: 0 auto; /* optional: centers the image */
  }
  
  .feature-badge {
    position: absolute;
    top: -10px; /* Moves badge up by 10px */
    right: -10px; /* Moves badge right by 10px to touch corner */
    background-color: #99f1c1; /* Green badge */
    color:  green;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

  .feature-card:hover {
    background-color: #ebebeb;
  }
  
 

  .feature-card.active[data-feature="product-lister"] {
    background-color: #41cc7b44; /* Light green */
    border-color: #2ecc71;
    color: #555; /* same text color as default */
  }
  
  /* 2) Feed Management => #3498db44 for light blue */
  .feature-card.active[data-feature="feed-management"] {
    background-color: #3498db44;
    border-color: #3498db;
    color: #555;
  }
  
  /* 3) Ad Campaigns => #ff573344 (light orange/red) */
  .feature-card.active[data-feature="ad-campaigns"] {
    background-color: #ff573344;
    border-color: #ff5733;
    color: #555;
  }
  
  /* 4) Insights => #f3cb2a43 (light yellow) */
  .feature-card.active[data-feature="insights"] {
    background-color: #f3cb2a43;
    border-color: #f1c40f;
    color: #555;
  }
  
  /* 5) Chatbot => e.g. #9b59b644 (light purple) */
  .feature-card.active[data-feature="chatbot"] {
    background-color: #9b59b644;
    border-color: #9b59b6;
    color: #555;
  }
  
  /* 6) AI Agent => #129ed933 (light brand color) */
  .feature-card.active[data-feature="ai-agent"] {
    background-color: #129ed933;
    border-color: #129ed9;
    color: #555;
  }

  
  
  /*******************************************
   * SUMMARY BOX AT THE BOTTOM
   *******************************************/
  .summary-box {
    max-width: 500px;
    min-width: 300px;
    margin: 2rem auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    /* minor shadow around box */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }
  
  .summary-box h3 {
    margin-top: 0;
    text-align: center;
    font-family: 'Inter Variable', sans-serif;
    color: #333333E2;
    font-weight: normal;
    margin-bottom: 10px;
  }
  
  .chosen-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.5rem 0;
  }
  
  .chosen-sub-row:last-child {
    border-bottom: none;
  }
  
  .chosen-sub-label {
    font-weight: normal;
    /* add some spacing right */
    margin-right: 1rem;
    font-family: 'Inter Variable', sans-serif;
  }
  
  .chosen-sub-price {
    margin-left: 1rem;
    color: #333333E2;
    /* align right with a little space */
    margin-left: auto;
    font-family: 'Inter Variable', sans-serif;
    font-weight: normal;

  }
  
  /* "X" remove button on the right */
  .remove-sub-button {
    background: none;
    border: none;
    color: #c33;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 8px;
  }
  
  /* The row at the bottom showing total price */
  .summary-total-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 1.03rem;
    font-weight: bold;
    margin-bottom: 15px;
    margin-right: 18px;
    font-family: 'Inter Variable', sans-serif;
    color: #333333E2;
  }
  
  /* The "Checkout" button */
  .checkout-button {
    margin-top: 1rem;
    width: 100%;
    padding: 0.7rem;
    border: none;
    background-color: #129ed9;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: background-color 0.2s;
  }
  
  .checkout-button:hover {
    background-color: #0a89b5;
  }

  canvas {
    max-width: 100%;
    height: auto;
  }

  #previewOverview {
    margin-top: 10px;
    padding: 10px 14px;
    background-color: rgba(18, 158, 217, 0.1) !important;
    border: 0.5px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #333 !important;
    /* light font, not bold */
    font-weight: 300 !important;
    /* slight minimal shadow */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  
    /* Optional: If you want it centered and narrower on large screens */
    max-width: 500px; 
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 5px;
  }


  /* Label for "X affected products" */
.affected-label {
    background-color: #129ed9;
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-block;
    margin-top: 5px;
  }


  /* ========== Updated or Added Styles for Compound Conditions and Else Action ========== */

/* Container that holds "Conditions Logic" (AND/OR) and each added condition row */
#compoundConditionsContainer {
    margin-top: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    max-width: 100%;
  }
  
  /* The label for "Conditions Logic:" */
  #compoundConditionsContainer > label {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: inline-block;
    font-family: 'Manrope', sans-serif;
  }
  
  /* The select for AND/OR logic */
  #compoundLogic {
    margin-left: 10px;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    color: #333;
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
  }
  
  #compoundLogic:focus {
    outline: none;
    border-color: #129ed9;
  }
  
  /* The container (list) where new condition rows are added */
  #compoundConditionsList {
    margin-top: 10px;
  }
  
  /* Each row of compound condition */
  .compound-condition {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  /* Fields inside each row (field select, operator select, value input) */
  .compound-condition select,
  .compound-condition input[type="text"] {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    min-width: 120px;
    color: #333;
    background: #fff;
    font-family: 'Manrope', sans-serif;
  }
  
  .compound-condition select:focus,
  .compound-condition input[type="text"]:focus {
    outline: none;
    border-color: #129ed9;
  }
  

  
  /* ---------- Else Action Styling ---------- */
  #elseActionContainer {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  
  #elseActionContainer h4 {
    margin-top: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
  }
  
  /* The select for elseActionType */
  #elseActionType {
    margin: 0 10px 10px 0;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    color: #333;
    font-family: 'Manrope', sans-serif;
  }
  
  #elseActionFields {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  #elseActionFields select,
  #elseActionFields input[type="text"] {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    color: #333;
    background: #fff;
    font-family: 'Manrope', sans-serif;
    min-width: 120px;
  }
  
  #elseActionFields select:focus,
  #elseActionFields input[type="text"]:focus {
    outline: none;
    border-color: #129ed9;
  }



  /* ========== Modernized Rule Display & If/Then CSS ========== */

/* Main container for each rule, styled as a "card" */
.rule-item {
    position: relative; /* for positioning the affected label if you want it top-right */
    background: #fff;
    margin-bottom: 15px;
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    color: #333;
    font-family: 'Manrope', sans-serif;
  }
  
  /* Hover effect for the card */
  .rule-item:hover {
    background: #fafafa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  
  /* If/Then lines */
  .rule-item p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
  }
  
  /* Make "If" & "Then" stand out in a nice color */
  .rule-item p strong {
    color: #333 !important; 
    margin-right: 4px; 
    font-weight: 600;
  }
  
  /* The label showing how many products are affected */
  .affected-label {
    background-color: rgba(68, 171, 215, 0.3);
    color: #333333ce;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
    margin-top: 5px;
    font-family: 'Manrope', sans-serif;
  
    /*  If you want it top-right corner, uncomment: */
    position: absolute;
    top: 10px;
    right: 12px; 
    
  }
  
  /* Style for the delete button in each rule item */
  .rule-item button {
    margin-top: 40px;
    padding: 6px 12px;
    background: transparent;
    color: #444;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  /* ========== If–Then Form Upgrades ========== */
  
  /* For the "If" line (condition) and "Then" line (action) in the form */
  .rule-condition, .rule-action {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  
  /* Slight styling for the label "If" and "Then" text */
  .rule-condition > label,
  .rule-action > label {
    font-weight: 600;
    color: #129ed9;
    margin-right: 5px;
  }
  
  /* Make the selects & inputs a bit tidier */
  .rule-condition select,
  .rule-condition input[type="text"],
  .rule-action select,
  .rule-action input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    background: #fff;
    font-family: 'Manrope', sans-serif;
    min-width: 120px;
  }
  .rule-condition select:focus,
  .rule-condition input[type="text"]:focus,
  .rule-action select:focus,
  .rule-action input[type="text"]:focus {
    outline: none;
    border-color: #129ed9;
  }
  
  /* For the rule-scope radio group */
  .rule-scope {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin: 15px 0;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #333;
  }
  .rule-scope label {
    margin-right: 15px;
    cursor: pointer;
  }


.rule-scope strong {
    margin-bottom: 5px;
}
  
  /* The "Add Condition" button in compound conditions container */
  #compoundConditionsContainer button[type="button"] {
    padding: 6px 10px;
    color: #444;
    background-color: transparent;
    border: 1px solid #444;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  
  /* The "Else Action" container */
  #elseActionContainer {
    margin-top: 12px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  #elseActionContainer h4 {
    margin-top: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    font-family: 'Manrope', sans-serif;
    margin-bottom: 10px;
  }
  /* The select for elseActionType */
  #elseActionType {
    margin: 0 10px 10px 0;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    color: #333;
    font-family: 'Manrope', sans-serif;
  }
  
  /* The container holding the elseAction fields (new field, new value, etc.) */
  #elseActionFields {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  #elseActionFields select,
  #elseActionFields input[type="text"] {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    color: #333;
    background: #fff;
    font-family: 'Manrope', sans-serif;
    min-width: 120px;
  }
  #elseActionFields select:focus,
  #elseActionFields input[type="text"]:focus {
    outline: none;
    border-color: #129ed9;
  }


  
  /* Each individual store checkbox+label pair */
  .selected-shop-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .selected-shop-option {
    display: inline-block;  /* Ensures shops appear next to each other */
    margin-right: 10px;      /* Add spacing between them */
    padding: 5px;
    border: 1px solid #ddd;  /* Optional: Add a border */
    border-radius: 5px;      /* Optional: Rounded corners */
}
  
  .selected-shop-option:hover {
    background-color: #f2f2f2;
  }
  
  /* The actual checkbox input */
  .selected-shop-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
  }
  
  /* The label for the store name */
  .selected-shop-option label {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #333;
    cursor: pointer;
  }

  /* ========== Rules Container Matches Feed Settings Card ========== */
.rules-list-container {
    background: transparent; /* White card, same as feed-settings-container */
    border: none;
    border-radius: 8px;
    /* box-shadow: 0 3px 8px rgba(0,0,0,0.05); Subtle outer shadow */
    padding: 20px;
    margin: 24px 0;
    font-family: 'Manrope', sans-serif;
    color: #333;
    margin-bottom: 60px;
  }
  
  /* ========== Individual Rule Rows (Light Gray) ========== */
  .rule-item {
    background: #fff;       /* Light gray background for each rule row */
    border: 1px solid #ddd;    /* Small border around each rule row */
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 14px 16px;
    transition: background 0.3s ease;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
  }
  
  /* Hover effect: slightly darker gray */
  .rule-item:hover {
    background: #f2f2f2;
  }
  


  #elseActionContainer {
    margin-top: 12px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
  }

  .rule-item p.else-line {
    margin: 6px 0 0 0;
    font-size: 14px;
    color: #444;
  }
  .rule-item p.else-line strong {
    color: #e67300; /* a distinct color for "Else" if you like */
  }



  /* Optional: unify styling for "Add Condition" and a hypothetical "Add Else" button: */
.blue-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background-color: #129ed9;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
  }
  .blue-btn:hover {
    background-color: #0e86c1;
  }


  /* Ensure selected shops appear in a single row (wraps if needed) */
#selectedShopsContainer {
    display: flex;
    flex-wrap: wrap;  /* Allows wrapping if too many items */
    gap: 10px;  /* Space between checkboxes */
    padding: 10px;
    margin-top: 10px;
    background-color: #f9f9f9;
    /* border: 1px solid #ddd; */
    border-radius: 6px;
}

/* Each individual shop selection */
.selected-shop-option {
    display: flex;
    align-items: center; /* Ensures vertical alignment */
    gap: 6px;  /* Space between checkbox and text */
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;  /* Prevents text wrapping */
}

/* Ensure all shop options stay inline */
.selected-shop-option {
    display: inline-flex;  /* Keep checkboxes and labels in the same row */
    margin-right: 8px;  /* Add spacing between each shop */
}

/* Add hover effect */
.selected-shop-option:hover {
    background-color: #f2f2f2;
}

/* Ensure checkbox is aligned properly */
.selected-shop-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Ensure label text is properly aligned */
.selected-shop-option label {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.2;
    vertical-align: middle; /* Aligns text vertically */
}

/* Add spacing between rows */
#selectedShopsContainer > .selected-shop-option {
    margin-bottom: 5px;  /* Adds space between rows */
}


/* Store Container */
.store-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 0 auto;
  }

  .store-card {
    background: var(--sidebar-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.store-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0 0 12px;
    font-weight: 600;
    font-family: 'Inter Variable', sans-serif;
}

.store-url {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.store-url:hover {
    color: var(--primary-color-dark);
}

.store-description {
    color: var(--text-color-secondary);
    font-size: 0.95rem;
    margin: 0 0 16px;
    line-height: 1.5;
    font-family: 'Inter Variable', sans-serif;
}

.project-settings-button {
    padding: 8px 16px;
    background: rgba(18, 158, 217, 0.1);
    color: var(--primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: 'Inter Variable', sans-serif;
}

.project-settings-button:hover {
    background: rgba(18, 158, 217, 0.15);
}

.store-owner-label {
    font-size: 0.85rem;
    color: var(--text-color-secondary);
    margin-top: 12px;
    font-family: 'Inter Variable', sans-serif;
}

.store-owner-label strong {
    color: var(--text-color);
}

.stores-container {
    margin-left: 20px; /* Indent sub-stores */
    margin-top: 5px;
}
  
  .stores-container.hidden {
    display: none;
  }
  
  /* Store Title */
  .store-title {
    color: #444;
    font-family: 'Inter Variable', sans-serif;
    margin-bottom: 10px;
  }
  
  /* Store URL */
  .store-url {
    color: #129ed9;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
    font-family: 'Inter Variable', sans-serif;
  }
  
  /* Store Description */
  .store-description {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Inter Variable', sans-serif;
    
  }
  
  /* Add User Container */
  .add-user-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .add-user-text {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    font-family: 'Inter Variable', sans-serif;
  }
  
  /* Input Field */
  .input-field {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    min-width: 180px;
    font-size: 15px;
    font-family: 'Inter Variable', sans-serif;
  }
  
  /* Add User Button */
  .project-settings-button {
    background-color: var(--chat-bg);
    color: #444;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
    border: 1px solid var(--border-color);
    margin-top: 10px;
    margin-right: 3px;
    margin-left: 3px;
  }
  



  /* Responsive */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

  @media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .store-card {
      flex: 1 1 calc(100% - 20px);
    }
  }



  .rule-item-button {
    margin-top: 10px;
    padding: 6px 12px;
    background: transparent;
    color: #f44336;
    border: 1px solid #f44336;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-left: 3px;
  }


  .rule-item-button2 {
    /* margin-top: 3px; */
    padding: 6px 12px;
    background: transparent;
    color: #f44336;
    border: 1px solid #f44336;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-left: 3px;
  }




  .shipping-option {
    display: flex;
    align-items: center;
    gap: 10px; /* Ensure consistent spacing */
    padding: 8px 10px;
    background: var(--chat-bg); /* Match existing row */
    border-radius: 6px;
    /* border: 1px solid var(--border-color); Add a border */
    margin-bottom: 10px;
    font: 'manrope', sans-serif;
    color: #333333;

    /* make sure the items don't stretch too wide */
    

}


/* on mobile, shipping options should be on rows of max 2 */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .shipping-option {
        flex-wrap: wrap;
        gap: 10px;
    }
}


.shipping-option select,
.shipping-option input {
    padding: 6px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: #444;
    max-width: 125px;
}

.shipping-option:focus,
.shipping-option input[type="text"]:focus {
  border-color: #129ed9;
  outline: none;
  color: #444;
}





.remove-shipping-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}


/* Ensure the shipping options container doesn't affect the add button */
#shippingOptionsRow {
    display: flex;
    flex-direction: column;
  }
  
  /* Wrap the add button in its own container with fixed styling */
  .add-shipping-wrapper {
    text-align: left; /* or center/right as desired */
  }
  
  /* Style the add shipping button */
  .add-shipping-btn {
    padding: 8px 12px !important;
    font-size: 15px !important;
    cursor: pointer !important;
    width: auto !important;
    /* Additional styling (colors, border, background) as needed */
    background-color: transparent !important;
    color: var(--input-text) !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-family: 'Manrope', sans-serif !important;
  }


  .add-shipping-wrapper {
    margin-top: 10px;
    text-align: left;
  }




/* Outer container for your import interface */
#importInterface {
    background: #fafafa;
    font-family: 'Poppins', sans-serif;
    color: var(--input-text);
    align-items: center;
    
    /* If you want an overall vertical scroll, but each product-list has its own max-height */
  }
  
  /* Generic card styling (applies to both existing-products-card & import-products-card) */
  .card {
    /* background-color: #fafafa;  */
    border-radius: 8px;
    width: 80%;
    margin-bottom: 30px;

  }

  /* 100% width of card image-processing-preview-card */
  .image-processing-preview-card {
    background-color: transparent; 
    border-radius: 8px;
    width: 100%;
    margin-bottom: 10px;
  }
  
  /* Header inside each card */
  .card-header h2 {
    margin-top: 20px;
    /* font-size: 20px; */
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px; /* space around icon */
    /* regular font */
    font-weight: bold;
    font-family: 'manrope', sans-serif;
    margin-top: 50px;
  }
  .card-subtext {
    /* margin-top: 5px; */
    color: #666;
    font-size: 16px;
    font-family: 'Inter Variable', sans-serif;
    margin-bottom: 20px;
  }
  
  /* Template switcher row */
  .template-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
  }
  
  /* Template content areas */
  .template-content-existing,
  .template-content-import {
    background: var(--chat-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
  }
  .template-area h4 {
    margin-bottom: 8px;
    color: #333;
  }
  .template-textarea {
    width: 100%;
    min-height: 80px;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
  }
  .template-textarea[readonly] {
    background-color: #f9f9f9;
    color: #777;
    cursor: not-allowed;
  }
  
  /* Bulk-edit sections inside each card */
  .bulk-edit-section, .bulk-copy-section, .bulk-image-section {
    background: #FFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    margin-top: 30px;
    margin-left: 5px;
    max-width: 800px;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;


  }
  .bulk-edit-title, .bulk-copy-title, .bulk-image-title {
    font-size: 16px;
    margin-bottom: 15px;
    margin-top: 25px;
    margin-left: 5px;
    color: #333333;
    /* regular font */
    font-weight: 400;
    font-family: 'Inter Variable', sans-serif;
  }
  .bulk-edit-helptext, .bulk-copy-helptext, .bulk-image-helptext {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    margin-top: 5px;
    margin-left: 5px;
    font-family: 'Inter Variable', sans-serif;
    width: 90%;
  }

  .template-field-row {
    margin-bottom: 20px;
    margin-top: 25px;
  }

  .bulk-copy-helptext{
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .bulk-edit-row, .bulk-copy-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
  
  /* Product list container - no scrolling, use pagination */
  .product-list {
    /* border-top: 1px solid #ddd; */
    /* Removed max-height and overflow for pagination */
    margin-top: 20px;
    margin-bottom: 40px;
    /* border: 1px solid #ddd; */
    /* rounded borders */
    border-radius: 8px;
  }
  
  /* Product rows */
  .product-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    padding: 10px 8px;
    transition: background-color 0.2s;
  }
  /* ⚠️ DISABLED - causing extreme flickering with 5+ images
  .product-row:hover {
    background-color: #f9f9f9;
  }
  */
  .product-thumbnail img {
    width: 70px; 
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
  }
  .product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .product-info h4 {
    margin: 0;
    font-size: 14px;
    color: #444;
    font-family: 'Manrope', sans-serif;
  }
  .product-info p {
    margin: 0;
    font-size: 13px;
    color: #555;
  }
  .product-status {
    margin-left: auto;
    color: #666;
    font-size: 13px;
  }
  .product-details {
    display: none;
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
  }
  .product-details.visible {
    display: block;
    /* animation: fadeIn 0.2s ease-in-out; */
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  
  /* Import sources .source-card styling, etc. */
  .import-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
    margin-top: 32px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
  
  /* New single-column grid layout for import sources */
  .import-sources-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }
  
  .import-sources-grid .source-card {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    margin: 0 !important;
  }
  
  /* Add extra spacing before AliExpress (first aggregator section) */
  .import-sources-grid .source-card[data-source="aliexpress"]:first-of-type {
    margin-top: 24px !important;
  }
  
  .import-sources-grid .source-card img {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
  }
  
  .source-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px;
    flex: 1 1 280px;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  }

  
  .source-card h4 {
    font-size: 17px;
    margin-bottom: 10px;
    color: #333333;
    /* regular font */
    font-weight: 400;
    font-family: 'Inter Variable', sans-serif;
  }


  .source-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    font-family: 'Inter Variable', sans-serif;
  }


/* Start with details hidden: 0 max-height + opacity 0. 
   Use overflow:hidden to hide the content while collapsed. */
   .product-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    /* transition: max-height 0.3s ease, opacity 0.3s ease; */
  }
  
  /* When toggled to "visible," smoothly expand + fade in. 
     2000px is just a big number so the content can fully expand 
     without abrupt cutoffs. Adjust as needed. */
  .product-details.visible {
    max-height: 2000px;
    opacity: 1;
  }
  
  /* Footer area in the import card */
  .import-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
  }
  .primary-action-button {
    background-color: #00aa88;
    color: #fff;
    font-size: 15px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
  }
  .primary-action-button:hover {
    background-color: #008e71;
  }
  
  /* Example button styles (you can unify these) */
  .refresh-button,
  .import-button, .import-button-x, .import-button1, .import-button2, .import-button3, .import-button4, .import-button5, .import-button6, .import-button7, .import-button8, .import-button9, .import-button10, .import-button11, .import-button12, .import-button13, .import-button14, .import-button15, .import-button-import
  .ai-button,
  .apply-button {
    /* style them as you wish */
    border: 1px solid #ccc;
  }
  
  /* CSV preview container */
  .csv-preview {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
    font-size: 12px;
    color: #333;
  }




  /* The main container that holds the 4 cards */
.step-cards-container {
    /* display: flex; */
    /* flex-wrap: wrap; */
    /* top: 50%;
    left: 50%; */
    /* transform: translate(-50%, -50%); */
    
    /* Two columns on larger screens; adjust as needed */
    display: grid;
    grid-template-columns: 2fr 1fr; 
    /* gap: 20px; */
    /* width: 90%;
    max-width: 800px; */
    
    /* For nice fade-in effect (optional) */
    /* animation: fadeIn 0.3s ease-in-out; */
    z-index: 998; /* Over other page elements if necessary */


    display: flex;
    flex-wrap: wrap;
    column-gap: 20px;     /* Horizontal gap between cards */
    row-gap: 10px;         /* Smaller vertical gap */
    margin-top: 100px;
    /* center */
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    /* center vertically too */
    align-items: center;
    margin: 0 auto; /* Centers horizontally */
    margin-top: 100px; /* Optional: Add top margin */
  }


  .learn-more-link {
    color: #129ed9;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Inter Variable', sans-serif;
    font-size: 14px;
  }
  

  .learn-more-link i {
    font-size: 8px;
    vertical-align: middle;
    margin-left: 3px;
  }


  
  /* Individual card styling */
  .step-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 300px;
    padding: 15px;
    /* cursor: pointer; */
    /* ✅ FIX: Transition only specific properties to prevent layout thrashing */
    transition: box-shadow 0.15s ease, background 0.15s ease;
    font-family: 'Poppins', sans-serif;
  }


  
  .step-card h3 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .step-card p {
    font-size: 15px;
    color: #444;    
    margin-top: 5px;
    font-family: 'Poppins', sans-serif;
  }


  /* ✅ FIX: REMOVED transform to prevent flickering */
  /* .step-card {
    transform: translateY(-2px);
  } */


  .step-card.completed {
    background-color: #f0f0f0d8; /* Light grey background */
    opacity: 0.6;
    pointer-events: none; /* Disable clicking */
    border-left: 4px solid #2ECC71; /* Green left border */
}

.step-card.completed h3 {
    color: #666; /* Greyed out text */
}

.step-card.completed .icon-wrapper {
    background-color: #2ECC71; /* Green check background */
}

.step-card.completed .icon-wrapper i {
    content: "\f00c"; /* FontAwesome checkmark */
    font-family: "FontAwesome";
    color: white;
}

  
  .step-card button {
    margin-top: 8px;
    /* background: #FDFDFD; */
    background: #f5f5f5;
    color: #444;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    /* ✅ FIX: Transition only background, no transform */
    transition: background 0.2s ease;
  }
  .step-card button:hover {
    background: var(--sidebar-bg3);
    /* ✅ FIX: REMOVED transform to prevent flickering */
    /* transform: translateX(3px); */
  }
  
  /* Simple fade-in animation */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translate(-50%, -60%);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
  
  /* Responsive: single-column on narrow screens */
  @media (max-width: 700px) {
    .step-cards-container {
      grid-template-columns: 1fr;
      top: 46%; /* tweak so it looks nice on small devices */
      margin-top: 15px; /* Optional: Add top margin */
    }
  }


  @media (max-width: 1200px) {
    .step-cards-container {
      margin-top: 50px; /* Optional: Add top margin */
    }
  }



.step-header i {
    font-size: 16px; /* Adjust icon size if needed */
    vertical-align: middle; /* Ensures proper alignment with text */
    display: flex; /* Ensures consistent positioning */
    align-items: center;
    justify-content: center;
    /* margin-bottom: 8px; */
}

/* Default styling for all icons */
.step-card i {
    font-size: 16px;
}

/* Unique colors for each card */
.step-card[data-card="connections"] i {
    color: #FF5733; /* Red-Orange */
}

.step-card[data-card="fetch"] i {
    color: #3498DB; /* Blue */
}

.step-card[data-card="settings"] i {
    color: #2ECC71; /* Green */
}

.step-card[data-card="rules"] i {
    color: #F1C40F; /* Yellow */
}

/* purple */
/* .step-card[data-card="purple"] i {
    color: #9d4dbc; /* Purple */
/* } */ 


/* Ensure button icons retain default color */
.step-card button i {
    color: var(--button-hover);
}





/* Icon wrapper for rounded background */
.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;  /* Adjust size */
    height: 32px; /* Keep it square */
    border-radius: 8px; /* Fully rounded */
    background-color: #449fdb48;/* Default color, change per step */
    margin-bottom: 8px;
}

/* Icon inside wrapper */
.icon-wrapper i {
    font-size: 14px; /* Adjust icon size */
    color: #3498DB; /* Make icon visible */
}

/* Ensure the header aligns properly */
.step-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Different colors for each step */
.step-card[data-card="connections"] .icon-wrapper {
    background-color: #fb6a4951; /* Red-Orange */
}

.step-card[data-card="fetch"] .icon-wrapper {
    background-color: #449fdb48; /* Blue */
}

.step-card[data-card="settings"] .icon-wrapper {
    background-color: #41cc7b44; /* Green */
}

.step-card[data-card="rules"] .icon-wrapper {
    background-color: #f3cb2a43; /* Yellow */
}


.project-header {
    font-weight: 600;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
  }
  
  

  /* Container for the project <select> filter */
.project-filter-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
 
  
  /* Manage Users overlay */
  .manage-users-view {
    background: #fefefe;
    border: 0.5px solid var(--border-color);
    padding: 10px;
  }
  
  .manage-users-view.hidden {
    display: none;
  }
  
  .store-info-container.hidden {
    display: none;
  }

  /* Keep the filter bar separate */
.project-filter-container {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    margin-left: 10px;

    /* display items center aligend but above each other */
    flex-direction: column;
    justify-content: center;

  }
  
  /* The container that holds the store cards */
  .store-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; 
  }
  
  .store-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
  
    /* 3 columns in one row */
    width: calc(33.333% - 20px);
    box-sizing: border-box;
    min-width: 250px; /* optional for narrower screens */
  }
  
  .manage-users-view.hidden, 
  .store-info-container.hidden {
    display: none;
  }

  .loading-overlay {
    width: 100%;
    height: 100%;
    position: absolute;  /* Keeps it inside the button */
    top: 0;
    left: 0;
    border-radius: inherit; /* Matches button's rounded corners */
}

/* For the new checkboxes row */
.ai-field-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 30px;
    margin-left: 5px;
  }
  .ai-field-list label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    /* cursor: pointer; */
  }
  .ai-field-list input[type="checkbox"] {
    margin-right: 5px;
  }

  /* Ensures the results UL doesn't get too large
.select2-container .select2-results__options {
    max-height: 200px !important;
    overflow-y: auto !important;
  } */


  .tom-select-dropdown {
    display: none !important;
    visibility: hidden !important;
    max-height: 0 !important;
    overflow: hidden !important;
  }



  .sidebar-footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--sidebar-bg);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.025);
    border: 1px solid var(--border-color);
}

/* Make sure user info (profile picture) is aligned to the right */
.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Aligns image to the right */
    flex: 1; /* Takes up remaining space */
}

/* The user's profile pic in the card (rounded) */
.user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: auto; /* Ensures image moves to the right */
}

/* The container that hides/shows the user dropdown */
.profile-dropdown {
    position: absolute;
    /* We'll place it above the image, you can tweak the offset as needed */
    bottom: 100px; 
    right: 10px;
    background: #f3f3f3;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 9999;
    width: 250px; /* Adjust width as you prefer */
  }
  
  /* Start hidden (matching the "hidden" class) */
  .profile-dropdown.hidden {
    display: none;
  }
  
  /* Style the list inside dropdown */
  .profile-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  /* Individual dropdown items */
  .profile-dropdown li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .profile-dropdown li:hover {
    background: var(--sidebar-hover);
    /* rounder corners */
    border-radius: 8px;
  }
  
  /* Icons inside the dropdown */
  .profile-dropdown li i {
    font-size: 16px;
    color: #333;
  }
  
  .sidebar-footer-card:hover {
    background-color: var(--sidebar-hover);
  }
  
  .plan-info {
    display: flex;
    flex-direction: column;
  }
  
  .plan-label {
    font-size: 14px;
    font-family: 'Inter Variable', sans-serif;
    color: #333;
    font-weight: 500;
  }
  

  
  /* (Optional) Additional styles for the login/logout button container */
  .auth-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
  }


  /* Smaller text (Upgrade prompt) */
.plan-info p {
    font-size: 12px; /* ✅ Smaller than plan-label */
    font-family: 'Inter Variable', sans-serif;
    color: #333; /* Slightly faded for better readability */
    margin: 0; /* Ensure no extra spacing */
    margin-top: 5px;
}



.campaign-selector {
    display: flex;
    justify-content: center;  /* Center horizontally */
    align-items: center;  /* Align label & select vertically */
    gap: 10px;  /* Space between label and select */
    margin: 20px auto;  /* Center the container */
}

.campaign-selector select {
    width: 250px; /* Set a max width to prevent expanding */
    max-width: 100%; /* Ensure it's responsive */
    text-align: center; /* Center the text inside */
}



.apply-labelizer-button {
  padding: 8px 16px;
  background: #0073e6;
  color: #fff;
  border: none;
  border-radius: 4px;
}
.apply-labelizer-button.loading { opacity: 0.6; pointer-events: none; }









/* ############# CHATBOT */
/* ========== GETACCESSIBLEAI CHATBOT STYLES ========== */

/* The floating launcher icon */
#getaccessibleaiChatbotLauncher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #129ed9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #getaccessibleaiChatbotLauncher img {
    width: 36px;
    height: 36px;
  }
  
  /* The main chatbot window */
  #getaccessibleaiChatbotWindow {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 370px;
    height: 520px;
    background-color: #fff;
    box-shadow: 0 0 18px rgba(0,0,0,0.15);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    font-family: 'Manrope', 'Poppins', sans-serif;
  }
  
  /* Hide/Show */
  #getaccessibleaiChatbotWindow.hidden {
    display: none;
  }
  
  /* Header */
  .getaccessibleai-chatbot-header {
    background-color: #129ed9; 
    color: #fff;
    padding: 12px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .getaccessibleai-close-chatbot-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }
  
  /* Messages area */
  .getaccessibleai-chatbot-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
  }
  
  /* Chat suggestions */
  .getaccessibleai-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 10px 10px;
  }
  
  /* Single suggestion chip */
  .getaccessibleai-chatbot-suggestion {
    background: #eef1f3;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #d5dbde;
  }
  
  /* Input row at bottom */
  .getaccessibleai-chatbot-input-row {
    display: flex;
    border-top: 1px solid #d5dbde;
    padding: 10px;
  }
  #getaccessibleaiChatbotInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 14px;
  }
  .getaccessibleai-chatbot-send-btn {
    background-color: #129ed9;
    color: #fff;
    border: none;
    padding: 0 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Chat bubbles w/ avatars */
  .getaccessibleai-chat-message-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 12px;
  }
  
  .getaccessibleai-chat-message-row.user {
    justify-content: flex-end;
  }

  
  
  .getaccessibleai-chat-avatar {
    width: 36px; 
    height: 36px; 
    border-radius: 50%;
    object-fit: cover;
    margin: 0 8px;
  }
  
  .getaccessibleai-chat-bubble {
    background: #f0f0f0;
    color: #333;
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 65%;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    overflow-wrap: break-word;
  }
  
  .getaccessibleai-chat-message-row.user .getaccessibleai-chat-bubble {
    background: #d7efff; /* user's color bubble */
  }
  
  /* For very small screens, adjust width/height */
  @media (max-width: 500px) {
    #getaccessibleaiChatbotWindow {
      width: 90vw;
      height: 80vh;
      left: 5vw;
      right: auto;
      bottom: 15vh;
    }
  }


  /* Chat window improvements */
.getaccessibleai-chatbot-window {
    width: 400px;
    height: 550px;
    border-radius: 12px;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.1);
}
.getaccessibleai-chatbot-header {
    font-weight: bold;
    padding: 15px;
}
.getaccessibleai-chatbot-input-row {
    padding: 12px;
}

  /* Chatbot thinking animation */
@keyframes glowing {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}
.getaccessibleai-chat-thinking {
    font-style: italic;
    color: gray;
    animation: glowing 1.5s infinite;
}





/* STORE CARD limiT TEXT LENGHT */
.store-card h3.store-title,
.store-card p.store-description,
.store-card a.store-url,
.store-name-top-right,
.change-project-container select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

/* Limit the top-right store name */
.store-name-top-right {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: 50%;
  text-align: right;
  font-family: 'Manrope', sans-serif;
  font-weight: bold;
  color: #444;
  font-size: 16px;
  /* line-height: 1.4; */
}


   /* =========================
   STORE CARD HIDDEN SETTINGS 
   ========================= */
.manage-users-view {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Prevent hover shadow */
.manage-users-view:hover {
  box-shadow: none !important;
}

/* Top "Back" bar */
.manage-users-view > div[style*="display: flex"] {
  margin-bottom: 10px;
  margin-top: 0 !important;
}

/* Base button style for Back & Delete */
.manage-users-view .rule-item-button2 {
  background-color: #fff;
  color: #444;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

/* Hover effect: slightly darker background */
.manage-users-view .rule-item-button2:hover {
  background-color: #f7f7f7;
}

/* Red delete button */
.manage-users-view .rule-item-button2.delete-button {
  margin-top: 15px;
  color: #f44336;
  border-color: #f44336;
}

.manage-users-view .rule-item-button2.delete-button:hover {
  background-color: #f7f7f7;
}

/* "Add user to project" container */
.add-user-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
  /* align left */
  margin-left: 10px;

}

.add-user-container .add-user-text {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 5px;
}

.add-user-container .input-field {
  width: 80%;
  margin-bottom: 8px;
}

.add-user-container .project-settings-button {
  margin-top: 5px;
  border-color: #ccc;
  color: #444;
  background-color: #fff;
  transition: background-color 0.2s;
}

.add-user-container .project-settings-button:hover {
  background-color: #f7f7f7;
}

/* "Change Project" container */
.change-project-container {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  margin-top: 15px;
  margin-bottom: 15px;
  /* align left */
  margin-left: 10px;
}

.change-project-container p {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

/* Positioning the project <select> & button nicely */
.change-project-container select {
  /* margin-right: 8px; */
  /* center in screen */
  margin-left: auto;
  margin-right: auto;
  display: block;

}


.copy-rules-panel {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  animation: fadeIn 0.3s ease-in-out;
}

.copy-buttons {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.copy-buttons button {
  padding: 10px 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

.copy-buttons .add-shipping-btn {
  background-color: #129ed9;
  color: white;
}

.copy-buttons .cancel-rule-button {
  background-color: #f5f5f5;
  color: #555;
}



.modal {
  position: fixed; top: 20%; left: 50%; transform: translateX(-50%);
  background: #fff; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  max-width: 400px; width: 100%;
}
.modal.hidden { display: none; }
.modal .row { display: flex; justify-content: space-between; margin: 8px 0; }



.template-toggle-row {
  margin-top: 20px;
  /* margin-bottom: 20px; */
}



/* put this in your global styles */
.swal2-popup {
  animation: none !important;
  transition: none !important;
}


/* make the img smaller of product-image-item */
.product-image-item img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 12px;
}



/* a minimal halo around the image */
.loading-glow-img {
  position: relative;
  display: inline-block;
}

.loading-glow-img::after {
  content: "";
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
  animation: glowFade 1.5s ease-in-out infinite;
}

@keyframes glowFade {
  0%, 100% { box-shadow: 0 0 4px rgba(0, 123, 255, 0.2); }
  50%    { box-shadow: 0 0 8px rgba(0, 123, 255, 0.4); }
}

/* 🚀 LAZY LOADING STYLES - Performance Optimization */
img.lazy-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  min-height: 200px;
}

img.lazy-loaded {
  animation: fadeIn 0.3s ease-in;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


.product-image-item {
  background: var(--sidebar-bg3);
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.product-image-item img {
  width: 100%;
  height: auto;
  /* max-height: 180px; */
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}



.generate-btn, .generate-btn1 {
  position: relative;
  border: none;
  padding: 6px 10px;
  margin: 5px;
  /* width: 200px; */
  font-size: 16px;
  color: #333;
  text-align: center;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: background var(--transition-speed), transform var(--transition-speed);
  cursor: pointer;
  background-color: var(--chat-bg);
  justify-content: center;
  font-family: 'Inter Variable', sans-serif;
  margin-top: 10px !important;
  margin: 0 auto;
  border: 1px solid var(--border-color);
}





#selectedImageProcessingList {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  #selectedImageProcessingList {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  #selectedImageProcessingList {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #selectedImageProcessingList {
    grid-template-columns: repeat(1, 1fr);
  }
}



/* Add to your main stylesheet */
.filter-cards-container {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  margin-top: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}
.filter-card {
  flex: 1;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.filter-card img {
  width: 14px;
  height: 14px;
  margin-bottom: 0px;
}
.filter-card span {
  display: inline-block;
  font-weight: 500;
  color: #333;
  font-size: 13px;
}
.filter-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-0.5px);
}
.filter-card.active {
  border-color: #129ed9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  /* slight background */
  background: rgba(18, 158, 217, 0.1) !important;
}
.source-card {
  transition: opacity .2s;
}
.source-card.hidden {
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}





.feed-nav-cards {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  /* center  */
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
  margin-bottom: 30px;
}
.feed-card {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color .2s, border-color .2s;
}
.feed-card i {
  margin-right: 0.5rem;
}
.feed-card.active {
  background-color: #e6f7ff;
  border-color: #91d5ff;
}
.hidden {
  display: none !important;
}




/* 2) Modal Styling */
.product-modal .modal-content,
.subscribe-form-content,
#productModalContent,
#productModalContentImport {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  max-width: 600px;
  margin: 40px auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

#productModalContent,
#productModalContentImport {
  background: transparent;
  /* no shadow */
  box-shadow: none;
}

.product-modal h2,
.subscribe-form-content .form-title {
  font-size: 24px;
  margin-bottom: 16px;
  color: #129ed9;
  font-weight: 600;
}

.product-modal p,
.subscribe-form-content .form-subtitle {
  font-size: 16px;
  margin-bottom: 16px;
  color: #555555;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: #777777;
  cursor: pointer;
}

/* 3) Buttons */
.btn,
.generate-btn {
  position: relative; 
  border: none;
  padding: 6px 10px !important;
  margin: 8px 20px;
  width: 200px;
  font-size: 16px;
  color: var(--input-text);
  text-align: center;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: background var(--transition-speed), transform var(--transition-speed);
  cursor: pointer;
  background-color: var(--chat-bg);
  /* align text left */
  justify-content: center;
  font-family: 'manrope', sans-serif;
  border: 1px solid var(--border-color);
}

.btn:hover,
.generate-btn:hover {
  background: #0e86c1;
}

/* 4) Feed Settings & Rules Forms */
.feed-settings-container,
.rule-form {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  margin-bottom: 32px;
}

.feed-settings-container h3,
.rule-form h4 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #129ed9;
  font-weight: 600;
}

.settings-row .field-group,
.compound-condition,
#elseActionFields > * {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

/* elseactionfields transparent backgorund */
.field-group {
  background: transparent !important;
}

.field-group label,
.rule-condition > label,
.rule-action > label {
  font-weight: 500;
  margin-right: 8px;
}

.field-group select,
.field-group input[type="text"],
.rule-input,
.rule-select {
  padding: 8px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 14px;
  color: #333333;
}

.field-group select:focus,
.field-group input:focus {
  outline: none;
  border-color: #129ed9;
}

/* 5) Rule Items (List Display) */
.rule-item {
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  position: relative;
}

.rule-item p {
  margin: 8px 0;
  font-size: 14px;
  color: #444444;
}

.rule-item strong {
  color: #129ed9;
  margin-right: 4px;
}

.affected-label {
  position: absolute;
  top: 12px;
  right: 12px;
  /* background: #129ed9; */
  /* color: #ffffff; */
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
}

/* 6) Responsive Improvements */
@media screen and (max-width: 768px) {
  .modal-content,
  .product-modal .modal-content,
  .feed-settings-container,
  .rule-form {
    padding: 16px;
    margin: 20px;
  }

  .btn,
  .add-shipping-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Modernized Rules UI Styles */
.modern-rule-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  background: #fff;
  border: 1.5px solid #e3e8ee;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(18,158,217,0.04);
  /* padding: 20px 24p
  x 20px 16px; */
  margin-bottom: 10px;
  transition: box-shadow 0.18s, border-color 0.18s;
  cursor: pointer;
  min-height: 50px;
}
.modern-rule-item:hover {
  box-shadow: 0 4px 16px rgba(18,158,217,0.10);
  border-color: #129ed9;
}
.drag-handle {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: #b0b8c1;
  font-size: 20px;
  margin-right: 18px;
  margin-top: 2px;
  user-select: none;
}
.rule-main-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rule-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #222;
  line-height: 1.5;
}
.rule-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f2f8fa;
  color: #129ed9;
  font-size: 15px;
  margin-right: 2px;
}
.rule-icon.then {
  background: #e6f7ff;
  color: #0f8bb8;
}
.rule-icon.else {
  background: #fff7e6;
  color: #e67300;
}
.logic-badge {
  display: inline-block;
  background: #e6f7ff;
  color: #129ed9;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 1px 7px;
  margin: 0 2px;
  letter-spacing: 0.5px;
}
.affected-label {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #e6f7ff;
  color: #129ed9;
  padding: 4px 12px 4px 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(18,158,217,0.07);
}

@media (max-width: 700px) {
  .modern-rule-item {
    flex-direction: column;
    padding: 16px 10px 16px 10px;
  }
  .drag-handle {
    margin-bottom: 8px;
    margin-right: 0;
  }
  .affected-label {
    position: static;
    display: inline-block;
    margin-top: 10px;
    right: auto;
    top: auto;
  }
}

/* --- Modernized Rule Form UI --- */
.rule-form {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(18,158,217,0.07);
  padding: 32px 28px 28px 28px;
  border: 1.5px solid #e3e8ee;
  margin-bottom: 32px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.rule-form h4#ruleFormTitle {
  font-size: 22px;
  color: #129ed9;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
  letter-spacing: 0.2px;
}
.rule-condition, .rule-action {
  background: #f7fbfd;
  border: 1.5px solid #e3e8ee;
  border-radius: 8px;
  padding: 16px 14px;
  margin-bottom: 18px;
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(18,158,217,0.03);
}
.rule-condition > label, .rule-action > label {
  font-weight: 700;
  color: #129ed9;
  font-size: 15px;
  margin-right: 8px;
  letter-spacing: 0.2px;
}
#compoundConditionsContainer {
  background: #f9f9fb;
  border: 1.5px solid #e3e8ee;
  border-radius: 8px;
  padding: 16px 14px 10px 14px;
  margin-bottom: 18px;
  margin-top: 0;
  box-shadow: 0 1px 4px rgba(18,158,217,0.02);
}
#compoundConditionsContainer > label {
  font-weight: 600;
  color: #129ed9;
  font-size: 14px;
  margin-bottom: 6px;
}
#compoundLogic {
  margin-left: 10px;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid #b5d6e8;
  background: #fff;
  color: #129ed9;
  font-weight: 600;
  font-size: 13px;
}
.compound-condition {
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(18,158,217,0.03);
}
#elseActionContainer {
  background: #fff7e6;
  border: 1.5px solid #ffe0b3;
  border-radius: 8px;
  padding: 16px 14px 10px 14px;
  margin-bottom: 18px;
  margin-top: 0;
  box-shadow: 0 1px 4px rgba(230,115,0,0.04);
}
#elseActionContainer h4 {
  color: #e67300;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
#ruleForm .add-shipping-btn, #ruleForm .cancel-rule-button {
  margin-top: 18px;
  min-width: 120px;
  font-size: 15px;
  border-radius: 7px;
  padding: 10px 18px;
  box-shadow: 0 1px 2px rgba(18,158,217,0.03);
}
#ruleForm .add-shipping-btn {
  background: #129ed9;
  color: #fff;
  border: none;
  font-weight: 600;
  transition: background 0.18s;
}
#ruleForm .add-shipping-btn:hover {
  background: #0f8bb8;
}
#ruleForm .cancel-rule-button {
  background: #fff;
  color: #129ed9;
  border: 1.5px solid #129ed9;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
#ruleForm .cancel-rule-button:hover {
  background: #e6f7ff;
  color: #0f8bb8;
}
#ruleForm input[type="text"], #ruleForm select {
  border-radius: 6px;
  border: 1.2px solid #e3e8ee;
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
  color: #222;
  transition: border-color 0.18s;
}
#ruleForm input[type="text"]:focus, #ruleForm select:focus {
  border-color: #129ed9;
  outline: none;
}
@media (max-width: 700px) {
  .rule-form {
    padding: 16px 6px 16px 6px;
    max-width: 99vw;
  }
  .rule-condition, .rule-action, #compoundConditionsContainer, #elseActionContainer {
    padding: 10px 4px;
  }
  #ruleForm .add-shipping-btn, #ruleForm .cancel-rule-button {
    width: 100%;
    min-width: unset;
    margin-top: 12px;
  }
}

/* --- Modernized Feed Settings Container --- */
.feed-settings-container {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(18,158,217,0.07);
  padding: 28px 24px;
  border: 1.5px solid #e3e8ee;
  margin: 20px auto 32px;
  max-width: 900px;
  transition: box-shadow 0.18s;
  position: relative;
}

.feed-settings-container h3 {
  font-size: 22px;
  color: #129ed9;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.settings-row {
  background: #fafbfd;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.settings-row.three-items > div {
  flex: 1 1 calc(33.33% - 16px);
  min-width: 200px;
}

.settings-row.two-items > div {
  flex: 1 1 100% !important;
    width: 100% !important;
  min-width: 220px;
}

.settings-row.unified-checkbox-group {
  background: #fff !important;
  border: 0.5px solid #e8eef5 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(18,158,217,0.04) !important;
  padding: 18px 16px !important;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  font-weight: 600;
  color: #455a74;
  font-size: 14px;
  position: relative;
}

.field-group label.tooltip .tooltiptext {
  min-width: 220px;
  background: white;
  color: #455a74;
  border: 1px solid #e3e8ee;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  font-weight: normal;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  z-index: 100;
}

.field-group select,
.field-group input[type="text"] {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1.5px solid #d1d9e6;
  background: #fff;
  font-size: 14px;
  color: #333;
  transition: all 0.2s;
}

.field-group select:focus,
.field-group input[type="text"]:focus {
  border-color: #129ed9;
  box-shadow: 0 0 0 3px rgba(18,158,217,0.1);
  outline: none;
}

.field-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 6px;
  accent-color: #129ed9;
  cursor: pointer;
}

#shippingOptionsContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.shipping-option {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  align-items: center;
}

.shipping-option select,
.shipping-option input[type="text"] {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1.5px solid #d1d9e6;
  font-size: 14px;
}

.shipping-option select:focus,
.shipping-option input[type="text"]:focus {
  border-color: #129ed9;
  outline: none;
}

.add-shipping-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 5px;
}

.add-shipping-btn {
  background: #fff;
  color: #129ed9;
  border: 1.5px solid #129ed9;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-shipping-btn:hover {
  background: #f0f7fa;
}

.remove-shipping-btn {
  background: #fff;
  color: #e53935;
  border: 1px solid #e53935;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.remove-shipping-btn:hover {
  background: #ffebee;
}

/* --- Modernized Preview Overview Section --- */
#previewOverview.info-box2 {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(18,158,217,0.07);
  border: 1.5px solid #e3e8ee;
  padding: 24px;
  margin: 20px 0 32px;
  max-width: 800px;
  font-family: 'Manrope', sans-serif;
}

#previewOverview.info-box2 i.fas.fa-info-circle {
  color: #129ed9;
  font-size: 20px;
  margin-right: 8px;
}

#previewOverview.info-box2 strong {
  color: #129ed9;
  font-weight: 700;
}

#previewOverview.info-box2 p {
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
  margin: 8px 0;
  background: #f9fbfd;
  border-radius: 8px;
  color: #455a74;
  font-size: 15px;
  border: 1px solid #e8eef5;
}

#previewOverview.info-box2 p strong {
  font-size: 16px;
  color: #333;
}

#previewOverview.info-box2 p:nth-child(odd) {
  background: #f0f7fa;
}

#previewOverview.info-box2 p:last-of-type {
  background: #e6f7ff;
  border-color: #b5e0f5;
  margin-top: 16px;
  font-weight: 500;
}

#projectSummary.info-box2 {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(18,158,217,0.07);
  border: 1.5px solid #e3e8ee;
  padding: 20px;
  margin: 0 0 24px;
  max-width: 900px;
  font-family: 'Manrope', sans-serif;
}

#projectSummary.info-box2 i.fas.fa-info-circle {
  color: #129ed9;
  font-size: 18px;
  margin-right: 8px;
}

#projectSummary.info-box2 strong {
  color: #129ed9;
  font-weight: 700;
}

.apply-sync-section {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.handle-sync-button {
  background: #129ed9;
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(18,158,217,0.2);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.handle-sync-button:hover {
  background: #0f8bb8;
  box-shadow: 0 6px 15px rgba(18,158,217,0.25);
  transform: translateY(-1px);
}

.handle-sync-button i {
  font-size: 18px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .feed-settings-container,
  #previewOverview.info-box2,
  #projectSummary.info-box2 {
    padding: 16px;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .settings-row {
    padding: 12px;
  }
  
  .settings-row.three-items > div,
  .settings-row.two-items > div {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  
  .apply-sync-section {
    flex-direction: column;
    align-items: center;
  }
  
  .handle-sync-button {
    width: 100%;
    justify-content: center;
  }
}

.manage-users-view {
    background: var(--sidebar-bg);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--border-color);
}

.store-name-top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    font-family: 'Inter Variable', sans-serif;
}

.add-user-container {
    background: rgba(18, 158, 217, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.add-user-text {
    font-size: 0.95rem;
    color: var(--text-color);
    margin: 0 0 12px;
    font-weight: 500;
    font-family: 'Inter Variable', sans-serif;
}

.add-user-container .input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-family: 'Inter Variable', sans-serif;
    transition: all 0.2s ease;
}

.add-user-container .input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1);
}

.add-user-container .role-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-family: 'Inter Variable', sans-serif;
    background-color: var(--input-bg);
    color: var(--input-text);
}

.change-project-container {
    background: rgba(18, 158, 217, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.change-project-container p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin: 0 0 12px;
    font-weight: 500;
    font-family: 'Inter Variable', sans-serif;
}

.change-project-container select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-family: 'Inter Variable', sans-serif;
    background-color: var(--input-bg);
    color: var(--input-text);
}

.rule-item-button2 {
    padding: 8px 16px;
    background: var(--sidebar-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: 'Inter Variable', sans-serif;
}

.rule-item-button2:hover {
    background: var(--border-color);
}

/* --- Modern Shopify-Style Import Source Interface --- */
.import-sources {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)) !important;
  gap: 24px !important;
  margin-bottom: 32px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  flex-wrap: unset !important;
  justify-content: unset !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Modern Professional Cards with higher specificity */
.import-sources .source-card,
.import-sources-grid .source-card {
  background: #ffffff !important;
  border: 1px solid #e1e3e5 !important;
  border-radius: 16px !important;
  padding: 28px !important;
  margin-bottom: 0 !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  min-height: 180px !important;
  justify-content: space-between !important;
  flex: none !important;
  min-width: unset !important;
  max-width: none !important;
}

.import-sources .source-card:last-child {
  border-bottom: 1px solid #e1e3e5 !important;
  padding-bottom: 28px !important;
}

.import-sources .source-card:hover,
.import-sources-grid .source-card:hover {
  border-color: #d1d5db !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  transform: none !important;
  background: #ffffff !important;
}

.import-sources .source-card h4,
.import-sources-grid .source-card h4 {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  letter-spacing: -0.025em !important;
  line-height: 1.3 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.import-sources .source-card p,
.import-sources-grid .source-card p {
  color: #6b7280 !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.import-sources .source-card input[type="text"],
.import-sources .source-card textarea,
.import-sources-grid .source-card input[type="text"],
.import-sources-grid .source-card textarea {
  width: 100% !important;
  padding: 16px 18px !important;
  font-size: 0.95rem !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #1f2937 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
  min-width: 100% !important;
  resize: none !important;
}

.import-sources .source-card textarea {
  min-height: 96px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}

.import-sources .source-card input[type="text"]:focus,
.import-sources .source-card textarea:focus {
  border-color: #129ed9 !important;
  background: #ffffff !important;
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(18, 158, 217, 0.1) !important;
  transform: scale(1.01) !important;
}

.import-sources .source-card input[type="text"]::placeholder,
.import-sources .source-card textarea::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

.import-sources .source-card button,
.import-sources-grid .source-card button {
  background: #374151 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  align-self: flex-start !important;
  min-width: 140px !important;
  letter-spacing: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}

.import-sources .source-card button::before {
  display: none !important;
}

.import-sources .source-card button:hover::before {
  display: none !important;
}

.import-sources .source-card button:hover {
  background: #4b5563 !important;
  transform: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.import-sources .source-card button:active {
  transform: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
  background: #374151 !important;
}

.import-sources .source-card img,
.import-sources-grid .source-card img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  margin: 0 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  padding: 4px !important;
}

/* Content structure styling */
.import-sources .source-card .card-content,
.import-sources-grid .source-card .card-content {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  height: 100% !important;
}

.import-sources .source-card .card-header,
.import-sources-grid .source-card .card-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.import-sources .source-card .card-actions,
.import-sources-grid .source-card .card-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin-top: auto !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .import-sources {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)) !important;
    gap: 20px !important;
  }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .import-sources {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .import-sources .source-card {
    padding: 24px 20px !important;
    min-height: auto !important;
  }
  
  .import-sources .source-card input[type="text"],
  .import-sources .source-card textarea {
    padding: 14px 16px !important;
  }
  
  .import-sources .source-card button {
    padding: 14px 28px !important;
    width: 100% !important;
    justify-self: stretch !important;
  }
}

/* Special styling for different source types */
.import-sources .source-card[data-source="shopify"] {
  border-left: 3px solid rgba(150, 191, 71, 0.7) !important;
}

.import-sources .source-card[data-source="shopify"]:hover {
  border-left-color: rgba(123, 168, 58, 0.8) !important;
  box-shadow: 0 4px 12px rgba(123, 168, 58, 0.08), 0 2px 6px rgba(123, 168, 58, 0.04) !important;
}

.import-sources .source-card[data-source="aliexpress"] {
  border-left: 3px solid rgba(255, 106, 0, 0.7) !important;
}

.import-sources .source-card[data-source="aliexpress"]:hover {
  border-left-color: rgba(229, 90, 0, 0.8) !important;
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.08), 0 2px 6px rgba(255, 106, 0, 0.04) !important;
}

.import-sources .source-card[data-source="alibaba"] {
  border-left: 3px solid rgba(255, 123, 0, 0.7) !important;
}

.import-sources .source-card[data-source="alibaba"]:hover {
  border-left-color: rgba(229, 104, 0, 0.8) !important;
  box-shadow: 0 4px 12px rgba(255, 123, 0, 0.08), 0 2px 6px rgba(255, 123, 0, 0.04) !important;
}

/* Import section header styling */
.section-subtext {
  background: rgba(248, 249, 250, 0.8);
  margin-bottom: 24px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Product List Container Improvements */
.product-list .product-row {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
}

/* Product thumbnail styling consistency */
.product-list .product-row .product-thumbnail img,
.product-row .product-thumbnail img {
  width: 70px !important;
  height: 70px !important;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 12px;
}

/* Smaller images in product descriptions */
.details-description img,
.product-details img.details-image {
  max-width: 200px !important;
  height: auto !important;
  border-radius: 4px;
  margin: 8px 4px;
}

/* No image placeholder styling */
.product-thumbnail .no-image {
  width: 70px;
  height: 70px;
  background: #f5f5f5;
  border: 2px dashed #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  margin-right: 12px;
}

/* Pagination Container */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid #e1e1e1;
  margin-top: 20px;
}

.pagination-button {
  background: #fff;
  border: 1.5px solid #d1e6f5;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #129ed9;
  font-family: 'Inter Variable', 'Manrope', sans-serif;
}

/* ✅ MOBILE RESPONSIVENESS: Touch-friendly pagination */
@media (max-width: 768px) {
  .pagination-container {
    gap: 8px;
    padding: 15px 10px;
  }
  
  .pagination-button {
    min-height: 44px; /* Apple's minimum touch target */
    min-width: 44px;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
  }
  
  .pagination-info {
    font-size: 1rem;
    margin: 0 8px;
  }
}

/* ✅ MOBILE RESPONSIVENESS: Product rows for meshlist/meshfeed */
.product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s ease;
}

/* ⚠️ DISABLED - causing extreme flickering with 5+ images
.product-row:hover {
  background-color: #f9fafb;
}
*/

@media (max-width: 768px) {
  .product-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 12px;
  }
  
  .product-row img {
    max-width: 60px;
    height: auto;
    align-self: center;
  }
  
  .product-row .product-title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
  }
  
  .product-row .product-price {
    font-size: 16px;
    font-weight: 600;
    color: #129ed9;
  }
  
  /* Make checkboxes larger and more touch-friendly */
  .product-row .import-product-checkbox,
  .product-row .store-product-checkbox {
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 2px;
  }
}

/* ✅ MOBILE RESPONSIVENESS: Feed cards and navigation */
.feed-card {
  padding: 16px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-card:hover {
  border-color: #129ed9;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .feed-card {
    padding: 20px 16px;
    margin: 12px 0;
    min-height: 60px; /* Touch-friendly height */
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .feed-card i {
    font-size: 20px;
    min-width: 24px;
  }
  
  .feed-card-content {
    flex: 1;
  }
  
  .feed-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  
  .feed-card-subtitle {
    font-size: 14px;
    color: #6b7280;
  }
  
  /* Navigation button improvements */
  .feed-nav-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
  }
  
  /* Step cards mobile layout */
  .step-cards-container {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 16px !important;
  }
  
  /* Mesh mode cards mobile layout */
  .mesh-mode-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 16px 0 !important;
  }
  
  .mesh-mode-card {
    min-height: 70px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Hide subtexts on mobile for cleaner look */
  .mesh-mode-card .mesh-card-content p {
    display: none !important;
  }
  
  .mesh-mode-card .mesh-card-icon {
    font-size: 20px !important;
  }
  
  /* ✅ Mobile-friendly Select All checkboxes */
  #selectAllImported,
  #selectAllStoreProducts,
  .select-all-checkbox {
    min-width: 24px !important;
    min-height: 24px !important;
    cursor: pointer;
    transform: scale(1.2);
    margin: 8px;
  }
  
  /* Search bar mobile improvements */
  .search-container {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
  }
  
  .search-container input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
    border-radius: 8px;
  }
  
  .search-container select {
    font-size: 16px;
    padding: 12px;
    min-height: 44px;
  }
  
  /* Button improvements for mobile */
  .import-button,
  .apply-rules-button,
  .handle-sync-button,
  .btn-primary {
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
  }
}

.pagination-button:hover:not(:disabled) {
  background: #fff;
  border-color: #0f8cc8;
  color: #0f8cc8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(18, 158, 217, 0.15);
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.pagination-button.active {
  background: #fff;
  border-color: #129ed9;
  color: #129ed9;
  font-weight: 600;
}

.pagination-info {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 16px;
}

/* --- Modernized Import Metafields/Settings --- */
.bulk-edit-section, .bulk-copy-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(18,158,217,0.04);
  border: 1.5px solid #e3e8ee;
  padding: 22px 18px 18px 18px;
  margin-bottom: 18px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Override padding when these sections have modern card headers */
.bulk-edit-section:has(.modern-card-header),
.bulk-copy-section:has(.modern-card-header) {
  padding: 0 !important;
}

/* Fallback for browsers without :has() support */
.bulk-edit-section.has-header,
.bulk-copy-section.has-header {
  padding: 0 !important;
}
.bulk-edit-title, .bulk-copy-title {
  font-size: 1.08rem;
  color: #129ed9;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bulk-edit-helptext, .bulk-copy-helptext {
  color: #555;
  font-size: 0.97rem;
  margin-bottom: 12px;
  margin-top: 0;
  line-height: 1.5;
}
.ai-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 50px !important;
  margin-bottom: 10px !important;
}
.ai-field-list label {
  background: #f7fbfd;
  border: 1px solid #e3e8ee;
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 0.97rem;
  color: #222;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter Variable', sans-serif;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.ai-field-list label:hover {
  background: #e6f7ff;
  border-color: #129ed9;
}
.ai-field-list input[type="checkbox"] {
  accent-color: #129ed9;
  width: 16px;
  height: 16px;
  margin-right: 6px;
}
.ai-field-list .tooltiptext {
  min-width: 180px;
  background: #fff;
  color: #129ed9;
  border: 1px solid #e3e8ee;
  border-radius: 7px;
  font-size: 13px;
  padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(18,158,217,0.07);
  z-index: 10;
}

/* --- Shopify-Style Minimal Modern Buttons (No Blue Background) --- */
.source-card button,
.store-form-container button,
.project-settings-button,
.add-store-button,
.import-button,
.import-button1,
.import-button2,
.import-button3,
.import-button4,
.import-button5,
.import-button6,
.import-button7,
.import-button8,
.import-button9,
.import-button10,
.import-button11,
.import-button12,
.import-button13,
.import-button14,
.import-button15,
.import-button-import,
.handle-sync-button,
.apply-rules-button,
.apply-rules-button-checkout,
.btn-primary,
.nice-button {
  background: #fff !important;
  color: #129ed9 !important;
  border: 1.5px solid #d1e6f5 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 3px rgba(18,158,217,0.03);
  font-weight: 600;
  font-family: 'Inter Variable', 'Manrope', sans-serif;
  transition: border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
  padding: 10px 20px !important;
  font-size: 15px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Override for purple add plan buttons - ONLY for billing buttons */
.apply-rules-button-checkout {
  background: #7c3aed !important; /* Brand purple */
  color: white !important;
  border: 1.5px solid #7c3aed !important;
}

.apply-rules-button-checkout:hover {
  background: #6d28d9 !important; /* Darker purple on hover */
  border: 1.5px solid #6d28d9 !important;
}

/* Import to Store button - use normal blue styling, no movement */
.apply-rules-button {
  background: #fff !important;
  color: #129ed9 !important;
  border: 1.5px solid #d1e6f5 !important;
}

.apply-rules-button:hover {
  border-color: #129ed9 !important;
  color: #0f8bb8 !important;
  background: #f8fbfd !important;
  box-shadow: 0 2px 8px rgba(18,158,217,0.07);
  transform: none !important; /* Remove movement on hover */
}

/* Professional field labels - non-clickable styling */
.field-label {
  font-weight: 600;
  color: #374151;
  cursor: default !important;
  pointer-events: none;
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.field-label:hover {
  color: #374151 !important;
}

/* Consistent styling for section headings */
.bulk-edit-title, .bulk-copy-title {
  font-family: 'Inter Variable', 'Manrope', sans-serif !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  text-align: left !important;
}

/* Remove pointer cursor from non-clickable labels */
label:not(.tooltip):not(.select-all-label):not([for]):not([onclick]):not([data-clickable]):not(.setting-label):not(.modern-checkbox) {
  cursor: default !important;
  pointer-events: none !important;
}

/* CRITICAL FIX: Ensure feed settings labels and form controls are clickable */
.setting-label,
.feed-settings-container label,
.feed-settings-section label,
.setting-group label {
  pointer-events: auto !important;
  cursor: default !important;
}

/* URGENT FIX: Ensure all modern-checkbox elements are fully clickable */
.modern-checkbox,
label.modern-checkbox,
.modern-checkbox .checkbox-mark,
.modern-checkbox .checkbox-label,
.checkbox-mark,
.checkbox-label,
span.checkbox-mark,
span.checkbox-label {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 999 !important;
}

/* PRODUCTION EMERGENCY: Force all feed settings form elements to be interactive */
.feed-settings-container,
.feed-settings-section,
.setting-group,
.variants-grid .setting-group,
.unified-checkbox-group .setting-group {
  pointer-events: auto !important;
  position: relative !important;
}

/* NUCLEAR OPTION: Override ALL possible blocking CSS for checkboxes */
.feed-settings-container input[type="checkbox"],
.feed-settings-container .modern-checkbox input[type="checkbox"],
#enableSize, #enableColor, #enableGender, #enableSalePrice,
#enableProductType, #enableGoogleProductType, #enableMaterial, 
#enablePattern, #enableProductHighlights, #enableSizeType, 
#enableSizeSystem, #enableSeoTitle, #enableDefaultGender, 
#enableDefaultAgeGroup, #simpleEnableColorVariants, 
#simpleEnableSizeVariants {
  pointer-events: auto !important;
  display: block !important;
  position: relative !important;
  z-index: 1000 !important;
  opacity: 0 !important;
  width: 20px !important;
  height: 20px !important;
}

/* TARGETED FIX: Ensure feed settings dropdowns are clickable when not disabled or loading */
.feed-settings-container .modern-select:not([disabled]):not(.loading),
.feed-settings-container select.modern-select:not([disabled]):not(.loading),
#defaultCondition:not([disabled]):not(.loading),
#defaultAgeGroup:not([disabled]):not(.loading), 
#defaultGender:not([disabled]):not(.loading),
#defaultCurrency:not([disabled]):not(.loading),
#simpleDefaultCurrency:not([disabled]):not(.loading) {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative !important;
}

/* TARGETED FIX: Only ensure feed settings interactive elements are clickable when not in loading state */
.feed-settings-container:not(.loading) .modern-checkbox,
.feed-settings-container:not(.loading) .modern-checkbox input,
.feed-settings-container:not(.loading) .modern-checkbox span,
.feed-settings-container:not(.loading) .checkbox-mark,
.feed-settings-container:not(.loading) .checkbox-label,
.feed-settings-container:not(.loading) .removeShippingRow,
.feed-settings-container:not(.loading) button,
.feed-settings-container:not(.loading) input:not([disabled]),
.feed-settings-container:not(.loading) select:not([disabled]) {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Targeted shipping options fix */
#shippingOptionsContainer:not(.loading),
#shippingOptionsContainer:not(.loading) .shipping-row:not(.loading) {
  pointer-events: auto !important;
}

#shippingOptionsContainer:not(.loading) input:not([disabled]),
#shippingOptionsContainer:not(.loading) select:not([disabled]),
#shippingOptionsContainer:not(.loading) button:not([disabled]) {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Specifically fix Language and Store Currency labels */
#importLanguageField label,
label[for="languageSelect"],
label[for="targetCurrency"] {
  cursor: default !important;
  pointer-events: none !important;
  font-weight: normal !important;
}

/* AI field labels should be clickable for checkbox functionality */
.ai-field-list label {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Ensure AI field checkboxes are always clickable */
.ai-field-list input[type="checkbox"] {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Ensure standalone ai-field labels and checkboxes are clickable */
label.ai-field {
  cursor: pointer !important;
  pointer-events: auto !important;
}

label.ai-field input[type="checkbox"] {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Make sure regular text labels don't have hover effects */
label:not(.tooltip):not(.select-all-label):not(.ai-field):not([onclick]):not([for]) {
  cursor: default !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* Fix all inconsistent buttons to match shopify-fetch-button styling */
.import-button, .import-button1, .import-button2, .import-button3, .import-button4, 
.import-button5, .import-button6, .import-button7, .import-button8, .import-button9, 
.import-button10, .import-button11, .import-button12, .import-button13, .import-button14, 
.import-button15, .import-button-import, .edit-button, .cancel-rule-button, .load-products-btn, #load-store-products-btn,
#saveCustomTemplateBtn, .final-import-btn, .final-update-btn {
  position: relative !important;
  border: none !important;
  padding: 6px 10px !important;
  margin: 5px !important;
  width: 175px !important;
  font-size: 16px !important;
  color: var(--input-text) !important;
  text-align: center !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  transition: background var(--transition-speed), transform var(--transition-speed) !important;
  cursor: pointer !important;
  background-color: var(--sidebar-bg) !important;
  justify-content: center !important;
  font-family: 'manrope', sans-serif !important;
  border: 1px solid var(--border-color) !important;
}

/* Add glow effect for buttons during loading */
.import-button::after, .import-button1::after, .import-button2::after, .import-button3::after,
.import-button4::after, .import-button5::after, .import-button6::after, .import-button7::after,
.import-button8::after, .import-button9::after, .import-button10::after, .import-button11::after,
.import-button12::after, .import-button13::after, .import-button14::after, .import-button15::after,
.shopify-fetch-button::after, .edit-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}

.import-button.loading::after, .import-button1.loading::after, .import-button2.loading::after,
.import-button3.loading::after, .import-button4.loading::after, .import-button5.loading::after,
.import-button6.loading::after, .import-button7.loading::after, .import-button8.loading::after,
.import-button9.loading::after, .import-button10.loading::after, .import-button11.loading::after,
.import-button12.loading::after, .import-button13.loading::after, .import-button14.loading::after,
.import-button15.loading::after, .shopify-fetch-button.loading::after, .edit-button.loading::after {
  opacity: 1;
  animation: glowFlow 1s ease-out infinite;
}

/* Ensure consistent spacing for template field rows */
.template-field-row {
  margin-bottom: 16px;
}

.template-toggle-row {
  margin-bottom: 16px;
}

/* Consistent icon styling */
.icon-blue {
  color: #129ed9 !important;
}

/* Pro tip styling - matches existing design */
.pro-tip {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  position: relative;
}

.pro-tip::before {
  content: "💡";
  font-size: 18px;
  margin-right: 8px;
}

.pro-tip strong {
  color: #0369a1;
  font-weight: 600;
}
.source-card button:hover,
.store-form-container button:hover,
.project-settings-button:hover,
.add-store-button:hover,
.import-button:hover,
.import-button1:hover,
.import-button2:hover,
.import-button3:hover,
.import-button4:hover,
.import-button5:hover,
.import-button6:hover,
.import-button7:hover,
.import-button8:hover,
.import-button9:hover,
.import-button10:hover,
.import-button11:hover,
.import-button12:hover,
.import-button13:hover,
.import-button14:hover,
.import-button15:hover,
.import-button-import:hover,
.handle-sync-button:hover,
.apply-rules-button:hover,
.apply-rules-button-checkout:hover,
.btn-primary:hover,
.nice-button:hover {
  border-color: #129ed9 !important;
  color: #0f8bb8 !important;
  background: #f8fbfd !important;
  box-shadow: 0 2px 8px rgba(18,158,217,0.07);
  transform: translateY(-1px) scale(1.03);
}
.source-card button:active,
.store-form-container button:active,
.project-settings-button:active,
.add-store-button:active,
.import-button:active,
.import-button1:active,
.import-button2:active,
.import-button3:active,
.import-button4:active,
.import-button5:active,
.import-button6:active,
.import-button7:active,
.import-button8:active,
.import-button9:active,
.import-button10:active,
.import-button11:active,
.import-button12:active,
.import-button13:active,
.import-button14:active,
.import-button15:active,
.import-button-import:active,
.handle-sync-button:active,
.apply-rules-button:active,
.apply-rules-button-checkout:active,
.btn-primary:active,
.nice-button:active {
  background: #f3fafd !important;
  color: #129ed9 !important;
  border-color: #129ed9 !important;
  box-shadow: 0 1px 2px rgba(18,158,217,0.05);
  transform: scale(0.98);
}
.source-card button i,
.store-form-container button i,
.project-settings-button i,
.add-store-button i,
.import-button i,
.handle-sync-button i,
.apply-rules-button i,
.btn-primary i,
.nice-button i {
  color: #129ed9 !important;
}

/* --- Reduce Intensity of Colored UI Elements --- */
.source-card,
.bulk-edit-section,
.bulk-copy-section,
.manage-users-view,
.change-project-container,
.add-user-container {
  background: #fcfdfe !important;
  border-color: #e8eef5 !important;
  box-shadow: 0 1px 4px rgba(18,158,217,0.02);
}
.feed-card.active {
  background-color: #f3fafd !important;
  border-color: #b5d6e8 !important;
}
.project-settings-button,
.add-store-button,
.handle-sync-button,
.import-button,
.btn-primary {
  box-shadow: 0 1px 3px rgba(18,158,217,0.03) !important;
}
.store-form-container,
.store-card {
  background: #fcfdfe !important;
  border-color: #e8eef5 !important;
  box-shadow: 0 1px 4px rgba(18,158,217,0.02) !important;
}
/* Subtle highlight for selected/active states */
.feed-card.active,
.step-card.active {
  background: #f3fafd !important;
  border-color: #b5d6e8 !important;
}
/* Subtle info boxes */
.info-box2 {
  background-color: #f8fbfd !important;
  border-left: 3px solid #b5d6e8 !important;
}

/* --- Widen Main Content Areas --- */
.store-content,
.feed-settings-container,
.rules-list-container,
.rule-form,
.bulk-edit-section,
.bulk-copy-section,
.create-content,
.import-sources,
.card.import-products-card,
#step-search,
#step-metafields,
#step-images,
#step-multistore {
  max-width: 1100px !important;
  width: 96% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* --- Lighter Button Borders (0.5px) --- */
.source-card button,
.store-form-container button,
.project-settings-button,
.add-store-button,
.import-button,
.import-button1,
.import-button2,
.import-button3,
.import-button4,
.import-button5,
.import-button6,
.import-button7,
.import-button8,
.import-button9,
.import-button10,
.import-button11,
.import-button12,
.import-button13,
.import-button14,
.import-button15,
.import-button-import,
.handle-sync-button,
.apply-rules-button,
.apply-rules-button-checkout,
.btn-primary,
.nice-button {
  border-width: 0.5px !important;
}

/* --- Enforce minimal card border for store form (matches import/bulk sections) --- */
.store-form-container {
  background: #fff !important;
  border: 0.5px solid #e8eef5 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(18,158,217,0.04) !important;
  padding: 28px 24px !important;
  margin-top: 24px !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Store Dropdown Consistency Upgrade --- */
.store-dropdown {
  background: #fff !important;
  border: 0.5px solid #e8eef5 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(18,158,217,0.07) !important;
  min-width: 220px !important;
  max-width: 260px !important;
  font-family: 'Inter Variable', 'Manrope', sans-serif !important;
  padding: 10px 0 !important;
}
.store-dropdown option, .store-dropdown div, .store-dropdown label {
  background: #fff !important;
  color: #222 !important;
  border-radius: 6px;
  padding: 8px 18px !important;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.18s, color 0.18s;
}
.store-dropdown option:hover, .store-dropdown label:hover {
  background: #f3fafd !important;
  color: #129ed9 !important;
}

/* Individual store hover in dropdown - only highlight the specific store button */
.store-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: Poppins, sans-serif;
  font-size: 12px;
  color: #444;
  margin-left: 3px;
  transition: background 0.18s, color 0.18s;
  border-radius: 6px;
}

.store-option:hover {
  background: #f3fafd !important;
  color: #129ed9 !important;
  padding-left: 8px;
}

/* Prevent stores container from getting hover effect */
.stores-container:hover {
  background: transparent !important;
  color: inherit !important;
}

/* --- Sidebar Billing Card Consistency Upgrade --- */
.sidebar-footer-card {
  background: #fff !important;
  border: 0.5px solid #e8eef5 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 4px rgba(18,158,217,0.03) !important;
  padding: 14px 16px !important;
  margin: 10px 10px 30px 10px !important;
}
/* Modern form group styling */
/* ========== ENHANCED CHATBOT DESIGNER STYLES ========== */



.rule-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 12px;
  overflow: hidden;
}

.rule-header {
  background-color: #f7f9fc;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eaedf2;
}

.rule-header h4 {
  margin: 0;
  color: #333;
}

.rule-body {
  padding: 16px;
}

.rule-section-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #444;
}

.rule-condition-item {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 10px;
  background-color: #f5f8fa;
  border-radius: 4px;
}

.rule-condition-item .field {
  color: #0066cc;
  font-weight: 500;
}

.rule-condition-item .operator {
  color: #666;
}

.rule-condition-item .value {
  color: #333;
  font-weight: 500;
}

.logic-separator {
  text-align: center;
  color: #777;
  padding: 4px 0;
  font-size: 12px;
}

.rule-action-display {
  background-color: #f5f8fa;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 6px;
}

.no-data-message {
  color: #777;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Form styling */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Date Range Selector */
.date-range-selector {
  margin: 20px 0;
}

.date-range-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #444;
}

.range-buttons-ads {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.date-range-btn {
  background-color: #f5f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-range-btn:hover {
  background-color: #e9f2f9;
  border-color: #d1d5db;
}

.date-range-btn.active-date-range {
  background-color: #129ed9;
  color: white;
  border-color: #1089bd;
}

.campaign-id-display {
  padding: 10px;
  background-color: #f7fafc;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 14px;
  color: #555;
}

.logic-selection {
  margin: 16px 0;
}

.rule-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
}

/* Add benchmark table styling */
.benchmark-table-container {
    margin-bottom: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
}

.benchmark-table th,
.benchmark-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.benchmark-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #334155;
}

.benchmark-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.countries-comparison {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
    margin-bottom: 25px;
}

.countries-grid {
    display: flex;
    gap: 20px;
}

.countries-column {
    flex: 1;
}

.countries-column h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #334155;
}

.countries-column ol {
    margin: 0;
    padding-left: 20px;
}

.benchmark-title {
    padding: 10px 0;
    margin-bottom: 15px;
}

.benchmark-title h3 {
    margin: 0 0 5px 0;
    color: #334155;
}

.benchmark-title p {
    margin: 0;
    color: #64748b;
}

.no-benchmark-data {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    color: #64748b;
    text-align: center;
}

/* Metafield insert wrapper */
.metafield-insert-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metafield-insert-wrapper input {
  flex: 1;
}

.metafield-insert-wrapper button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ===== MODERN UI IMPROVEMENTS ===== */

/* Modern Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: var(--sidebar-hover);
    border-color: #d1d5db;
}

/* Modern Source Cards */
.source-card {
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    max-width: 300px !important;
    flex: 1 1 280px !important;
}

.source-card:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    border-color: #d1d5db !important;
}

.source-card h4 {
    font-family: var(--font-title) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.source-card p {
    font-size: 14px !important;
    color: #6b7280 !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
}

/* Icon improvements */
.icon-blue {
    color: var(--primary-color) !important;
}

/* Modernize main content container */
.content-container {
    background-color: var(--background-color) !important;
    margin-left: 275px !important;
    padding: 24px !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .content-container {
        margin-left: 0 !important;
        padding: 16px !important;
    }
}

/* Modern card container */
.modern-card {
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 20px !important;
    margin-top: 20px !important;
    width: 80%;
    margin: 0 auto 20px auto;
    overflow: hidden !important;
}

/* Remove padding when modern-card has a header */
.modern-card:has(.modern-card-header) {
    padding: 0 !important;
}

/* Ensure modern-card headers match parent border radius */
.modern-card > .modern-card-header:first-child {
    border-top-left-radius: 11px !important;
    border-top-right-radius: 11px !important;
}

.modern-card h3 {
    font-family: var(--font-title) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin-bottom: 16px !important;
}

.modern-card h4 {
    font-family: var(--font-title) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin-bottom: 12px !important;
}

/* Import Button Improvements */
.import-button, .import-button2, .import-button3, .import-button4, 
.import-button5, .import-button6, .import-button7, .import-button8,
.import-button9, .import-button10, .import-button11, .import-button12, .import-button13 {
    background-color: var(--primary-color) !important;
    color: white !important;
    border: none !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
    font-family: var(--font-body) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.import-button:hover, .import-button2:hover, .import-button3:hover, .import-button4:hover,
.import-button5:hover, .import-button6:hover, .import-button7:hover, .import-button8:hover,
.import-button9:hover, .import-button10:hover, .import-button11:hover, .import-button12:hover, .import-button13:hover {
    background-color: #4338ca !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.15) !important;
}

/* Modern form styling */
.bulk-edit-section, .bulk-copy-section {
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

/* Override padding when these sections have modern card headers */
.bulk-edit-section:has(.modern-card-header),
.bulk-copy-section:has(.modern-card-header) {
    padding: 0 !important;
}

/* Fallback for browsers without :has() support */
.bulk-edit-section.has-header,
.bulk-copy-section.has-header {
    padding: 0 !important;
}

/* Ensure consistent icon colors */
.bulk-copy-section .icon-container i,
.bulk-edit-section .icon-container i,
.feed-settings-container i {
    color: #129ed9 !important;
}

/* Fix add shipping button and other form buttons in MeshFeed */
.add-shipping-btn, .save-rule-button, .copy-rule-button, .cancel-rule-button,
.apply-rules-button, .handle-sync-button {
    position: relative !important;
    border: none !important;
    padding: 6px 10px !important;
    margin: 5px !important;
    width: 175px !important;
    font-size: 16px !important;
    color: var(--input-text) !important;
    text-align: center !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    transition: background var(--transition-speed), transform var(--transition-speed) !important;
    cursor: pointer !important;
    background-color: var(--sidebar-bg) !important;
    justify-content: center !important;
    font-family: 'manrope', sans-serif !important;
    border: 1px solid var(--border-color) !important;
}

/* Remove background from feed settings container if it exists */
.feed-settings-container {
    background: transparent !important;
}

/* Fix any grey backgrounds in general settings */
.rule-management .bulk-copy-section {
    background: white !important;
}

/* CONSISTENT WHITE BUTTON STYLING FOR ALL IMPORT/UPLOAD BUTTONS */
.source-card button,
.import-button, .import-button1, .import-button2, .import-button3, .import-button4, 
.import-button5, .import-button6, .import-button7, .import-button8, .import-button9, 
.import-button10, .import-button11, .import-button12, .import-button13, .import-button14, 
.import-button15, .import-button-import, .import-button-x,
.edit-button, .load-products-btn, #load-store-products-btn, #saveCustomTemplateBtn, 
.final-import-btn, .final-update-btn, .shopify-fetch-button {
  /* Clean white styling */
  position: relative !important;
  background: #ffffff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: normal !important;
  font-family: 'manrope', sans-serif !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s, border-color 0.2s !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  overflow: hidden !important;
}

/* Source card buttons - smaller and more compact */
.source-card button {
  width: auto !important;
  min-width: 100px !important;
  max-width: 140px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
}

/* Standard import/upload buttons */
.import-button, .import-button1, .import-button2, .import-button3, .import-button4, 
.import-button5, .import-button6, .import-button7, .import-button8, .import-button9, 
.import-button10, .import-button11, .import-button12, .import-button13, .import-button14, 
.import-button15, .import-button-import, .shopify-fetch-button {
  width: 160px !important;
  padding: 8px 14px !important;
}

.shopify-fetch-button {
    width: 200px !important;
}

/* Hover effects */
.source-card button:hover,
.import-button:hover, .import-button1:hover, .import-button2:hover, .import-button3:hover,
.import-button4:hover, .import-button5:hover, .import-button6:hover, .import-button7:hover,
.import-button8:hover, .import-button9:hover, .import-button10:hover, .import-button11:hover,
.import-button12:hover, .import-button13:hover, .import-button14:hover, .import-button15:hover,
.import-button-import:hover, .shopify-fetch-button:hover, .edit-button:hover {
  background: #f8f9fa !important;
  border-color: #129ed9 !important;
  transform: translateY(-1px) !important;
}

/* Icons in buttons */
.source-card button i,
.import-button i, .import-button1 i, .import-button2 i, .import-button3 i, .import-button4 i,
.import-button5 i, .import-button6 i, .import-button7 i, .import-button8 i, .import-button9 i,
.import-button10 i, .import-button11 i, .import-button12 i, .import-button13 i, .import-button14 i,
.import-button15 i, .import-button-import i, .shopify-fetch-button i, .edit-button i {
  color: #129ed9 !important;
  font-size: 12px !important;
}

/* LOADING GLOW EFFECTS FOR ALL IMPORT/UPLOAD BUTTONS */
.import-button::after, .import-button1::after, .import-button2::after, .import-button3::after,
.import-button4::after, .import-button5::after, .import-button6::after, .import-button7::after,
.import-button8::after, .import-button9::after, .import-button10::after, .import-button11::after,
.import-button12::after, .import-button13::after, .import-button14::after, .import-button15::after,
.import-button-import::after, .shopify-fetch-button::after, .source-card button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}

.import-button.loading::after, .import-button1.loading::after, .import-button2.loading::after,
.import-button3.loading::after, .import-button4.loading::after, .import-button5.loading::after,
.import-button6.loading::after, .import-button7.loading::after, .import-button8.loading::after,
.import-button9.loading::after, .import-button10.loading::after, .import-button11.loading::after,
.import-button12.loading::after, .import-button13.loading::after, .import-button14.loading::after,
.import-button15.loading::after, .import-button-import.loading::after, 
.shopify-fetch-button.loading::after, .source-card button.loading::after {
  opacity: 1;
  animation: glowFlow 1s ease-out infinite;
}

/* IMAGE PROCESSING SECTION IMPROVEMENTS */
.image-processing-preview-card {
  max-width: 1600px !important;
  margin: 0 auto !important;
}

.product-image-wrapper {
  max-width: 200px !important;
  margin: 0 auto !important;
}

.product-image-wrapper img {
  max-width: 100% !important;
  height: auto !important;
  max-height: 200px !important;
  object-fit: contain !important;
}

/* Edit buttons in image processing */
.edit-buttons {
  display: flex !important;
  gap: 8px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
}

.edit-button {
  /* Match import button styling exactly for consistent Shopify-like appearance */
  position: relative;
  border: none;
  padding: 4px 8px !important;
  margin: 4px;
  font-size: 12px !important;
  color: #333 !important;
  text-align: center;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-speed), transform var(--transition-speed);
  cursor: pointer;
  background-color: var(--chat-bg);
  font-family: 'Inter Variable', sans-serif;
  border: 1px solid var(--border-color);
  width: auto !important;
  min-width: 75px !important;
  max-width: 95px !important;
  overflow: hidden;
  gap: 4px !important;
}

.edit-button:hover {
  background-color: var(--sidebar-bg2);
  transform: translateY(-1px);
}

/* Add edit buttons to the loading glow animation system */
.edit-button.loading::after {
  opacity: 1;
  animation: glowFlow 1s ease-out infinite;
}

/* Add glow effect for edit buttons when loading */
.edit-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}

.edit-button.loading::after {
  opacity: 1;
  animation: glowFlow 1s ease-out infinite;
}

/* PRESERVE CORRECT MESHFEED BUTTON STYLING */
.add-rule-button, .copy-rule-button, .save-rule-button, .cancel-rule-button {
  /* Keep existing styling - these are working correctly */
  background: #129ed9 !important;
  color: white !important;
  border: none !important;
  padding: 6px 10px !important;
  border-radius: 5px !important;
  font-family: 'manrope', sans-serif !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease !important;
}

.add-rule-button:hover, .copy-rule-button:hover, .save-rule-button:hover {
  background: #0f8bb8 !important;
}

.cancel-rule-button {
  background: transparent !important;
  color: #666 !important;
  border: 1px solid #ddd !important;
}

.cancel-rule-button:hover {
  background: #f5f5f5 !important;
}

/* MESHBOARD DASHBOARD STYLING */
.dashboard-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  border-bottom: 1px solid #e1e4e8;
}

.dashboard-header h1 {
  margin: 0 0 8px 0;
  font-size: 32px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dashboard-header i {
  color: #129ed9;
}

.dashboard-subtitle {
  margin: 0;
  font-size: 16px;
  color: #666;
  font-weight: 400;
}

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.dashboard-section {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}

.dashboard-section:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.section-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #129ed9, #0f8bb8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon i {
  font-size: 20px;
  color: white;
}

.section-title {
  flex: 1;
}

.section-title h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.section-title p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.refresh-btn {
  background: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.refresh-btn:hover {
  background: #e9ecef;
  color: #129ed9;
}

.trends-container {
  min-height: 200px;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #666;
}

.loading-state i {
  font-size: 24px;
  color: #129ed9;
  margin-bottom: 12px;
}

.keyword-container {
  min-height: 300px;
}

.keyword-input-section {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.keyword-input-section input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #333;
}

.keyword-input-section input:focus {
  outline: none;
  border-color: #129ed9;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1);
}

.analyze-btn {
  background: #129ed9;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analyze-btn:hover {
  background: #0f8bb8;
}

.chart-container {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.keyword-data {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Modern Trend Cards */
.trends-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 20px !important;
  margin-top: 20px;
  justify-items: stretch !important;
  width: 100% !important;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .trends-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Dashboard mobile optimization */
  .dashboard-section {
    margin-bottom: 20px;
  }
  
  .trend-card {
    padding: 12px;
    border-radius: 6px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .trends-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (min-width: 1201px) {
  .trends-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 20px !important;
  }
}

.trend-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.trend-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.trend-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  justify-content: space-between;
}

.trend-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.trend-card-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #129ed9, #0f8bb8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.trend-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.trend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trend-item {
  background: white;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
}

.trend-item:hover {
  border-color: #129ed9;
  background: #f0f9ff;
}

.trend-keyword-btn {
  background: white;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trend-keyword-btn:hover {
  border-color: #129ed9;
  background: #f0f9ff;
  color: #129ed9;
}

.trend-keyword-btn i {
  opacity: 0.6;
}

/* FIX MESHLIST GENERAL FEED SETTINGS GREY BACKGROUND */
#step-settings {
  background: #ffffff !important;
}

#ruleManagement {
  background: #ffffff !important;
}

.feed-settings-container {
  background: #ffffff !important;
}

.rule-management {
  background: #ffffff !important;
}

.bulk-copy-section {
  background: #ffffff !important;
}

/* KEYWORD INSIGHTS TABLE STYLING */
.keyword-insights-table {
  margin-top: 20px;
}

.keyword-insights-table h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.insights-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.insights-table th,
.insights-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e1e4e8;
}

.insights-table th {
  background: white;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  border-bottom: 2px solid #e1e4e8;
}

.insights-table td {
  font-size: 14px;
  color: #666;
}

.insights-table tbody tr:hover {
  background: rgba(102, 126, 234, 0.05);
  transition: background-color 0.2s ease;
}

.competition-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competition-low {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.competition-medium {
  background: rgba(255, 193, 7, 0.1);
  color: #FFC107;
}

.competition-high {
  background: rgba(244, 67, 54, 0.1);
  color: #F44336;
}

.competition-unknown {
  background: rgba(158, 158, 158, 0.1);
  color: #9E9E9E;
}

/* ERROR AND RETRY STATES */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #666;
}

.error-state i {
  font-size: 24px;
  color: #f44336;
  margin-bottom: 12px;
}

.retry-btn {
  background: #129ed9;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s ease;
}

.retry-btn:hover {
  background: #0f8bb8;
}

/* ENHANCED TREND SUMMARY STYLING */
.trend-summary {
  background: white;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .trend-summary {
    padding: 16px;
    margin-bottom: 16px;
  }
}

.trend-summary h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .trend-summary h3 {
    font-size: 16px;
  }
}

.trend-summary h3 i {
  color: #129ed9;
}

.trend-summary p {
  margin: 0 0 16px 0;
  line-height: 1.6;
  color: #555;
  font-size: 14px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .trend-summary p {
    font-size: 13px;
    margin-bottom: 12px;
  }
}

.summary-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .summary-stats {
    gap: 8px;
  }
}

.stat-item {
  background: rgba(18, 158, 217, 0.1);
  color: #129ed9;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-item i {
  font-size: 14px;
}

/* ENHANCED TREND CARDS */
.trend-card {
  position: relative;
}

.trend-card-header {
  margin-bottom: 16px;
}

.trend-badge {
  background: #129ed9;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

/* HOT PRODUCTS STYLING */
.hot-product {
  cursor: pointer;
  position: relative;
  padding-left: 32px !important;
  transition: all 0.2s ease;
}

.hot-product:hover {
  background: #129ed9 !important;
  color: white !important;
  transform: translateX(4px);
}

.hot-product .rank {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #129ed9;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.hot-product:hover .rank {
  background: white;
  color: #129ed9;
}

.hot-product i {
  margin-left: auto;
  opacity: 0.6;
  font-size: 12px;
}

/* SEARCH BUTTONS */
.trend-search-btn {
  background: linear-gradient(135deg, #129ed9, #0f8bb8);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.trend-search-btn:hover {
  background: linear-gradient(135deg, #0f8bb8, #0a7ba8);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(18, 158, 217, 0.3);
}

/* KEYWORD BUTTONS */
.trend-keyword-btn {
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.trend-keyword-btn:hover {
  background: linear-gradient(135deg, #d35400, #c0392b);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(230, 126, 34, 0.3);
}

/* TREND MORE INDICATOR */
.trend-more {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px dashed #e1e4e8;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

/* SPECIFIC CARD STYLING */
.hot-products {
  border-left: 4px solid #e74c3c;
}

.search-queries {
  border-left: 4px solid #3498db;
}

.keyword-opportunities {
  border-left: 4px solid #e67e22;
}

/* TikTok Ads specific styles */
.tiktok-ad-card {
  position: relative;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  overflow: hidden;
}

.tiktok-ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #ff0050;
}

.tiktok-video-player {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
}

.tiktok-video-player video {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 0, 80, 0.1);
}

.tiktok-ad-image {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
}

.tiktok-ad-image img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 0, 80, 0.1);
}

.audience-badge {
  background: linear-gradient(135deg, #ff0050, #ff4d6d);
  color: white;
  font-weight: 600;
  border: none;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.ad-dates {
  margin: 8px 0;
  padding: 6px 10px;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 6px;
  color: #6c757d;
  font-size: 11px;
  border-left: 3px solid #ff0050;
}

.no-media {
  padding: 40px 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  color: #6c757d;
  border: 2px dashed #e1e5e9;
}

.no-media i {
  font-size: 48px;
  margin-bottom: 10px;
  color: #ff0050;
  opacity: 0.6;
}

.trend-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .trend-actions {
    gap: 6px;
  }
}

.trend-btn {
  padding: 8px 12px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .trend-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
}

.trend-btn:hover {
  background: #007bff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.trend-btn.secondary {
  border-color: #6c757d;
  color: #6c757d;
}

.trend-btn.secondary:hover {
  background: #6c757d;
  color: white;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.trend-btn i {
  font-size: 10px;
}

.trend-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.trend-header h4 {
  margin: 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  flex-grow: 1;
  margin-right: 10px;
}

.trend-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.trend-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.metric-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  font-size: 11px;
  color: #666;
}

/* Meta Ads specific styles */
.meta-ad-card {
  position: relative;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px !important;
  overflow: hidden;
  padding: 16px !important;
  min-width: 320px !important;
  max-width: 380px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.meta-ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #1877f2;
}

.meta-page-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
}

.page-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e1e5e9;
}

.page-avatar-placeholder {
  font-size: 28px !important;
  color: #bbb;
}

.platform-badges {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.platform-badge.platform-facebook {
  background: rgba(24, 119, 242, 0.1);
  color: #1877f2;
  border: 1px solid rgba(24, 119, 242, 0.3);
}

.platform-badge.platform-instagram {
  background: linear-gradient(45deg, rgba(225, 48, 108, 0.1), rgba(129, 52, 175, 0.1));
  color: #e1306c;
  border: 1px solid rgba(225, 48, 108, 0.3);
}

.ad-status {
  display: flex;
  align-items: center;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-badge.inactive {
  background: rgba(158, 158, 158, 0.1);
  color: #9e9e9e;
  border: 1px solid rgba(158, 158, 158, 0.3);
}

.meta-video-player {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
}

.meta-video-player video {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.1);
}

.meta-ad-image {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
}

.meta-ad-image img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.1);
}

.ad-content {
  margin: 12px 0;
  padding: 12px;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 8px;
  border-left: 3px solid #1877f2;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .ad-content {
    padding: 10px;
    margin: 10px 0;
  }
}

.ad-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .ad-title {
    font-size: 13px;
    margin-bottom: 6px;
  }
}

.ad-body {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .ad-body {
    font-size: 12px;
    line-height: 1.4;
  }
}

.ad-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #1877f2;
  color: white;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* Search Keywords Styling for TikTok and Meta Ads */
.search-keywords {
  margin: 12px 0 8px 0;
  padding-top: 12px;
  border-top: 1px solid #e4e6ea;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .search-keywords {
    margin: 10px 0 6px 0;
    padding-top: 10px;
  }
}

.search-keywords small {
  display: block;
  margin-bottom: 8px;
  color: #65676b;
  font-weight: 500;
  font-size: 12px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .search-keywords small {
    font-size: 11px;
    margin-bottom: 6px;
  }
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .keyword-tags {
    gap: 6px;
  }
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .keyword-tag {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 12px;
  }
}

.keyword-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.keyword-tag:active {
  transform: translateY(0px);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.keyword-tag i {
  font-size: 10px;
  margin-right: 2px;
}

/* PRESERVE MESHFEED IMPORT PRODUCTS BUTTON STYLING */
#shopify-fetch-button1 {
  background: #ffffff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 14px !important;
  font-weight: normal !important;
  font-family: 'manrope', sans-serif !important;
  width: 175px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s, border-color 0.2s !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  position: relative !important;
  overflow: hidden !important;
}

#shopify-fetch-button1:hover {
  background: #f8f9fa !important;
  border-color: #129ed9 !important;
  transform: translateY(-1px) !important;
}

#shopify-fetch-button1 i {
  color: #129ed9 !important;
}

/* MeshFeed import button glow effect */
#shopify-fetch-button1::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}

#shopify-fetch-button1.loading::after {
  opacity: 1;
  animation: glowFlow 1s ease-out infinite;
}

.bulk-edit-title {
    font-family: var(--font-title) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin-bottom: 12px !important;
}

/* Status labels improvement */
.status-label {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.status-label.not-connected {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
}

.status-label.connected {
    background-color: #f0fdf4 !important;
    color: #16a34a !important;
}
/* Global override to ensure proper info-box2 padding */
.info-box2 {
    padding: 16px 20px !important;
    /* background-color: rgba(18, 158, 217, 0.1) !important; */
    border-radius: 8px !important;
    text-align: left !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.6 !important;
    font-family: "Manrope", sans-serif !important;
    min-height: auto !important;
}

.info-box2 i.fas.fa-info-circle {
    color: #129ed9 !important;
    margin-right: 8px !important;
}

.info-box2 .suggestion-button {
    margin-top: 12px !important;
}

/* ========== ENHANCED STORE INTERFACE STYLES ========== */

/* Project Filter Container - Professional styling */
.project-filter-container {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.project-filter-container label {
    font-family: 'Inter Variable', sans-serif;
    font-weight: 500;
    color: var(--text-color);
    font-size: 15px;
    margin: 0;
}

.project-filter-select {
    padding: 10px 16px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    font-family: 'Inter Variable', sans-serif !important;
    min-width: 200px;
    outline: none;
    transition: all 0.2s ease;
}

.project-filter-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
}

/* Clean Store Container - Professional Grid */
.store-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Clean Store Cards - Simple & Professional */
.store-card {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    backdrop-filter: none;
}

.store-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

/* Store Card Content - Clean Typography */
.store-title {
    font-size: 1.2rem !important;
    color: var(--text-color) !important;
    margin: 0 0 12px !important;
    font-weight: 600 !important;
    font-family: 'Inter Variable', sans-serif !important;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-url {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    display: block !important;
    margin-bottom: 12px !important;
    font-family: 'Inter Variable', sans-serif !important;
    padding: 0;
    background: none;
    border-radius: 0;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
    border: none;
}

.store-url:hover {
    color: var(--primary-color-dark) !important;
}

.store-description {
    color: var(--text-color-secondary) !important;
    font-size: 14px !important;
    margin: 0 0 16px !important;
    line-height: 1.5 !important;
    font-family: 'Inter Variable', sans-serif !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Enhanced Settings Button - Premium Style */
/* Clean, minimal project settings button */
.project-settings-button {
    padding: 10px 16px !important;
    background: var(--sidebar-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter Variable', sans-serif !important;
    width: 100%;
    margin-top: auto;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.project-settings-button:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-settings-button i {
    font-size: 14px;
    color: inherit !important;
}

/* Clean, inline settings view - expands within card */
.manage-users-view {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    background: rgba(0, 0, 0, 0.01) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    z-index: auto !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow-y: visible !important;
    animation: fadeIn 0.2s ease-in-out !important;
    margin-top: 16px;
}

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

.manage-users-view.hidden {
    display: none !important;
}

.manage-users-view:hover {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

/* Store Name Label in Settings - Now handled by settings header */
.store-name-top-right {
    display: none !important;
}

/* Clean Back Button */
.manage-users-view .rule-item-button2:not(.delete-button) {
    background: var(--sidebar-bg) !important;
    color: var(--text-color) !important;
    padding: 8px 16px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter Variable', sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
}

.manage-users-view .rule-item-button2:not(.delete-button):hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Clean Delete Button */
.manage-users-view .rule-item-button2.delete-button {
    background: var(--sidebar-bg) !important;
    color: #dc2626 !important;
    border: 1px solid #dc2626 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-top: 20px !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter Variable', sans-serif !important;
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.manage-users-view .rule-item-button2.delete-button:hover {
    background: #dc2626 !important;
    color: white !important;
}

/* Settings Sections Spacing */
.manage-users-view .add-user-container {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.manage-users-view .change-project-container {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

/* Clean Add User Container */
.add-user-container {
    background: var(--sidebar-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.add-user-text {
    font-size: 16px !important;
    color: var(--text-color) !important;
    margin: 0 !important;
    font-weight: 500 !important;
    font-family: 'Inter Variable', sans-serif !important;
}

.add-user-container .input-field {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
    transition: border-color 0.2s ease !important;
    background: var(--input-bg);
    box-sizing: border-box;
}

.add-user-container .input-field:focus {
    border-color: var(--primary-color) !important;
    outline: none;
}

.add-user-container .role-select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
    background: var(--input-bg);
    cursor: pointer;
    box-sizing: border-box;
}

.add-user-container .role-select:focus {
    border-color: var(--primary-color) !important;
    outline: none;
}

/* Change Project Container */
.change-project-container {
    background: var(--sidebar-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
}

.change-project-container p {
    font-size: 16px !important;
    color: var(--text-color) !important;
    margin: 0 0 12px 0 !important;
    font-weight: 500 !important;
    font-family: 'Inter Variable', sans-serif !important;
}

.change-project-container select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: 'Inter Variable', sans-serif !important;
    background: var(--input-bg);
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.change-project-container select:focus {
    border-color: var(--primary-color) !important;
    outline: none;
}

/* User Lists in Settings Modal */
.manage-users-view ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 20px 0 !important;
}

.manage-users-view li {
    padding: 16px 20px !important;
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
    font-family: 'Inter Variable', sans-serif !important;
    font-size: 15px !important;
    color: var(--text-color) !important;
    transition: all 0.2s ease;
}

.manage-users-view li:hover {
    background: rgba(18, 158, 217, 0.05) !important;
    border-color: rgba(18, 158, 217, 0.2) !important;
}

.manage-users-view h4 {
    font-size: 18px !important;
    color: var(--text-color) !important;
    margin: 24px 0 16px 0 !important;
    font-weight: 600 !important;
    font-family: 'Inter Variable', sans-serif !important;
}

/* Store Owner Label */
.store-owner-label {
    font-size: 14px !important;
    color: #666 !important;
    margin-top: 20px !important;
    font-family: 'Inter Variable', sans-serif !important;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
}

.store-owner-label strong {
    color: var(--text-color) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .store-container {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 28px;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .store-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .store-card {
        padding: 24px;
        min-height: 200px;
    }
    
    .store-title {
        font-size: 1.3rem !important;
    }
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .manage-users-view {
        width: 95% !important;
        max-width: none !important;
        padding: 32px 24px !important;
        max-height: 90vh !important;
    }
    
    .store-name-top-right {
        font-size: 1.5rem !important;
        margin-bottom: 24px !important;
    }
    
    .manage-users-view .rule-item-button2:not(.delete-button) {
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
    
    .manage-users-view .rule-item-button2.delete-button {
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 480px) {
    .store-container {
        gap: 16px;
    }
    
    .store-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .manage-users-view {
        width: 98% !important;
        padding: 24px 20px !important;
        max-height: 95vh !important;
        border-radius: 16px !important;
    }
    
    .store-name-top-right {
        font-size: 1.3rem !important;
        margin-bottom: 20px !important;
    }
    
    .project-filter-container {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .project-filter-select {
        min-width: 180px;
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
    .add-user-container,
    .change-project-container {
        padding: 20px !important;
        margin: 20px 0 !important;
    }
    
    .add-user-text,
    .change-project-container p {
        font-size: 16px !important;
    }
    
    .add-user-container .input-field,
    .add-user-container .role-select,
    .change-project-container select {
        padding: 14px 16px !important;
        font-size: 15px !important;
    }
    
    .manage-users-view .rule-item-button2:not(.delete-button),
    .manage-users-view .rule-item-button2.delete-button {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    
    .manage-users-view h4 {
        font-size: 16px !important;
    }
    
    .manage-users-view li {
        padding: 14px 16px !important;
        font-size: 14px !important;
    }
}

/* ========== PROFESSIONAL PROJECTS PAGE - CLEAN DESIGN ========== */
/* Complete redesign with proper modal and consistent styling */

/* Projects Container - Professional Grid */
.store-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    padding: 20px !important;
    margin: 0 auto !important;
    max-width: 1600px !important;
}

/* Mobile: Single column for better readability */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .store-container {
        grid-template-columns: 1fr !important;
    }
}

/* Store Cards - Clean & Professional */
    .store-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 24px !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: box-shadow 0.2s ease !important;
    position: relative !important;
    overflow: visible !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    max-width: none !important;
}

.store-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.store-card::before {
    display: none !important;
}

/* Store Content */
.store-info-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.store-info-container.hidden {
    display: none !important;
}

.store-title {
    font-size: 1.125rem !important;
    color: #111827 !important;
    margin: 0 0 8px 0 !important;
    font-weight: 600 !important;
    font-family: 'Inter Variable', sans-serif !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
}

.store-url {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    display: block !important;
    margin: 0 0 8px 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    transition: color 0.2s ease !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-weight: 400 !important;
}

.store-url:hover {
    color: #1d4ed8 !important;
}

.store-description {
    color: #6b7280 !important;
    font-size: 14px !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.5 !important;
    font-family: 'Inter Variable', sans-serif !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
}

.store-owner-label {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin: 8px 0 16px 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
    padding: 8px 12px !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
}

.store-owner-label strong {
    color: #111827 !important;
}

/* Settings Button - Clean & Professional */
.project-settings-button {
    padding: 10px 16px !important;
    background: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter Variable', sans-serif !important;
    width: 100% !important;
    margin-top: auto !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    overflow: visible !important;
    text-decoration: none !important;
}

.project-settings-button:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.project-settings-button i {
    font-size: 14px !important;
    color: inherit !important;
}

/* Settings Modal - Professional Overlay */
.settings-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    padding: 20px !important;
}

.settings-modal-backdrop.hidden {
    display: none !important;
}

.settings-modal {
    background: #ffffff !important;
    border-radius: 8px !important;
    padding: 0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    max-width: 500px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    position: relative !important;
}

.settings-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 24px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #ffffff !important;
}

.settings-modal-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
}

.settings-modal-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.settings-modal-close:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

.settings-modal-content {
    padding: 24px !important;
    max-height: calc(90vh - 80px) !important;
    overflow-y: auto !important;
}

/* Modal Form Sections */
.add-user-container {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 0 0 20px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.add-user-text {
    font-size: 16px !important;
    color: #111827 !important;
    margin: 0 !important;
    font-weight: 500 !important;
    font-family: 'Inter Variable', sans-serif !important;
}

.add-user-container .input-field {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin: 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease !important;
}

.add-user-container .input-field:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.add-user-container .role-select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    margin: 0 !important;
    font-family: 'Inter Variable', sans-serif !important;
    background: #ffffff !important;
    color: #111827 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.add-user-container .role-select:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.change-project-container {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 0 0 20px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.change-project-container p {
    font-size: 16px !important;
    color: #111827 !important;
    margin: 0 0 16px 0 !important;
    font-weight: 500 !important;
    font-family: 'Inter Variable', sans-serif !important;
}

.change-project-container select {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: 'Inter Variable', sans-serif !important;
    background: #ffffff !important;
    color: #111827 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease !important;
    margin-bottom: 16px !important;
}

.change-project-container select:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Modal Buttons */
.settings-modal .project-settings-button {
    margin-top: 0 !important;
    width: 100% !important;
}

.settings-modal .rule-item-button2.delete-button {
    background: #ffffff !important;
    color: #dc2626 !important;
    border: 1px solid #dc2626 !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 20px 0 0 0 !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter Variable', sans-serif !important;
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
}

.settings-modal .rule-item-button2.delete-button:hover {
    background: #dc2626 !important;
    color: white !important;
}

/* Hide all old conflicting styles */
.store-name-top-right {
    display: none !important;
    }
    
    .manage-users-view {
    display: none !important;
}

/* Responsive Design */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .store-container {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 16px !important;
    }
    
    .store-card {
        padding: 20px !important;
        min-height: 180px !important;
    }
    
    .settings-modal {
        max-width: 95% !important;
        margin: 20px !important;
    }
}

@media (max-width: 480px) {
    .store-container {
        gap: 12px !important;
        padding: 12px !important;
    }
    
    .store-card {
        padding: 16px !important;
        min-height: 160px !important;
    }
    
    .settings-modal-header {
        padding: 16px 20px !important;
    }
    
    .settings-modal-content {
        padding: 20px !important;
    }
}

/* ========== END PROFESSIONAL PROJECTS PAGE STYLES ========== */

/* ========== RULES DESKTOP TWO-COLUMN LAYOUT ========== */
.rules-desktop-container {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}

.rules-list-panel {
    flex: 1;
    min-width: 300px;
}

.rule-editor-panel {
    flex: 1.5;
    min-width: 400px;
}

.rule-editor-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--chat-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.placeholder-content {
    text-align: center;
    color: var(--text-color);
}

.placeholder-content h4 {
    margin-bottom: 8px;
    font-size: 20px;
    color: #129ed9;
}

.placeholder-content p {
    color: #666;
    font-size: 14px;
}

/* Rule item active state */
.rule-item.rule-active {
    background: var(--suggestion-bg) !important;
    color: #ffffff !important;
    border: 2px solid var(--primary-color) !important;
}

.rule-item.rule-active .rule-main-content {
    color: #ffffff !important;
}

.rule-item.rule-active .rule-icon {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.rule-item.rule-active .affected-label {
    background: var(--primary-color) !important;
    color: #fff !important;
}

/* Rule form in desktop layout */
.rule-editor-panel .rule-form {
    margin: 0;
    max-width: none;
    width: 100%;
}

.rule-editor-panel .rule-form.hidden {
    display: none;
}

.rule-editor-panel .rule-form:not(.hidden) {
    display: block;
}

.rule-editor-panel .rule-form:not(.hidden) ~ .rule-editor-placeholder {
    display: none !important;
}

/* Rule form header */
.rule-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rule-form-header h4 {
    margin: 0;
}

.affected-products-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s;
}

.affected-products-btn:hover {
    background: #0f8bb8;
}

/* Mobile responsive behavior */
@media (max-width: 1024px) {
    .rules-desktop-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .rules-list-panel,
    .rule-editor-panel {
        flex: none;
        min-width: unset;
    }
    
    .rule-editor-placeholder {
        display: none;
    }
    
    .rule-item.rule-active {
        background: var(--suggestion-bg) !important;
        color: #ffffff !important;
        border-color: var(--border-color) !important;
    }
    
    .rule-item.rule-active .rule-main-content {
        color: #ffffff !important;
    }
    
    .rule-item.rule-active .rule-icon {
        background: var(--primary-color) !important;
        color: #fff !important;
    }
}

/* Ensure proper spacing and layout */
.rules-list-container {
    margin-bottom: 0;
}

.rule-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.rule-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.rule-action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.delete-rule-button {
    margin: 0;
    padding: 10px 15px;
    color: #dc3545;
    background-color: #fff;
    border: 1px solid #dc3545;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.delete-rule-button:hover {
    background-color: #dc3545;
    color: #fff;
}

.rule-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.save-rule-button {
    background: #129ed9;
    color: #fff;
}

.save-rule-button:hover {
    background: #0f8bb8;
}

.cancel-rule-button {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.cancel-rule-button:hover {
    background: #f5f5f5;
}

/* ========== END RULES DESKTOP TWO-COLUMN LAYOUT ========== */

/* Fix cursor issue for pricing labels */
.pricing-label {
    cursor: default !important;
}

/* ========== END CURSOR FIXES ========== */

/* Fix double loading dots by overriding ::after pseudo-element */
.loading-message::after {
    display: none !important;
}

/* ========== END LOADING FIX ========== */

/* Select All Metafields Control */
.select-all-metafields {
    margin-bottom: 15px;
    padding: 10px;
    background: var(--suggestion-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
}

.select-all-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.select-all-label:hover {
    color: var(--primary-color);
}

/* ========== END SELECT ALL METAFIELDS ========== */

/* MeshBoard Store Selection Message */
.store-selection-message {
    text-align: center;
    padding: 40px 20px;
    background: var(--sidebar-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.store-selection-message h3 {
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.store-selection-message p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* MeshBoard Loading State */
.meshboard-dashboard .loading {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
    font-style: italic;
}

/* CRITICAL: Fix store dropdown overlay - override all previous definitions */
.sidebar-header-store {
    position: relative !important;
}

.store-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background-color: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(18,158,217,0.15) !important;
    border: 1.5px solid #e8eef5 !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 8px !important;
    font-family: 'Inter Variable', 'Manrope', sans-serif !important;
    z-index: 10002 !important;
    color: var(--text-color) !important;
    max-height: 450px !important;
    min-height: 250px !important;
    overflow-y: auto !important;
}

/* Desktop larger dropdown */
@media (min-width: 768px) {
    .store-dropdown {
        max-height: 500px !important;
        min-height: 350px !important;
    }
}

/* MeshBoard Store Info Section */
.store-info-section {
    padding: 16px;
    background: var(--sidebar-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.current-store-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.current-store-display i {
    color: var(--primary-color);
}

/* Loading and error states for keyword analysis */
.loading-state, .error-state, .no-data-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-color);
}

.loading-state i, .error-state i, .no-data-state i {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.loading-state .fa-spin {
    color: var(--primary-color);
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 12px;
    font-size: 14px;
}

.retry-btn:hover {
    background: var(--button-hover);
}

/* Dashboard styling improvements - clean and mobile-friendly */
.dashboard-header {
  background: white;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    padding: 20px 16px;
    margin-bottom: 20px;
  }
}

.dashboard-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin: 0 0 8px 0;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .dashboard-header h1 {
    font-size: 24px;
  }
}

.dashboard-subtitle {
  font-size: 16px;
  color: #666;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .dashboard-subtitle {
    font-size: 14px;
  }
}

.dashboard-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    gap: 16px;
  }
}

.dashboard-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .dashboard-section {
    border-radius: 8px;
  }
}

/* ========== COMPACT AD LIBRARY CARDS ========== */

/* TikTok Ads specific styles */
.tiktok-ad-card {
  position: relative;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px !important;
  overflow: hidden;
  padding: 16px !important;
  min-width: 320px !important;
  max-width: 380px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tiktok-ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #fe2c55;
}

/* Force balanced card containers */
.trend-card.meta-ad-card,
.trend-card.tiktok-ad-card {
  min-width: 320px !important;
  max-width: 380px !important;
  width: 100% !important;
  padding: 16px !important;
  border-radius: 8px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  height: auto !important;
}

/* Balanced video and image sizing for ad cards */
.meta-video-player video,
.tiktok-video-player video {
  width: 100% !important;
  max-height: 180px !important;
  height: 180px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
}

.meta-ad-image img,
.tiktok-ad-image img {
  width: 100% !important;
  max-height: 180px !important;
  height: 180px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
}

/* Compact header styling for ad cards */
.trend-header h4 {
  font-size: 12px !important;
  font-weight: 600;
  margin: 0 0 6px 0 !important;
  color: #333;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Compact metric badges */
.metric-badge {
  font-size: 10px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  background: #f1f3f4 !important;
  color: #666 !important;
  display: flex;
  align-items: center;
  gap: 3px;
}

.audience-badge {
  background: #e3f2fd !important;
  color: #1976d2 !important;
}

/* Compact keyword tags */
.keyword-tag {
  background: #f1f3f4 !important;
  color: #333 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.keyword-tag:hover {
  background: #129ed9 !important;
  color: white !important;
}

/* Compact buttons */
.trend-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-btn:hover {
  background: #f8f9fa;
  border-color: #129ed9;
  color: #129ed9;
}

/* Page info for Meta ads - compact */
.page-avatar {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e1e5e9 !important;
}

.page-avatar-placeholder {
  font-size: 24px !important;
  color: #bbb;
}

/* No media placeholder */
.no-media {
  height: 140px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 4px;
  color: #666;
}

.no-media i {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.5;
}

.no-media p {
  font-size: 12px;
  margin: 0;
}

/* Compact dates and details */
.ad-dates small {
  font-size: 11px !important;
  color: #666;
}

.search-keywords small {
  font-size: 11px !important;
  color: #666;
}

/* ========== UNIVERSAL BUTTON STANDARDIZATION ========== */

/* Reset ALL buttons to consistent styling - match send-button and import-button style */
/* EXCLUDE sidebar menu items from button standardization */
.btn-primary:not(.menu-item):not(.menu-item-store):not(.menu-item-billing):not(.menu-item-settings),
.btn-secondary:not(.menu-item):not(.menu-item-store):not(.menu-item-billing):not(.menu-item-settings),
.add-shipping-btn,
.add-rule-button,
.copy-rule-button,
.save-rule-button,
.cancel-rule-button,
.edit-button,
.apply-rules-button,
.handle-sync-button,
#saveMappingsBtn,
#resetMappingsBtn,
#saveCustomTemplateBtn,
.source-card button:not(.menu-item),
.store-form-container button:not(.menu-item),
.project-settings-button:not(.menu-item),
.add-store-button,
.import-button,
.import-button1,
.import-button2,
.import-button3,
.import-button4,
.import-button5,
.import-button6,
.import-button7,
.import-button8,
.import-button9,
.import-button10,
.import-button11,
.import-button12,
.import-button13,
.import-button14,
.import-button15,
.import-button-import,
.nice-button:not(.menu-item) {
  /* Base styling - matches import products button */
  background-color: #fff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  padding: 10px 16px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  font-family: 'Inter Variable', 'Manrope', sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(18,158,217,0.05) !important;
}

/* Hover states - consistent across all buttons */
.btn-primary:not(.menu-item):not(.menu-item-store):not(.menu-item-billing):not(.menu-item-settings):hover,
.btn-secondary:not(.menu-item):not(.menu-item-store):not(.menu-item-billing):not(.menu-item-settings):hover,
.add-shipping-btn:hover,
.add-rule-button:hover,
.copy-rule-button:hover,
.save-rule-button:hover,
.cancel-rule-button:hover,
.edit-button:hover,
.apply-rules-button:hover,
.handle-sync-button:hover,
#saveMappingsBtn:hover,
#resetMappingsBtn:hover,
#saveCustomTemplateBtn:hover,
.source-card button:not(.menu-item):hover,
.store-form-container button:not(.menu-item):hover,
.project-settings-button:not(.menu-item):hover,
.add-store-button:hover,
.import-button:hover,
.import-button1:hover,
.import-button2:hover,
.import-button3:hover,
.import-button4:hover,
.import-button5:hover,
.import-button6:hover,
.import-button7:hover,
.import-button8:hover,
.import-button9:hover,
.import-button10:hover,
.import-button11:hover,
.import-button12:hover,
.import-button13:hover,
.import-button14:hover,
.import-button15:hover,
.import-button-import:hover,
.nice-button:not(.menu-item):hover {
  background-color: #f8f9fa !important;
  border-color: #129ed9 !important;
  color: #333 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px rgba(18,158,217,0.12) !important;
}

/* Fix specific problematic buttons */


/* Field mapping buttons */
#saveMappingsBtn,
#resetMappingsBtn {
  background-color: #fff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
}

/* Image edit buttons */
.edit-button,
button[onclick*="editImage"],
button[onclick*="upscaleImage"],
button[onclick*="removeBackground"] {
  background-color: #fff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 6px;
  min-width: 75px !important;
  max-width: 95px !important;
  gap: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

/* Image edit buttons hover effects */
.edit-button:hover,
button[onclick*="editImage"]:hover,
button[onclick*="upscaleImage"]:hover,
button[onclick*="removeBackground"]:hover {
  background-color: #f8f9fa !important;
  border-color: #129ed9 !important;
  transform: translateY(-1px) !important;
}

/* Image edit button icons - blue color */
.edit-button i,
button[onclick*="editImage"] i,
button[onclick*="upscaleImage"] i,
button[onclick*="removeBackground"] i {
  color: #129ed9 !important;
  font-size: 12px !important;
}

/* Add shipping option and sync to GMC buttons - match import button style */
.add-shipping-btn,
button[onclick*="addShipping"],
button[onclick*="syncToGMC"] {
  background-color: #fff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
  font-weight: 500 !important;
}

/* Rule buttons - match import button style */
.add-rule-button,
.copy-rule-button,
.save-rule-button,
button[onclick*="addNewRule"],
button[onclick*="showCopyRulesModal"],
button[onclick*="saveRule"] {
  background-color: #fff !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
}

/* Remove background hover for add new rule button */
button[onclick*="addNewRule"]:hover {
  background-color: #f8f9fa !important;
  transform: none !important;
}

/* Cancel buttons - slightly different styling */
.cancel-rule-button,
button[onclick*="hideCopyRulesPanel"],
button[onclick*="cancel"] {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  border: 1px solid #dee2e6 !important;
}

.cancel-rule-button:hover,
button[onclick*="hideCopyRulesPanel"]:hover,
button[onclick*="cancel"]:hover {
  background-color: #e9ecef !important;
  border-color: #adb5bd !important;
  color: #495057 !important;
}

/* Icons should always be blue in buttons */
.btn-primary i,
.btn-secondary i,
.add-shipping-btn i,
.add-rule-button i,
.copy-rule-button i,
.save-rule-button i,
.edit-button i,
.apply-rules-button i,
.handle-sync-button i,
#saveMappingsBtn i,
#resetMappingsBtn i,
#saveCustomTemplateBtn i,
.import-button i,
.import-button1 i,
.import-button2 i,
.import-button3 i,
.import-button4 i,
.import-button5 i,
.import-button6 i,
.import-button7 i,
.import-button8 i,
.import-button9 i,
.import-button10 i,
.import-button11 i,
.import-button12 i,
.import-button13 i,
.import-button14 i,
.import-button15 i,
.import-button-import i,
.nice-button i {
  color: #129ed9 !important;
}

/* Special case: Only billing/checkout buttons keep purple background */
.apply-rules-button-checkout {
  background-color: #7c3aed !important;
  color: white !important;
  border: 1px solid #6d28d9 !important;
}

.apply-rules-button-checkout:hover {
  background-color: #6d28d9 !important;
  border-color: #5b21b6 !important;
}

.apply-rules-button-checkout i {
  color: white !important;
}

/* Fix disabled states */
.btn-primary:disabled,
.btn-secondary:disabled,
.add-shipping-btn:disabled,
.add-rule-button:disabled,
.copy-rule-button:disabled,
.save-rule-button:disabled,
.cancel-rule-button:disabled,
.edit-button:disabled,
.apply-rules-button:disabled,
.handle-sync-button:disabled {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  border-color: #dee2e6 !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  transform: none !important;
}

/* Override any conflicting styles that might be adding blue backgrounds or weird styling */
button {
  box-sizing: border-box !important;
}

/* Make sure text in buttons is never bold unless specified */
.btn-primary,
.btn-secondary,
.add-shipping-btn,
.add-rule-button,
.copy-rule-button,
.save-rule-button,
.cancel-rule-button {
  font-weight: 500 !important;
}

/* ========== END BUTTON STANDARDIZATION ========== */

/* ✅ Make all integration input fields wider than buttons */
.connection-item #shopifyShopUrl,
.connection-item #shopifyApiKey {
    max-width: none !important; /* Full width for consistency */
    width: 100% !important;
}

/* ========== MESH TOGGLE BUTTONS STYLING ========== */
.mesh-mode-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.mesh-toggle-btn {
    background: #ffffff;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #586069;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    justify-content: center;
}

.mesh-toggle-btn:hover {
    border-color: #129ed9;
    background: #f0f9ff;
    color: #129ed9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(18, 158, 217, 0.15);
}

.mesh-toggle-btn.active {
    background: #ffffff;
    border: 3px solid #129ed9;
    color: #129ed9;
    font-weight: 600;
    position: relative;
    box-shadow: none;
}

.mesh-toggle-btn.active:hover {
    background: #f8fcff;
    border-color: #0f8bb8;
    color: #0f8bb8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(18, 158, 217, 0.1);
}

.mesh-toggle-btn i {
    font-size: 16px;
    opacity: 0.8;
}

.mesh-toggle-btn.active i {
    opacity: 1;
}

/* Responsive design for smaller screens */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .mesh-mode-toggle {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin: 10px 0;
    }
    
    .mesh-toggle-btn {
        min-width: 120px;
        width: 100%;
        max-width: 200px;
        padding: 12px 16px;
        font-size: 15px;
    }
    
    /* Credits display mobile optimization */
    #creditsWrapper, #autoListCreditsLabel {
        font-size: 14px;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* Mesh Mode Cards - Clean, Minimal Design */
.mesh-mode-cards {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 20px auto;
}

.mesh-mode-card {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ⚠️ DISABLED - causing page flickering
.mesh-mode-card:hover {
    border-color: #d6d9dc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}
*/

.mesh-mode-card.active {
    background: linear-gradient(135deg, #f0f8ff 0%, #f8fbff 100%);
    border-color: #b3d9ff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.12);
}

.mesh-mode-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64b5f6, #90caf9);
    border-radius: 12px 12px 0 0;
}

.mesh-mode-card .mesh-card-icon {
    font-size: 16px;
    margin: 0;
    color: #8a9ba8;
    transition: color 0.2s ease;
    flex-shrink: 0;
    align-self: center;
}

.mesh-mode-card.active .mesh-card-icon {
    color: #2c5aa0;
}

.mesh-mode-card .mesh-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mesh-mode-card .mesh-card-title-row {
    display: flex;
    align-items: center;
    /* gap: 6px; */
}

.mesh-mode-card .mesh-card-content h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #495057;
}

.mesh-mode-card.active .mesh-card-content h3 {
    color: #2c5282;
}

.mesh-mode-card .mesh-card-content p {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.mesh-mode-card.active .mesh-card-content p {
    color: #5a6c7d;
}

/* Mobile responsive design */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    .mesh-mode-cards {
        grid-template-columns: 1fr;
        max-width: 100%;
        margin: 15px auto;
        gap: 12px;
    }
    
    .mesh-mode-card {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .mesh-mode-card .mesh-card-icon {
        font-size: 20px;
        margin-bottom: 0;
    }
    
    .mesh-mode-card .mesh-card-content h3 {
        font-size: 16px;
    }
    
    /* Hide subtexts on mobile for cleaner look */
    .mesh-mode-card .mesh-card-content p {
        display: none;
    }
}

@media (max-width: 480px) {
    .mesh-mode-cards {
        margin: 10px;
        gap: 10px;
    }
    
    .mesh-mode-card {
        padding: 10px;
    }

/* Loading spinner animation for subscription box */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 2px solid #e9ecef;
    border-top: 2px solid #129ed9;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
    
    /* AutoList toggle section mobile spacing */
    .sync-toggle-section {
        margin: 15px 0 !important;
        padding: 15px 10px;
    }
    
    .sync-toggle-section .field-group {
        text-align: center !important;
    }
    
    .sync-toggle-section label {
        font-size: 14px;
        margin-right: 8px !important;
    }
    
    /* AutoList product type cards mobile optimization */
    #autoListProductTypes > div {
        padding: 20px 15px !important;
        margin-bottom: 15px !important;
    }
    
    #autoListProductTypes h3 {
        font-size: 18px !important;
    }
    
    #autoListProductTypes .fa {
        font-size: 14px !important;
    }
    
    #autoListProductTypes span {
        font-size: 14px !important;
    }
    
    /* Rank badge mobile sizing */
    #autoListProductTypes div[style*="width: 30px"] {
        width: 25px !important;
        height: 25px !important;
        font-size: 12px !important;
        margin-right: 10px !important;
    }
    
    /* Stats section mobile layout */
    #autoListProductTypes div[style*="display: flex; align-items: center; gap: 20px"] {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: flex-start !important;
    }
    
    /* Card header mobile optimization */
    .card-header {
        padding: 15px 10px !important;
        text-align: center;
    }
    
    .import-products-card {
        margin: 10px 5px !important;
        padding: 15px 10px !important;
    }
    
    /* Import interface mobile spacing */
    .import-step {
        padding: 15px 10px !important;
    }
    
    /* Professional product search mobile optimization */
    .import-sources {
        padding: 20px 16px 24px 16px !important;
        margin-bottom: 24px !important;
        border-radius: 8px !important;
    }
    
    .source-card {
        padding: 24px 0 20px 0 !important;
        margin-bottom: 0 !important;
    }
    
    .source-card h4 {
        font-size: 1.05rem !important;
        margin-bottom: 6px !important;
    }
    
    .source-card p {
        font-size: 0.85rem !important;
        margin-bottom: 16px !important;
    }
    
    .source-card input[type="text"],
    .source-card textarea {
        padding: 12px 14px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        border-radius: 6px !important;
    }
    
    .source-card button {
        width: 100% !important;
        max-width: none !important;
        padding: 14px 20px !important;
        font-size: 0.9rem !important;
        margin-top: 4px !important;
    }
    
    .source-card img {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Mobile no-image placeholder */
    .product-thumbnail .no-image {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.65rem !important;
    }
    
    /* Button mobile optimization */
    .import-button, .import-button2, .import-button3, .import-button4,
    .import-button5, .import-button6, .import-button7, .import-button8 {
        width: 100% !important;
        max-width: 300px !important;
        margin: 10px auto !important;
        display: block !important;
        font-size: 14px !important;
        padding: 12px 16px !important;
    }
}

/* ========== LOADING GLOW EFFECT FOR BUTTONS ========== */
.loading-glow {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.8;
}

.loading-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ========== AUTOLIST BILLING FEATURE STYLING ========== */
.autolist-feature {
    position: relative;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 6px;
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.autolist-feature i {
    color: #667eea;
    margin-right: 8px;
}

.autolist-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 6px;
    z-index: -1;
}

/* ========== MESHFEED BONUS CREDITS BILLING FEATURE STYLING ========== */
.meshfeed-bonus-feature {
    position: relative;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 6px;
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.meshfeed-bonus-feature i {
    color: #667eea;
    margin-right: 8px;
}

.meshfeed-bonus-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 6px;
    z-index: -1;
}

/* Premium Overlay Styles */
.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
    filter: none !important;
}

.premium-overlay-content {
    text-align: center;
    padding: 30px;
    
    filter: none !important;
    backdrop-filter: none !important;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.premium-overlay-content h3 {
    color: #129ed9;
    margin-bottom: 10px;
    font-size: 1.4em;
    font-weight: 600;
}

.premium-overlay-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.premium-overlay-btn {
    background: linear-gradient(135deg, #129ed9, #0d7aa3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.premium-overlay-btn:hover {
    background: linear-gradient(135deg, #0d7aa3, #0a5f80);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(18, 158, 217, 0.3);
}

/* Specific targeting for insights content */
.insights-cards-row:has(.premium-overlay) {
    min-height: 150px;
}

#benchmarkContainer:has(.premium-overlay) {
    min-height: 200px;
}

#insightsChartContainer:has(.premium-overlay) {
    min-height: 300px;
}

/* Animation for smooth overlay appearance */
.premium-overlay {
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Benchmark tier overlay styling */
.benchmark-tier-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
    backdrop-filter: blur(3px) !important;
}

.tier-upgrade-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    filter: none !important;
    backdrop-filter: none !important;
}

.tier-upgrade-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.tier-upgrade-content h4 {
    color: #4f46e5;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.tier-upgrade-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.tier-upgrade-content button {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.tier-upgrade-content button:hover {
    background: #4338ca;
}

/* ========== HIDE SUBSCRIPTION CARDS ========== */
/* Temporarily hide specific subscription cards in billing */
.feature-card[data-feature="ad-campaigns"],
.feature-card[data-feature="insights"], 
.feature-card[data-feature="chatbot"] {
    display: none !important;
}

/* ========== MOBILE OPTIMIZATIONS FOR MESHADS & MESHINSIGHTS ========== */

/* MeshAds (Campaigns Interface) Mobile Styles */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Campaign content sections */
    #campaignsInterface .campaign-content {
        padding: 15px !important;
        margin: 0 10px !important;
    }
    
    /* Campaign navigation cards */
    #campaignsInterface .feed-nav-cards {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #campaignsInterface .feed-card {
        min-width: unset !important;
        width: 100% !important;
        padding: 15px !important;
    }
    
    /* Campaign selector */
    #campaignsInterface .campaign-selector {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    #campaignsInterface .campaign-selector select {
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    /* Product table in campaigns */
    #campaignsInterface #productTable {
        font-size: 12px !important;
    }
    
    #campaignsInterface #productTable th,
    #campaignsInterface #productTable td {
        padding: 8px 4px !important;
        word-break: break-word !important;
    }
    
    /* Range buttons */
    #campaignsInterface .range-buttons-campaigns {
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: center !important;
    }
    
    #campaignsInterface .range-buttons-campaigns button {
        font-size: 12px !important;
        padding: 8px 12px !important;
        min-width: 60px !important;
    }
}

/* MeshInsights Interface Mobile Styles */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Insights cards row */
    #insightsInterface .insights-cards-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 10px !important;
        padding: 0 10px !important;
    }
    
    /* Individual insights cards */
    #insightsInterface .insights-card {
        padding: 12px !important;
        min-height: 80px !important;
    }
    
    #insightsInterface .insights-card-title {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }
    
    #insightsInterface .insights-card-value {
        font-size: 16px !important;
    }
    
    /* Campaign selector in insights */
    #insightsInterface .campaign-selector {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    #insightsInterface .campaign-selector select {
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    /* Range buttons for insights */
    #insightsInterface .range-buttons-insights {
        flex-wrap: wrap !important;
        gap: 5px !important;
        justify-content: center !important;
    }
    
    #insightsInterface .range-buttons-insights button {
        font-size: 12px !important;
        padding: 8px 12px !important;
        min-width: 60px !important;
    }
    
    /* Charts container */
    #insightsInterface #charts-grid-container {
        padding: 10px !important;
    }
    
    /* Insights tab navigation */
    #insightsInterface .feed-nav-cards {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #insightsInterface .feed-card {
        width: 100% !important;
        min-width: unset !important;
        padding: 12px !important;
    }
    
    /* Benchmark cards */
    #insightsInterface .benchmark-card {
        margin: 10px 0 !important;
        padding: 15px !important;
    }
    
    #insightsInterface .benchmark-metrics {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #insightsInterface .benchmark-metric {
        text-align: center !important;
    }
}

/* Mobile optimizations for both interfaces */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* Premium overlay responsive */
    .premium-overlay-content {
        max-width: 90% !important;
        padding: 20px !important;
        margin: 0 10px !important;
    }
    
    .premium-overlay-content h3 {
        font-size: 1.1em !important;
    }
    
    .premium-overlay-content p {
        font-size: 13px !important;
    }
    
    /* Tier upgrade overlay responsive */
    .tier-upgrade-content {
        max-width: 90% !important;
        padding: 25px !important;
        margin: 0 10px !important;
    }
    
    .tier-upgrade-content h3 {
        font-size: 1.3em !important;
    }
    
    .tier-upgrade-content h4 {
        font-size: 1em !important;
    }
}

/* Edit button glow effect - matching import button animation */
.edit-button {
    position: relative;
    overflow: hidden;
}

.edit-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.edit-button.loading::after {
    opacity: 1;
    animation: glowFlow 1s ease-out infinite;
}

/* Hide all platform tabs for MeshList product search */
.filter-cards-container .filter-card {
    display: none;
}

/* ========== MODERN SETTINGS INTERFACE STYLING ========== */

/* Modern Settings Cards */
.modern-settings-card,
.bulk-edit-section,
.bulk-copy-section {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  margin: 20px auto !important;
  max-width: 800px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

/* Ensure first child header has proper border radius */
.modern-settings-card > .modern-card-header:first-child,
.bulk-edit-section > .modern-card-header:first-child,
.bulk-copy-section > .modern-card-header:first-child,
.modern-card > .modern-card-header:first-child {
  border-top-left-radius: 11px !important;
  border-top-right-radius: 11px !important;
  margin-top: 0 !important;
}

.modern-settings-card:hover,
.bulk-edit-section:hover,
.bulk-copy-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Modern Card Header */
.modern-card-header {
  background: linear-gradient(135deg, #f8fafd 0%, #f1f7fb 100%) !important;
  border-bottom: 1px solid #e1e6f0 !important;
  padding: 20px !important;
  margin-bottom: 0px !important;
  border-top-left-radius: 12px !important;
  border-top-right-radius: 12px !important;
}

.header-content {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
}

.header-icon {
  color: #129ed9 !important;
  font-size: 20px !important;
  margin-top: 2px !important;
  min-width: 20px !important;
}

.header-text h3 {
  margin: 0 0 6px 0 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  font-family: 'Inter Variable', sans-serif !important;
  line-height: 1.3 !important;
}

.header-text p {
  margin: 0 !important;
  font-size: 14px !important;
  color: #64748b !important;
  line-height: 1.4 !important;
  font-family: 'Inter Variable', sans-serif !important;
}

/* Modern Card Content */
.modern-card-content {
  padding: 24px !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Remove padding from sections when they have modern card headers as first child */
.bulk-edit-section > .modern-card-header:first-child,
.bulk-copy-section > .modern-card-header:first-child,
.modern-settings-card > .modern-card-header:first-child {
  margin-top: 0 !important;
}

/* Ensure parent containers with modern-card-header have no padding */
.bulk-edit-section:has(.modern-card-header),
.bulk-copy-section:has(.modern-card-header),
.modern-settings-card:has(.modern-card-header) {
  padding: 0 !important;
}

/* Fallback for browsers without :has() support */
.modern-settings-card.has-header,
.bulk-edit-section.has-header,
.bulk-copy-section.has-header {
  padding: 0 !important;
}

/* Also apply to modern-card class */
.modern-card:has(.modern-card-header) {
  padding: 0 !important;
}

.modern-card.has-header {
  padding: 0 !important;
}

/* Ensure modern-image-processing container cards have no padding */
.modern-image-processing .modern-settings-card {
  padding: 0 !important;
}

/* Ultra-specific overrides for image processing cards */
.modern-image-processing > .modern-settings-card#editStoreImageProcessingPreview,
.modern-image-processing > .modern-settings-card#imageProcessingPreview {
  padding: 0 !important;
  margin: 0 auto 20px auto !important;
}

div.modern-image-processing .modern-settings-card {
  padding: 0 !important;
}

/* Nuclear option - target by ID with maximum specificity */
#editStoreImageProcessingPreview {
  padding: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#imageProcessingPreview {
  padding: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Also ensure library interface cards with headers have no padding */
#libraryInterface .modern-card:has(.modern-card-header) {
  padding: 0 !important;
}

/* Global override: All modern-card with headers should have no padding */
.modern-card:has(> .modern-card-header:first-child) {
  padding: 0 !important;
}

/* Hide feed navigation cards in simple mode */
#meshfeed-simple-interface ~ .feed-nav-cards,
.meshfeed-mode-interface:not(.hidden) ~ .hidden + .feed-step .feed-nav-cards {
  display: none !important;
}

/* Show feed navigation cards only in advanced mode */
#meshfeed-advanced-interface:not(.hidden) ~ .feed-step .feed-nav-cards {
  display: flex !important;
}

/* Settings Grid */
.settings-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  margin-bottom: 24px !important;
}

/* Setting Groups */
.setting-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.setting-label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  margin: 0 !important;
  font-family: 'Inter Variable', sans-serif !important;
}

/* Modern Form Controls */
.modern-select,
.modern-input,
.modern-textarea {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 1.5px solid #e1e6f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-family: 'Inter Variable', sans-serif !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.modern-select {
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 12px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

.modern-select:hover,
.modern-input:hover,
.modern-textarea:hover {
  border-color: #129ed9 !important;
}

.modern-select:focus,
.modern-input:focus,
.modern-textarea:focus {
  outline: none !important;
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
}

.modern-textarea {
  resize: vertical !important;
  min-height: 100px !important;
  font-family: 'Inter Variable', sans-serif !important;
  line-height: 1.5 !important;
}

/* Modern Toggle - CRITICAL FIX: Force all interaction elements to be clickable */
.toggle-group {
  margin: 20px 0 !important;
  position: relative !important;
  z-index: 100 !important;
  pointer-events: auto !important;
}

.modern-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  cursor: pointer !important;
  font-family: 'Inter Variable', sans-serif !important;
  position: relative !important;
  z-index: 101 !important;
  pointer-events: auto !important;
  flex-direction: row !important;
  width: fit-content !important;
}

.modern-toggle input[type="checkbox"] {
  display: none !important;
  pointer-events: auto !important;
}

.toggle-slider {
  position: relative !important;
  width: 48px !important;
  height: 24px !important;
  background: #e5e7eb !important;
  border-radius: 24px !important;
  transition: background 0.2s ease !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  z-index: 102 !important;
  flex-shrink: 0 !important;
}

.toggle-slider:before {
  content: "" !important;
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  width: 20px !important;
  height: 20px !important;
  background: #fff !important;
  border-radius: 50% !important;
  transition: transform 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  pointer-events: none !important;
}

.modern-toggle input[type="checkbox"]:checked ~ .toggle-slider {
  background: #129ed9 !important;
}

.modern-toggle input[type="checkbox"]:checked ~ .toggle-slider:before {
  transform: translateX(24px) !important;
}

.toggle-label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none !important;
  position: relative !important;
  z-index: 103 !important;
  white-space: nowrap !important;
}

/* Toggle Switch (for video settings and other simple toggles) */
.toggle-switch {
  display: inline-block !important;
  position: relative !important;
  width: 48px !important;
  height: 24px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.toggle-switch input[type="checkbox"] {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
}

.toggle-switch .toggle-slider {
  position: absolute !important;
  cursor: pointer !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: #e5e7eb !important;
  border-radius: 24px !important;
  transition: background 0.2s ease !important;
}

.toggle-switch .toggle-slider:hover {
  background: #d1d5db !important;
}

.toggle-switch .toggle-slider:before {
  content: "" !important;
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  width: 20px !important;
  height: 20px !important;
  background: #fff !important;
  border-radius: 50% !important;
  transition: transform 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  pointer-events: none !important;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
  background: #667eea !important;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider:hover {
  background: #5568d3 !important;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider:before {
  transform: translateX(24px) !important;
}

/* Ensure video settings cards don't block toggles */
.image-controls-section {
  position: relative !important;
  z-index: 1 !important;
}

.image-controls-section > div {
  position: relative !important;
  z-index: 1 !important;
}

/* Modern Checkbox */
.modern-checkbox {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  font-family: 'Inter Variable', sans-serif !important;
}

.modern-checkbox input[type="checkbox"] {
  display: none !important;
}

.checkbox-mark {
  width: 20px !important;
  height: 20px !important;
  border: 2px solid #e1e6f0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-mark {
  background: #129ed9 !important;
  border-color: #129ed9 !important;
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-mark:after {
  content: "✓" !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: bold !important;
}

.checkbox-label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
}

/* Product Selection Checkboxes - Make them larger */
.import-product-checkbox,
.store-product-checkbox {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
}

/* Card Actions */
.card-actions {
  display: flex !important;
  justify-content: flex-end !important;
  padding-top: 20px !important;
  border-top: 1px solid #f1f5f9 !important;
  margin-top: 24px !important;
}

.modern-save-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 12px 20px !important;
  background: #129ed9 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-family: 'Inter Variable', sans-serif !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 4px rgba(18, 158, 217, 0.2) !important;
}

.modern-save-btn:hover {
  background: #0f8bb8 !important;
  box-shadow: 0 4px 8px rgba(18, 158, 217, 0.3) !important;
  transform: translateY(-1px) !important;
}

.modern-save-btn:active {
  transform: translateY(0) !important;
}

.modern-save-btn i {
  font-size: 14px !important;
}

/* Prompt Editor */
.prompt-editor {
  margin: 20px 0 !important;
}

/* Modern Image Processing */
.modern-image-processing {
  margin: 20px 0 !important;
}

/* Product Navigation */
.product-navigation {
  margin: 16px 0 !important;
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 16px !important;
}

.nav-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

.nav-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 12px !important;
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: 'Inter Variable', sans-serif !important;
}

.nav-btn:hover {
  background: #f8fafd !important;
  border-color: #129ed9 !important;
  color: #129ed9 !important;
}

.nav-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.product-indicator {
  text-align: center !important;
  flex: 1 !important;
}

.product-indicator span {
  display: block !important;
  font-family: 'Inter Variable', sans-serif !important;
}

#currentProductName,
#editStoreCurrentProductName {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 2px !important;
}

.counter {
  font-size: 12px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

/* Image Controls Section */
.image-controls-section {
  margin-bottom: 24px !important;
}

.control-group {
  margin-bottom: 20px !important;
}

.control-group:last-child {
  margin-bottom: 0 !important;
}

/* Modern Image Grid */
.modern-image-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 20px !important;
}

/* Hide old tooltip elements */
.tooltip .tooltiptext {
  display: none !important;
}

.tooltip {
  position: static !important;
}

.tooltiptext {
  display: none !important;
  visibility: hidden !important;
}

/* Responsive Design */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr !important;
  }
  
  .nav-controls {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .nav-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  
  .product-indicator {
    order: -1 !important;
  }
}

/* Feed Settings Specific Styling */
.modern-feed-settings {
  margin: 20px 0 !important;
}

.feed-settings-section {
  margin-bottom: 32px !important;
}

.feed-settings-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 20px !important;
  /* add spacing on top */
  margin: 20px 0;
}

.feed-setting-row {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* 24h Sync Special Section */
.sync-feature-card {
  background: linear-gradient(135deg, #f0f7fa 0%, #e6f3f8 100%) !important;
  border: 2px solid #129ed9 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin: 24px 0 !important;
  position: relative !important;
  box-shadow: 0 4px 12px rgba(18, 158, 217, 0.15) !important;
  max-width: 1200px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sync-feature-card:before {
  content: "⚡" !important;
  position: absolute !important;
  top: -12px !important;
  left: 20px !important;
  background: #129ed9 !important;
  color: white !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: bold !important;
}

.sync-feature-content {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  width: 100% !important;
  padding: 0 !important;
}

.sync-feature-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.sync-feature-info h4 {
  margin: 0 0 4px 0 !important;
  color: #129ed9 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.sync-feature-info p {
  margin: 0 !important;
  color: #0f8bb8 !important;
  font-size: 14px !important;
}

.sync-feature-content .modern-toggle {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Modern feed settings container */
.modern-feed-settings-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Feed variant toggles section */
.feed-variants-section {
  margin-top: 32px !important;
}

.variants-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 16px !important;
  margin-top: 16px !important;
}

/* Shipping options section */
.shipping-options-section {
  margin-top: 32px !important;
}

.shipping-options-container {
  margin-top: 16px !important;
}

.shipping-row {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.shipping-row select,
.shipping-row input {
  flex: 1 !important;
  min-width: 0 !important;
}

.remove-shipping-btn {
  background: #ef4444 !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

.remove-shipping-btn:hover {
  background: #dc2626 !important;
}

.add-shipping-btn {
  background: #129ed9 !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  margin-top: 12px !important;
}

.add-shipping-btn:hover {
  background: #0f8bb8 !important;
}

/* Override feed settings container specific styles */
.feed-settings-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.feed-settings-container .settings-row {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Variants grid styling */
.variants-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 16px !important;
  margin-top: 16px !important;
}

/* Additional CSS for better integration with existing feed functionality */
.meshfeed-mode-interface .modern-settings-card {
  margin: 24px auto !important;
  max-width: 900px !important;
  width: 100%;
}

.feed-step .modern-settings-card {
  margin: 24px auto !important;
}

/* Better integration with Simple mode shipping display */
#simpleShippingContainer .shipping-row {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

/* Ensure proper spacing in feed nav cards */
.feed-nav-cards {
  margin-bottom: 32px !important;
}

/* Modern button styling for MeshFeed context */
.meshfeed-mode-interface .modern-save-btn:hover {
  background: #059669 !important;
}

/* Override any existing conflicting styles */
.feed-settings-container.modern-feed-settings-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.feed-settings-container.modern-feed-settings-container .settings-row {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Ensure save buttons in feed settings look consistent */
.feed-settings-section .modern-save-btn {
  background: #10b981 !important;
}

.feed-settings-section .modern-save-btn:hover {
  background: #059669 !important;
}

/* Better visual separation between sections */
.feed-settings-section + .feed-settings-section {
  margin-top: 32px !important;
}

.sync-feature-card + .feed-settings-section {
  margin-top: 32px !important;
}

.feed-settings-section + .sync-feature-card {
  margin-top: 32px !important;
}

/* Ensure proper display for shipping options */
.shipping-options-container .shipping-row {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 16px !important;
  margin-bottom: 12px !important;
}

.shipping-options-container .shipping-row select,
.shipping-options-container .shipping-row input {
  flex: 1 !important;
  min-width: 0 !important;
  padding: 8px 12px !important;
  border: 1.5px solid #e1e6f0 !important;
  border-radius: 6px !important;
  background: #fff !important;
  font-size: 14px !important;
}

/* Ensure product navigation is properly hidden by default */
.product-navigation.hidden {
  display: none !important;
}

/* Better no-images message styling */
.no-images-message {
  text-align: center !important;
  padding: 40px 20px !important;
  color: #64748b !important;
  font-style: italic !important;
  background: #f8fafd !important;
  border-radius: 8px !important;
  border: 1px dashed #e1e6f0 !important;
}

/* Ensure image containers in modern grid look good */
.modern-image-grid .image-container {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  transition: none !important; /* ⚠️ DISABLED - causing flickering */
  contain: layout style paint !important; /* ⚠️ ADDED - isolate rendering for better perf with many images */
}

/* ⚠️ DISABLED - causing page flickering with many images
.modern-image-grid .image-container:hover {
  border-color: #129ed9 !important;
  box-shadow: 0 2px 8px rgba(18, 158, 217, 0.1) !important;
}
*/

.modern-image-grid .image-wrapper {
  position: relative !important;
  width: 100% !important;
  padding-top: 70% !important; /* Slightly smaller aspect ratio */
  background: #f8fafd !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  margin-bottom: 10px !important;
}

.modern-image-grid .image-wrapper img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 4px !important;
}

.modern-image-grid .image-controls {
  display: flex !important;
  justify-content: center !important;
}

/* ========== FIX MESHSTORE SAVE TEMPLATE BUTTON ========== */

/* Override the blue styling for MeshStore save template button to match MeshList clean style */
button[onclick*="onSaveStoreTemplateBtnClick"].modern-save-btn {
  background: #f8f9fa !important;
  color: #374151 !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
}

button[onclick*="onSaveStoreTemplateBtnClick"].modern-save-btn:hover {
  background: #f1f5f9 !important;
  border-color: #129ed9 !important;
  color: #129ed9 !important;
  box-shadow: 0 2px 4px rgba(18, 158, 217, 0.1) !important;
  transform: translateY(-1px) !important;
}

/* ========== FIX GREEN ADD SHIPPING BUTTONS ========== */

/* Make add shipping buttons clean and minimal instead of green */
.modern-save-btn[onclick*="addShippingOption"],
.modern-save-btn[onclick*="addSimpleShippingOption"] {
  background: #f8f9fa !important;
  color: #374151 !important;
  border: 1px solid #e1e6f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.modern-save-btn[onclick*="addShippingOption"]:hover,
.modern-save-btn[onclick*="addSimpleShippingOption"]:hover {
  background: #f1f5f9 !important;
  border-color: #129ed9 !important;
  color: #129ed9 !important;
  box-shadow: 0 2px 4px rgba(18, 158, 217, 0.1) !important;
  transform: translateY(-1px) !important;
}

/* ========== FIX SPACING AND FULL-WIDTH ROW LAYOUT ========== */

/* Make feed settings sections full-width rows with proper spacing */
.modern-settings-card .modern-card-content {
  padding: 32px !important; /* Increased left/right padding */
}

.feed-settings-section {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 24px 0 !important; /* Top/bottom padding only, no left/right */
  margin: 0 !important; /* Remove margin to allow full width */
  width: 100% !important;
  max-width: none !important;
}

.feed-settings-section:not(:last-child) {
  border-bottom: 1px solid #f1f5f9 !important;
}

/* Ensure shipping configuration looks like a proper full-width row */
.feed-settings-section h4 {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
}

.feed-settings-section p {
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
}

/* Shipping options container full width */
.shipping-options-container {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Make variants grid full width too */
.variants-grid,
.feed-settings-grid {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Sync feature card should also be full width but maintain its special styling */
.sync-feature-card {
  margin: 32px 0 !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* Better section spacing for proper row appearance */
.feed-settings-section + .feed-settings-section {
  margin-top: 0 !important;
  padding-top: 32px !important;
}

.sync-feature-card + .feed-settings-section {
  margin-top: 0 !important;
  padding-top: 32px !important;
}

.feed-settings-section + .sync-feature-card {
  margin-top: 32px !important;
}

/* Ensure add shipping buttons are properly aligned */
.add-shipping-wrapper {
  margin-top: 16px !important;
  margin-bottom: 0 !important;
}

/* Override any card-like appearance that might be causing the small card look */
.feed-settings-section {
  box-shadow: none !important;
  background: transparent !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
}

/* Make sure the main settings container doesn't constrain width */
.modern-settings-card {
  max-width: none !important;
  width: 100% !important;
  margin: 24px auto !important;
}

/* Ensure proper full-width appearance in both simple and advanced modes */
.meshfeed-mode-interface .feed-settings-section {
  padding: 24px 0 !important;
  margin: 0 !important;
}

.meshfeed-mode-interface .modern-card-content {
  padding: 32px !important;
}

/* Fix any container constraints */
.modern-card-content > .feed-settings-section:first-child {
  padding-top: 0 !important;
}

.modern-card-content > .feed-settings-section:last-child {
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

/* ========== MODERNIZE RULES SECTION ========== */

/* Rules desktop container for two-column layout */
.rules-desktop-container {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
  margin: 24px 0 !important;
}

.rules-list-panel,
.rule-editor-panel {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 24px !important;
}

.rules-list-container {
  max-height: 600px !important;
  overflow-y: auto !important;
}

.rule-editor-placeholder .placeholder-content {
  text-align: center !important;
  padding: 40px 20px !important;
  color: #64748b !important;
}

.rule-editor-placeholder h4 {
  color: #2d3748 !important;
  font-size: 18px !important;
  margin: 16px 0 8px 0 !important;
}

.rule-editor-placeholder p {
  color: #64748b !important;
  font-size: 14px !important;
  margin: 0 !important;
}

/* Rule form styling */
.rule-form {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.rule-form-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 24px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.rule-form-header h4 {
  color: #2d3748 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 !important;
}

/* Affected products button styling */
.affected-products-btn {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  color: #374151 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.affected-products-btn:hover {
  background: #f1f5f9 !important;
  border-color: #129ed9 !important;
  color: #129ed9 !important;
}

/* Rule condition and action sections */
.rule-condition,
.rule-action,
#elseActionContainer {
  margin-bottom: 24px !important;
  padding: 20px !important;
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
}

.rule-condition label,
.rule-action label,
#elseActionContainer label {
  color: #2d3748 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  margin-bottom: 12px !important;
  display: block !important;
}

/* Rule inputs and selects */
.rule-input,
.rule-select,
.nice-select3 {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  color: #374151 !important;
  width: 100% !important;
  margin-bottom: 12px !important;
}

.rule-input:focus,
.rule-select:focus,
.nice-select3:focus {
  outline: none !important;
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
}

/* Rule buttons */
.rule-buttons-container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 32px !important;
  padding-top: 24px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.rule-action-buttons {
  display: flex !important;
  gap: 12px !important;
}

.delete-rule-button {
  background: #fff !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  border-radius: 6px !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.delete-rule-button:hover {
  background: #fef2f2 !important;
  border-color: #dc2626 !important;
}

.cancel-rule-button {
  background: #f8f9fa !important;
  border: 1px solid #e1e6f0 !important;
  color: #374151 !important;
  border-radius: 6px !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.cancel-rule-button:hover {
  background: #f1f5f9 !important;
  border-color: #129ed9 !important;
  color: #129ed9 !important;
}

/* Rule scope styling */
.rule-scope {
  margin: 24px 0 !important;
  padding: 20px !important;
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
}

.rule-scope strong {
  color: #2d3748 !important;
  font-size: 14px !important;
  display: block !important;
  margin-bottom: 12px !important;
}

.rule-scope label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 8px 0 !important;
  color: #374151 !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

/* ========== FIX PREVIEW STYLING - LESS ALARMING ========== */

/* Make info sections less blue and more neutral */
.info-box2 {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-left: 4px solid #129ed9 !important;
}

.info-box2 i {
  color: #129ed9 !important;
}

/* Preview overview styling */
#previewOverview {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  color: #2d3748 !important;
  font-weight: 500 !important;
}

/* Make missing/validation errors less alarming */
.validation-errors-container {
  background: #fdf4ff !important;
  border: 1px solid #e9d5ff !important;
  color: #6b21a8 !important;
}

.validation-errors-container h3 {
  color: #6b21a8 !important;
}

/* CSV display improvements */
.csv-display {
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
}



/* Make "missing" fields less alarming - use purple instead of red */
.missing-field,
.validation-error {
  color: #7c3aed !important;
  background: #f3f4f6 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* Affected products modal styling */
.affected-products-modal {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.affected-products-modal h3 {
  color: #2d3748 !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 0 16px 0 !important;
}

/* Mobile responsiveness for rules */
@media (max-width: 1024px) {
  .rules-desktop-container {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .rule-buttons-container {
    flex-direction: column !important;
    gap: 16px !important;
    align-items: stretch !important;
  }
  
  .rule-action-buttons {
    justify-content: center !important;
  }
}

/* Compound conditions styling */
#compoundConditionsContainer {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 20px !important;
  margin: 20px 0 !important;
}

#compoundConditionsContainer label {
  color: #2d3748 !important;
  font-weight: 600 !important;
  margin-bottom: 12px !important;
  display: block !important;
}

#compoundLogic {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  margin-bottom: 16px !important;
}

/* Metafield insert wrapper */
.metafield-insert-wrapper {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

.metafield-insert-wrapper input {
  flex: 1 !important;
  margin-bottom: 0 !important;
}

.metafield-insert-wrapper button {
  background: #f8fafd !important;
  border: 1px solid #e1e6f0 !important;
  color: #374151 !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.metafield-insert-wrapper button:hover {
  background: #f1f5f9 !important;
  border-color: #129ed9 !important;
  color: #129ed9 !important;
}

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .feed-nav-cards {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .feed-card {
    max-width: none !important;
    min-width: auto !important;
  }
}

/* Debug helper - temporarily make all feed steps visible for testing */
/* Uncomment this if you want to see all sections at once for debugging:
.feed-step.hidden {
  display: block !important;
  border: 2px dashed #ff6b6b !important;
  margin: 20px 0 !important;
  padding: 20px !important;
}
.feed-step.hidden::before {
  content: "DEBUG: This section is normally hidden. Click the corresponding nav card above to show it properly." !important;
  background: #ff6b6b !important;
  color: white !important;
  padding: 10px !important;
  display: block !important;
  margin: -20px -20px 20px -20px !important;
  font-weight: bold !important;
}
*/


/* ========== TEMPORARY DEBUG: SHOW ALL FEED SECTIONS ========== */
/* Uncomment the rules below if navigation cards are not working */

/*
.feed-step.hidden {
  display: block !important;
  border: 2px dashed #129ed9 !important;
  margin: 20px 0 !important;
  padding: 20px !important;
  background: #f8fafd !important;
  border-radius: 8px !important;
}

.feed-step.hidden::before {
  content: "🔧 DEBUG: This section is normally hidden. The navigation should control this." !important;
  background: #129ed9 !important;
  color: white !important;
  padding: 12px 16px !important;
  display: block !important;
  margin: -20px -20px 20px -20px !important;
  font-weight: 600 !important;
  border-radius: 8px 8px 0 0 !important;
  font-size: 14px !important;
}
*/

/* ========== MESHFEED MODE SWITCHING - MANAGED BY JAVASCRIPT ========== */

/* Default: Hide navigation cards */
.feed-nav-cards {
  display: none;
}

/* Show navigation cards when not hidden (Advanced mode) */
.feed-nav-cards:not(.hidden) {
  display: flex !important;
  gap: 0.75rem;
  margin-bottom: 1rem;
  justify-content: center;
}

/* MeshFeed Mode Switching - Let JavaScript handle visibility */
.feed-step {
  display: none;
}

.feed-step:not(.hidden) {
  display: block !important;
}

/* Make sure simple interface can be visible */
#meshfeed-simple-interface {
  display: block;
}

#meshfeed-simple-interface.hidden {
  display: none !important;
}

/* Make sure advanced interface can be visible */  
#meshfeed-advanced-interface {
  display: block;
}

#meshfeed-advanced-interface.hidden {
  display: none !important;
}

/* Ensure feed steps work properly in Advanced mode */
.feed-step {
  display: none;
}

.feed-step:not(.hidden) {
  display: block !important;
}

/* ========== MODERN PROJECTS & INTEGRATIONS STYLING ========== */

/* Projects Page (storeInterface) Improvements */
.store-content {
  max-width: 800px !important;
  margin: 0 auto !important;
  padding: 20px !important;
  gap: 24px !important;
}

.store-content .modern-card {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  padding: 24px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  transition: none !important;
  overflow: hidden !important;
}

/* Ensure headers in store-content cards match parent border radius */
.store-content .modern-card > .modern-card-header:first-child {
  border-top-left-radius: 11px !important;
  border-top-right-radius: 11px !important;
}

/* Remove hover effects */
.store-content .modern-card:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important; /* Keep same shadow */
}

.store-content .modern-card h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.store-content .modern-card p {
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin-bottom: 20px !important;
}

.form-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

.form-grid .form-group.full-width {
  grid-column: 1 / -1 !important;
}

.form-group label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  margin-bottom: 6px !important;
}

.form-group .input-field {
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-group .input-field:focus {
  border-color: #129ed9 !important;
  box-shadow: 0 0 0 3px rgba(18, 158, 217, 0.1) !important;
  outline: none !important;
}

.input-with-button {
  display: flex !important;
  gap: 12px !important;
  align-items: end !important;
}

.input-with-button .input-field {
  flex: 1 !important;
}

.form-actions {
  display: flex !important;
  justify-content: flex-start !important;
  margin-top: 20px !important;
}

.btn-primary {
  background: #129ed9 !important;
  color: white !important;
  border: none !important;
  padding: 10px 16px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.btn-primary:hover {
  background: #0e86ba !important;
}

/* Store Container Modern Styling */
.store-container {
  margin-top: 20px !important;
}

.project-filter-container {
  background: #f8f9fa !important;
  padding: 16px !important;
  border-radius: 8px !important;
  margin-bottom: 20px !important;
  border: 1px solid #e9ecef !important;
}

.project-filter-container label {
  font-weight: 500 !important;
  color: #495057 !important;
  margin-right: 12px !important;
}

.project-filter-container select {
  padding: 8px 12px !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  background: white !important;
}

/* Project Cards */
.project-group {
  margin-bottom: 32px !important;
}

.project-group-header {
  background: linear-gradient(135deg, #129ed9 0%, #0e86ba 100%) !important;
  color: white !important;
  padding: 12px 20px !important;
  border-radius: 8px 8px 0 0 !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  margin-bottom: 0 !important;
}

.store-card {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-top: none !important;
  padding: 20px !important;
  transition: none !important; /* Remove hover transition */
}

.store-card:last-child {
  border-radius: 0 0 8px 8px !important;
}

/* Remove hover effects */
.store-card:hover {
  background: #fff !important; /* Keep same background */
  border-color: #e1e6f0 !important; /* Keep same border color */
}

.store-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  margin-bottom: 12px !important;
}

.store-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 4px !important;
}

.store-url {
  color: #129ed9 !important;
  font-size: 14px !important;
  text-decoration: none !important;
}

.store-url:hover {
  text-decoration: underline !important;
}

.store-actions {
  display: flex !important;
  gap: 8px !important;
}

.store-actions button {
  padding: 6px 12px !important;
  border: 1px solid #d1d5db !important;
  background: white !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.store-actions button:hover {
  border-color: #129ed9 !important;
  color: #129ed9 !important;
}

.store-actions .delete-btn {
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

.store-actions .delete-btn:hover {
  background: #fef2f2 !important;
  border-color: #dc2626 !important;
}

/* Integrations Page Improvements */
.connections-list {
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 20px !important;
  gap: 24px !important;
  display: grid !important;
  background: transparent !important;
}

.connection-item {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  min-height: auto !important;
}

.connection-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  border-color: #c7d2fe !important;
  transform: translateY(-2px) !important;
}


.connection-header {
  margin-bottom: 20px !important;
}

.connection-branding {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
}

.connection-logo {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

.connection-info h3 {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.3px !important;
}

.connection-info p {
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.status-label {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  padding: 6px 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 16px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.status-label.not-connected {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  border: 1px solid #e5e7eb !important;
}

.status-label.connected {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

.status-label.connected::before {
  content: "✓" !important;
  font-weight: bold !important;
}

.status-label.checking {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.connection-form {
  margin-bottom: 20px !important;
  margin-top: 20px !important;
  width: 100% !important;
}

.connection-form .form-group {
  margin-bottom: 18px !important;
  width: 100% !important;
}

.connection-form .form-group:last-child {
  margin-bottom: 0 !important;
}

.connection-form label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.1px !important;
  width: 100% !important;
}

.connection-form .input-field {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding: 12px 16px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  background: #fff !important;
}

.connection-form .input-field:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  outline: none !important;
}

.connection-form .btn-primary {
  width: 100% !important;
  margin-top: 16px !important;
  justify-content: center !important;
}

/* Info boxes within connection items */
.connection-item .info-box2 {
  margin: 16px 0 !important;
  background: linear-gradient(135deg, #f8fafd 0%, #f0f4f8 100%) !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 8px !important;
  padding: 14px 16px !important;
  font-size: 13px !important;
  max-width: none !important;
  line-height: 1.6 !important;
}

.connection-item .info-box2 i {
  color: #667eea !important;
  margin-right: 6px !important;
}

.connection-item .info-box2 code {
  background: #fff !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  color: #667eea !important;
  border: 1px solid #e1e6f0 !important;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace !important;
}

.connection-item .suggestion-button {
  margin-top: 16px !important;
  width: fit-content !important;
  text-align: center !important;
  padding: 8px 15px !important;
  font-size: 15px !important;
  border-radius: 20px !important;
  background: transparent !important;
  border: none !important;
  color: var(--button-hover) !important;
  cursor: pointer !important;
  transition: background var(--transition-speed), transform var(--transition-speed) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* Mobile responsiveness */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .connections-list {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
  }
  
  .connection-branding {
    flex-direction: column !important;
    text-align: center !important;
  }
  
  .status-label {
    position: static !important;
    display: inline-block !important;
    margin-bottom: 16px !important;
  }
}

/* Make suggestion buttons more subtle */
.suggestion-button {
  background: transparent !important;
  border: 1px solid #e1e6f0 !important;
  color: #64748b !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
  margin: 16px auto !important;
}


/* ===== MODERN UI FOR MESHINSIGHTS & MESHADS INTERFACES ===== */

/* ========== MESHINSIGHTS MODERN UI ========== */

/* Modern Insights Cards */
#insightsInterface .insights-card {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    width: 200px !important;
    min-height: 100px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

#insightsInterface .insights-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-color: #129ed9 !important;
}

#insightsInterface .insights-card-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#insightsInterface .insights-card-value {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #2d3748 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.2 !important;
}

#insightsInterface .insights-value-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#insightsInterface .insights-delta {
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#insightsInterface .insights-delta.positive {
    color: #059669 !important;
    background: #dcfce7 !important;
}

#insightsInterface .insights-delta.negative {
    color: #dc2626 !important;
    background: #fee2e2 !important;
}

/* Modern Insights Cards Row Layout */
#insightsInterface .insights-cards-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 16px !important;
    margin: 24px 0 !important;
    padding: 0 !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Modern Insights Cards2 (Wider Cards) */
#insightsInterface .insights-card2 {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    max-width: 800px !important;
    margin: 20px auto !important;
}

/* Modern Source Labels */
#insightsInterface .insights-source-label {
    background: #f8fafc !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin: 32px 0 20px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Modern Campaign Selector */
#insightsInterface .campaign-selector {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 20px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#insightsInterface .campaign-selector label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 0 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#insightsInterface .campaign-selector select {
    flex: 1 !important;
    padding: 8px 12px !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: #fff !important;
    color: #2d3748 !important;
}

/* Modern Range Buttons */
#insightsInterface .range-buttons-insights {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    margin: 20px 0 !important;
    flex-wrap: wrap !important;
}

#insightsInterface .range-buttons-insights button {
    padding: 8px 16px !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#insightsInterface .range-buttons-insights button:hover,
#insightsInterface .range-buttons-insights button.active-range-btn {
    background: #129ed9 !important;
    color: #fff !important;
    border-color: #129ed9 !important;
}

/* Modern Tab Navigation */
#insightsInterface .feed-nav-cards {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 32px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

#insightsInterface .feed-card {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 120px !important;
    justify-content: center !important;
}

#insightsInterface .feed-card:hover {
    border-color: #129ed9 !important;
    color: #129ed9 !important;
}

#insightsInterface .feed-card.active {
    background: #129ed9 !important;
    color: #fff !important;
    border-color: #129ed9 !important;
}

#insightsInterface .feed-card i {
    font-size: 14px !important;
}

/* Modern Charts Container */
#insightsInterface #charts-grid-container {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin: 24px auto !important;
    max-width: 1600px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Modern Benchmark Cards */
#insightsInterface .benchmark-card {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin: 16px auto !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    max-width: 800px !important;
}

#insightsInterface .benchmark-metrics {
    display: flex !important;
    gap: 24px !important;
    margin-top: 16px !important;
    flex-wrap: wrap !important;
    justify-content: space-around !important;
}

#insightsInterface .benchmark-metric {
    text-align: center !important;
    flex: 1 !important;
    min-width: 120px !important;
}

#insightsInterface .benchmark-metric-value {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #2d3748 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#insightsInterface .benchmark-metric-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-top: 4px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Modern Next Button */
#insightsInterface .next-section-button {
    background: #129ed9 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 32px auto !important;
}

#insightsInterface .next-section-button:hover {
    background: #0e7db8 !important;
    transform: translateY(-1px) !important;
}

/* ========== MESHADS MODERN UI ========== */

/* Modern Performance Cards */
#campaignsInterface .performance-card {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    width: 220px !important;
    min-height: 100px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

#campaignsInterface .performance-card-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 8px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#campaignsInterface .performance-card-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#campaignsInterface .product-name {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #2d3748 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    line-height: 1.3 !important;
}

#campaignsInterface .performance-metric {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #129ed9 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Modern Performance Summary Cards Layout */
#campaignsInterface .performance-summary-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 16px !important;
    margin: 24px auto !important;
    max-width: 1600px !important;
}

/* Modern Campaign Selector */
#campaignsInterface .campaign-selector {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 20px auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 600px !important;
}

#campaignsInterface .campaign-selector label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 0 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#campaignsInterface .campaign-selector select {
    flex: 1 !important;
    padding: 8px 12px !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: #fff !important;
    color: #2d3748 !important;
}

/* Modern Range Buttons */
#campaignsInterface .range-buttons-campaigns {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    margin: 20px 0 !important;
    flex-wrap: wrap !important;
}

#campaignsInterface .range-buttons-campaigns button {
    padding: 8px 16px !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#campaignsInterface .range-buttons-campaigns button:hover,
#campaignsInterface .range-buttons-campaigns button.active {
    background: #129ed9 !important;
    color: #fff !important;
    border-color: #129ed9 !important;
}

/* Modern Tab Navigation */
#campaignsInterface .feed-nav-cards {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 32px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

#campaignsInterface .feed-card {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 120px !important;
    justify-content: center !important;
}

#campaignsInterface .feed-card:hover {
    border-color: #129ed9 !important;
    color: #129ed9 !important;
}

#campaignsInterface .feed-card.active {
    background: #129ed9 !important;
    color: #fff !important;
    border-color: #129ed9 !important;
}

#campaignsInterface .feed-card i {
    font-size: 14px !important;
}

/* Modern Product Performance Section */
#campaignsInterface .product-performance-section {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin: 24px auto !important;
    max-width: 1600px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

#campaignsInterface .product-performance-section h3 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 20px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#campaignsInterface .product-performance-section h4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin: 24px 0 16px 0 !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Modern Performance Table */
#campaignsInterface .product-performance-table-container {
    margin-top: 24px !important;
}

#campaignsInterface .performance-table {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

#campaignsInterface .table-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e1e6f0 !important;
    padding: 12px 0 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#campaignsInterface .table-cell {
    padding: 12px 16px !important;
    text-align: left !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#campaignsInterface .table-cell.sortable {
    cursor: pointer !important;
}

#campaignsInterface .table-cell.sortable:hover {
    background: #f8fafc !important;
}

/* Modern Performance Insights */
#campaignsInterface .performance-insights {
    background: #f8fafc !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-top: 24px !important;
}

#campaignsInterface .performance-insights h4 {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin-bottom: 16px !important;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* ========== MOBILE RESPONSIVENESS ========== */

/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 1800px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
    /* MeshInsights Mobile */
    #insightsInterface .insights-cards-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 12px !important;
        margin: 16px 0 !important;
    }
    
    #insightsInterface .insights-card {
        width: 100% !important;
        padding: 16px !important;
        min-height: 80px !important;
    }
    
    #insightsInterface .insights-card-value {
        font-size: 20px !important;
    }
    
    #insightsInterface .campaign-selector {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    #insightsInterface .campaign-selector select {
        width: 100% !important;
    }
    
    #insightsInterface .range-buttons-insights {
        gap: 6px !important;
    }
    
    #insightsInterface .range-buttons-insights button {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    #insightsInterface .feed-nav-cards {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #insightsInterface .feed-card {
        width: 100% !important;
        min-width: unset !important;
    }
    
    /* MeshAds Mobile */
    #campaignsInterface .performance-summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 12px !important;
        margin: 16px 0 !important;
    }
    
    #campaignsInterface .performance-card {
        width: 100% !important;
        padding: 16px !important;
    }
    
    #campaignsInterface .performance-metric {
        font-size: 18px !important;
    }
    
    #campaignsInterface .campaign-selector {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    #campaignsInterface .campaign-selector select {
        width: 100% !important;
    }
    
    #campaignsInterface .range-buttons-campaigns {
        gap: 6px !important;
    }
    
    #campaignsInterface .range-buttons-campaigns button {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    #campaignsInterface .feed-nav-cards {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    #campaignsInterface .feed-card {
        width: 100% !important;
        min-width: unset !important;
    }
    
    #campaignsInterface .product-performance-section {
        padding: 16px !important;
        margin: 16px 0 !important;
    }
}

/* ===============================
   TRANSLATION FUNCTIONALITY
   =============================== */
.translation-section {
    padding: 20px;
}

.translation-progress {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
}

.progress-bar {
    background-color: #e9ecef;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background-color: #129ed9;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.translation-status {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.modern-settings-card .ai-field-list label {
    display: block;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #e1e6f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-settings-card .ai-field-list label:hover {
    background-color: #f8f9fa;
    border-color: #129ed9;
}

.modern-settings-card .ai-field-list label input[type="checkbox"] {
    margin-right: 10px;
}

/* Loom Video Embed Styles */
.loom-video-container {
  max-width: 1200px !important;
  width: 95% !important;
  margin: 0 auto 32px auto !important;
  padding: 0 20px !important;
}

.video-tutorial-card {
  background: #fff !important;
  border: 1px solid #e1e6f0 !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 0 !important;
}

.video-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
  text-align: center !important;
}

.video-icon {
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f0f9ff !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
}

.video-icon i {
  font-size: 20px !important;
  color: #129ed9 !important;
}

.video-info h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #2d3748 !important;
  margin-bottom: 4px !important;
}

.video-info p {
  color: #64748b !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.video-embed-wrapper {
  position: relative !important;
  width: 100% !important;
  background: #f8fafc !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border: 1px solid #e1e6f0 !important;
}

/* Smaller video styles for integration page */
.smaller-video {
  max-width: 600px !important;
  margin: 0 auto !important;
}

.smaller-video-wrapper {
  max-width: 100% !important;
  height: 300px !important;
}

.smaller-video-wrapper .video-embed-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  padding-bottom: 0 !important;
}

.smaller-video-wrapper .loom-video-iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.video-embed-container {
  position: relative !important;
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 56.25% !important; /* 16:9 widescreen ratio */ 
  background: #000 !important;
}

.loom-video-iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: 8px !important;
}

/* Mobile responsiveness for video */
/* Large screen optimization */
@media (min-width: 1400px) {
  .loom-video-container {
    max-width: 2200px !important;
  }
}

@media (max-width: 1024px) {
  .loom-video-container {
    max-width: 100% !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 768px) {
  .loom-video-container {
    padding: 0 16px !important;
    margin-bottom: 24px !important;
  }
  
  .video-tutorial-card {
    padding: 20px !important;
  }
  
  .video-header {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }
  
  .video-info h3 {
    font-size: 16px !important;
  }
  
  .video-info p {
    font-size: 13px !important;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .loom-video-container {
    padding: 0 12px !important;
  }
  
  .video-tutorial-card {
    padding: 16px !important;
  }
  
  .video-info h3 {
    font-size: 15px !important;
  }
  
  .video-info p {
    font-size: 12px !important;
  }
}

/* ========================================
   Layout Improvements for Better UX
   ======================================== */

/* Make project content wider for better use of screen space */
.store-content {
    width: 95% !important;
    max-width: 1800px !important;
}

/* Make feed settings container wider */
.feed-settings-container {
    max-width: 1800px !important;
    width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Ensure main content uses full available width */
.content-container {
    max-width: none !important;
}

/* Make other key containers wider */
.product-list,
.csv-display,
.imported-list-container,
.bulk-copy-section,
.bulk-edit-section {
    max-width: 1600px !important;
    width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Ensure imported-list-container has proper card styling */
.imported-list-container.modern-settings-card {
    background: #fff !important;
    border: 1px solid #e1e6f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.imported-list-container.modern-settings-card > .modern-card-header:first-child {
    border-top-left-radius: 11px !important;
    border-top-right-radius: 11px !important;
}

/* Modern cards should also use more space but match bulk-copy-section */
.modern-card,
.modern-settings-card {
    max-width: 1200px !important;
    width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* UNIVERSAL FIX: Remove all padding from cards that have modern-card-header */
.modern-card:has(.modern-card-header),
.modern-settings-card:has(.modern-card-header),
.bulk-edit-section:has(.modern-card-header),
.bulk-copy-section:has(.modern-card-header) {
    padding: 0 !important;
}

/* UNIVERSAL FIX: Ensure all card containers have proper border radius and overflow */
.modern-card,
.modern-settings-card,
.bulk-edit-section,
.bulk-copy-section {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* UNIVERSAL FIX: All headers as first child get matching top border radius */
.modern-card > .modern-card-header:first-child,
.modern-settings-card > .modern-card-header:first-child,
.bulk-edit-section > .modern-card-header:first-child,
.bulk-copy-section > .modern-card-header:first-child,
#libraryInterface .modern-card > .modern-card-header:first-child {
    border-top-left-radius: 11px !important;
    border-top-right-radius: 11px !important;
    margin: 0 !important;
}

/* Specific fix for image processing cards in meshlist and meshstore */
#editStoreImageProcessingPreview,
#imageProcessingPreview {
    padding: 0 !important;
    margin: 0 !important;
}

/* Force remove padding with highest specificity */
div#editStoreImageProcessingPreview.modern-settings-card,
div#imageProcessingPreview.modern-settings-card {
    padding: 0 !important;
}

/* Ensure import-step containers don't add padding */
.import-step .modern-settings-card,
.import-step .modern-image-processing .modern-settings-card {
    padding: 0 !important;
}

/* Additional overrides for image processing */
.import-step#edit-step-images .modern-settings-card,
.import-step#step-images .modern-settings-card {
    padding: 0 !important;
    margin-top: 0 !important;
}

.modern-image-processing #editStoreImageProcessingPreview,
.modern-image-processing #imageProcessingPreview {
    padding: 0 !important;
}

/* Improve connections grid for medium screens */
@media (max-width: 1024px) {
    .connections-list {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 16px !important;
    }
    
    .store-content {
        width: 98% !important;
        padding: 16px !important;
    }
}

/* Small screen optimizations */
@media (max-width: 480px) {
    .connections-list {
        padding: 12px !important;
        gap: 16px !important;
    }
    
    .store-content {
        width: 100% !important;
        padding: 12px !important;
    }
}

/* No products message styling */
.no-products-message {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    margin: 20px 0;
    font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hide Amazon and Temu cards in product import section */
.source-card[data-source="amazon"] {
    display: none !important;
}

.source-card:has(img[alt="Temu"]) {
    display: none !important;
}


/* center justify shopify-fetch-button */
.shopify-fetch-button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* ===============================================
   LIBRARY STYLES
   =============================================== */

.library-content {
    padding: 20px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* Library card should be full width */
#libraryInterface .modern-card {
    max-width: 100% !important;
    width: 100% !important;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 0;
}

.library-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.library-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.library-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
    overflow: hidden;
}

.library-card-media img,
.library-card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.library-card-media video {
    cursor: pointer;
}

.media-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    opacity: 0.8;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.library-card-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.library-card-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.media-type-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-model-badge {
    padding: 4px 12px;
    background: #f0f0f0;
    color: #666;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.media-prompt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-timestamp {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.library-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-download,
.btn-view {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-view {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-view:hover {
    background: #667eea;
    color: white;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .library-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .library-content {
        padding: 10px;
        max-width: 100%;
    }
    
    #libraryInterface .modern-card {
        margin: 0 !important;
    }
    
    #libraryInterface .modern-card-content {
        padding: 16px !important;
    }
    
    .library-card-info {
        padding: 12px;
    }
}

/* Media viewer modal styling */
.media-viewer-popup {
    max-width: 800px !important;
}

.media-viewer-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Center modal considering sidebar on desktop */
@media (min-width: 769px) {
    .swal2-container.swal2-center {
        padding-left: 120px !important; /* Half of sidebar width (240px) to center content area */
    }
}

/* Mobile - no sidebar offset needed */
@media (max-width: 768px) {
    .media-viewer-popup {
        max-width: 95% !important;
    }
    
    .swal2-container.swal2-center {
        padding-left: 0 !important;
    }
    
    /* Make video/image settings cards stack on mobile */
    .image-controls-section > div[style*="max-width: 900px"] {
        max-width: 100% !important;
        padding: 16px !important;
    }
    
    .image-controls-section > div[style*="grid-template-columns"] > div {
        grid-template-columns: 1fr !important;
    }
}