/*
Theme Name:   Trendsform
Theme URI:       Enter Your URL
Description:      Trendsform Theme
Author:             Trendsform
Author URI:      https://trendsform.io
Template:         sinatra
Version:            1.0.0
Text Domain:    Trensform
*/

/* Container for the members area and trends database */


body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: block;
    justify-content: center;
}


.members-area {
    display: flex;
    min-height: 100vh; /* Full viewport height */
}

/* Left Sidebar Panel */

.logo {

    margin-bottom: 20px;
    width: 150px;
    height: 40px;
    padding: 10px 10px;

}

.members-sidebar {
    width: 200px;
    background-color: white;
    color: black;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    height: 100vh; /* Full height sidebar */
    position: fixed;
}

/* Sidebar Menu Styling */
.sidebar-menu ul {
    list-style: none;
    padding: 0;
}

.sidebar-menu ul li {
    margin-bottom: 20px;
}

.sidebar-menu ul li a {
    color: #344054; 
    text-decoration: none;
    font-weight: bold;
    display: flex; /* Flexbox to align icon, text, and arrow */
    align-items: center; /* Vertically center everything */
    justify-content: space-between; /* Add space between text and arrow */
    padding: 10px 15px;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease; /* Background-color included to fade on hover */
    position: relative;
    background: none; /* Remove any background on hover */
}

/* Ensure left alignment for icon and text */
.sidebar-menu ul li a .menu-text {
    display: flex;
    align-items: center;
    
}

.sidebar-menu ul li a:hover {
    color: #344054;
    background-color: #f4f4f9;
}

.sidebar-menu ul li a i {
    margin-right: 10px;
    font-size: 18px; /* Icon size */
    vertical-align: middle;
}

/* Icon styling for custom SVG */
.menu-icon {
    margin-right: 10px;
    width: 24px; /* Adjust width */
    height: 24px; /* Adjust height */
    vertical-align: middle;
    color: #344054; 
    /*filter: invert(40%) sepia(83%) saturate(3308%) hue-rotate(167deg) brightness(99%) contrast(101%);*/
    transition: filter 0.3s ease; /* Smooth transition effect */
}

/* Hover effect for both icon and text */
.sidebar-menu ul li a:hover .menu-icon {
    
    /*filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);*/
    /*filter: invert(40%) sepia(83%) saturate(3308%) hue-rotate(167deg) brightness(99%) contrast(101%);*/
    color: #4f46e5;
}

.sidebar-menu ul li.active .menu-icon {
    
    filter: invert(23%) sepia(97%) saturate(7472%) hue-rotate(242deg) brightness(95%) contrast(101%);

}


/* Styling for Active Link (Current Page) */
.sidebar-menu ul li.active a {
    color: #4f46e5;
    font-weight: bold;
    /*cursor: default; */
    /*pointer-events: none;  */
    position: relative;
    background-color: #ecf3ff;
}

.sidebar-menu ul li.active a:after {
    content: '';
    position: absolute;
    right: 15px; /* Ensure the arrow is aligned to the right */
    /*border: solid white;*/
    border: solid #4f46e5;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 5px;
    transform: rotate(135deg) translateX(-10px) translateY(-10px); /* Left-pointing arrow with added spacing */
}

/* For custom hover and active colors */
/*.sidebar-menu ul li.active a,*/
/*.sidebar-menu ul li a:hover {*/
/*    color: black;*/
/*}*/

/* Right Content Area */
.members-content {
    margin-left: 200px; /* Leave space for the sidebar */
    padding: 0;
    width: calc(100% - 200px);
    background-color: #f5f7fa;
    /*min-height: 100vh;*/
    min-height: 100%;
    box-sizing: border-box;
}

.content-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
}

.api-credit-usage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px;
    background: #e6f7ff;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 10px;
}

.api-credit-usage .credit-label {
    /*margin-right: 15px;*/
    font-weight: bold;
    color: #0073aa;
    position: relative;
}

.credit-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.api-credit-usage .credit-title {
    font-weight: bold;
    color: #000; 
    white-space: nowrap;
    margin-right: 8px;
}

.credit-label:not(:first-child)::before {
  content: '|';
  color: #999;
  margin-right: 8px;
  margin-left: 8px;
}

/*.api-credit-usage .credit-label:not(:first-of-type)::before {*/
/*    content: '|';*/
/*    color: #999;*/
/*    margin: 0 8px;*/
/*}*/

/*.api-credit-usage .credit-label::before {*/
/*    content: '|';*/
/*    color: #999;*/
    /*margin-right: 8px;*/
    /*position: absolute;*/
    /*left: -10px;*/
/*}*/

/*.api-credit-usage .credit-label::before {*/
/*    content: '|';*/
/*    margin: 0 6px;*/
/*    color: #999;*/
/*}*/

/*.api-credit-usage .credit-label:first-child::before {*/
/*    content: '';*/
/*    margin: 0;*/
/*}*/

/*.api-credit-usage .credit-label:first-child::after {*/
/*    content: '';*/
/*    margin: 0;*/
/*}*/

.header-title {
    font-size: 22px;
    font-weight: bold;
    color: #1f2937;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-button {
    background-color: #4f46e5;
    color: white;
    font-weight: bold;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.header-button:hover {
    background-color: #4338ca;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .members-sidebar {
        width: 200px;
    }

    .members-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
    
    .trends-database {
        flex-direction: column;
    }

    .categories-list, .subcategories-list {
        margin: 0;
        width: 100%;
    }

    .subcategories-list {
        margin-top: 20px;
    }
}

@media screen and (max-width: 600px) {
    .members-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .members-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    .trends-database {
        height: 95%;
        overflow-y: auto;
        flex-grow: 1;
    }
    
}




/* trends database styles */

.trends-title {
    display: flex;
    
    max-width: 100%;
    margin: 0 20px;
    padding: 10px;
    
}

.trends-database {
    display: flex;
    flex-direction: column; /* This ensures the search bar is on top */
    max-width: 100%;
    height: auto;
    /*height: calc(98vh - 110px);*/
    margin: 0px 20px;
    padding: 0px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    
}

/* Wrapper for search input and autocomplete */
.search-bar {
    position: relative; /* This makes the autocomplete list align relative to the input */
    width: 100%;
    padding: 10px;
}

/* Autocomplete container */
.autocomplete-items {
    position: absolute; /* Align relative to the search-bar */
    top: 100%; /* Position directly below the search input */
    left: 0;
    right: 0;
    border: 0px solid #d4d4d4;
    background-color: #fff;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure it appears above other elements */
    box-sizing: border-box; /* Ensure proper width calculation */
    margin-right: 10px;
    margin-left: 10px;
    border-radius: 5px;
}

/* Autocomplete item */
.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    background-color: #fff;
    display: flex;
    align-items: center;
}


.autocomplete-item span {
    display: flex;
    
    align-items: center; /* Ensure the return symbol stays aligned */
    white-space: nowrap; /* Prevent text from wrapping to the next line */
    width: 100%;
}

/* Ensure proper spacing between the icon and text */
.autocomplete-item img {
    margin-right: 10px; /* Adds space between the chart icon and the text */
}

.autocomplete-item:hover img {
    filter: invert(40%) sepia(83%) saturate(3308%) hue-rotate(167deg) brightness(99%) contrast(101%);
}

.autocomplete-item:hover,
.autocomplete-active {
    background-color: #e5e7eb;
    color: #007bff; /* Change text color to blue */
    font-weight: bold;
}

/* Return symbol */

.return-symbol  {
    padding-left: 15px;
    
}

.return-symbol svg {
    display: none; /* Initially hidden */
    vertical-align: middle; /* Center SVG vertically */
    
}

.autocomplete-active .return-symbol svg {
    display: inline; /* Show the return symbol for active items */
    vertical-align: middle; /* Center SVG vertically */
    
}



/* Featured label */
.featured-label {
    font-size: 12px;
    font-weight: bold;
    margin: 0;
    color: #555;
    padding-left: 15px;
}

/* Magnifying glass icon in search input */
#search-trends {
    background-image: url('https://www.trendsform.io/app/magnifying-glass.svg'); /* Add your icon file here */
    background-position: 10px center;
    background-repeat: no-repeat;
    padding-left: 30px; /* Space for the icon */
    position: relative;
    background-size: 16px 16px; /* Resize the icon to 16x16 */
    
    width: 100%;
    padding: 10px 10px 10px 40px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Highlight the input with blue border when selected (focused) */
#search-trends:focus {
    border-color: #007bff; /* Blue border color */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Optional: Add a blue shadow for emphasis */
    outline: none; /* Remove the default outline */
}



/* Categories and Subcategories Side-by-Side */
.categories-subcategories-container {
    display: flex;
    flex-direction: row; /* Categories and subcategories side by side */
    background-color: #fcfcfe;
    border-top: 1px solid #e5e7eb; /* Top border with custom color */
}

/* Categories List */
.categories-list {
    width: 320px; /* Set a fixed width for the categories */
    overflow-y: auto; /* Add scroll if there are too many categories */
    margin-right: 20px; /* Space between categories and subcategories */
    background-color: #ffffff;
    display: flex;
}

/* Subcategories should align side-by-side */
.subcategories-list {
    flex-grow: 1; /* Allows subcategories to take up the remaining space */
    padding-top: 20px;
    padding-left: 20px;
    display: flex;
    flex-direction: column; /* Ensure items stack vertically inside subcategories */
    background-color: #fcfcfe;
    
}

.categories-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 320px;
    /*max-height: 450px; */
    max-height: calc(100vh - 300px);
    overflow-y: auto; /* Enable scrolling */
    border-right: 1px solid #e0e0e0;
}

.categories-list ul li {
    display: flex;
    align-items: center;
    padding: 25px 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 3px solid transparent; /* Initially transparent border */
    border-bottom: 1px solid #e5e7eb;
}




/* Hover state for category list items */
.categories-list ul li:hover {
    background-color: #fcfcfe; /* Change background color on hover */
    border-left-color: #1d4ed8; /* Left border color on hover */
}

/* Maintain active category background and border even after hover */
.categories-list ul li.active {
    background-color: #fcfcfe; /* Keep the background after hover */
    border-left-color: #1d4ed8; /* Keep left border color after hover */
}

.categories-list ul li span {
    margin-right: 10px; /* Small space between text and bubble */
    font-weight: bold;
}



.categories-list ul li img {
    margin-right: 15px;
    margin-left: 15px;
    width: 40px;
    height: 40px;
    transition: filter 0.3s ease;
    filter: grayscale(100%) brightness(0.7); /* Greyed out with reduced brightness */
}



.categories-list ul li:hover img {
    
    filter: invert(40%) sepia(83%) saturate(3308%) hue-rotate(167deg) brightness(99%) contrast(101%);
}


/* Keep the icon highlighted for active categories */
.categories-list ul li.active img {
    filter: invert(40%) sepia(83%) saturate(3308%) hue-rotate(167deg) brightness(99%) contrast(101%);
}


.categories-list ul li:hover span {
    text-decoration: underline;
}

.categories-list ul li:hover .bubble {
    text-decoration: none;
}


.bubble {
    background-color: #e0e7ff;
    color: #333;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8em;
    margin-left: 0; /* Remove any extra spacing */
    white-space: nowrap; /* Keep the bubble text on one line */
}






.subcategories-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: none; /* Initially hidden */
    grid-template-columns: repeat(2, 1fr); /* Two equal columns when visible */
    grid-gap: 15px; /* Gap between subcategory items */
}

/* Ensure the entire list item works as a clickable link */
.subcategories-list ul li {
    list-style: none;
}

.subcategories-list ul li a {
    display: flex; /* Flex to align the icon, text, and bubble */
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    background-color: #fcfcfe;
    border-radius: 5px;
    text-decoration: none; /* Remove underline from the entire link */
    color: #333; /* Text color */
    transition: background-color 0.3s ease;
    width: 100%; /* Make sure the link takes the full width of the li */
    height: 100%; /* Ensure it takes full height */
}



.subcategories-list ul li img {
    margin-right: 10px;
    width: 24px;
    height: 24px;
    transition: filter 0.3s ease;
}

.subcategories-list ul li:hover img {
    filter: invert(40%) sepia(83%) saturate(3308%) hue-rotate(167deg) brightness(99%) contrast(101%);
}


.subcategories-list ul li a span {
    margin-right: 10px;
    white-space: nowrap;
    font-weight: bold;
}

.subcategories-list ul li a:hover span {
    text-decoration: underline; /* Underline only the text, not the bubble */
}


.subcategories-list ul li a:hover .bubble {
    text-decoration: none; /* Ensure bubble stays unstyled on hover */
}

.pagination {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.pagination a {
    text-decoration: none;
    margin: 0 10px;
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #333;
}

.pagination a:hover {
    background-color: #e0e0e0;
}

.pagination span {
    margin: 0 10px;
    padding: 8px 16px;
}



/* styles for the trend tracking dashboard */

/*.prject-header-track {*/
/*    display: flex;*/
/*    justify-content: space-between; */
/*    align-items: center;*/
/*    margin-bottom: 40px;*/
/*    flex-wrap: nowrap;  */
/*}*/


.project-actions-track {
    display: flex;
    justify-content: flex-start; /* Align buttons to the left */
    gap: 20px; /* Space between the buttons */
    margin-top: 20px; /* Add some spacing from the top */
}

.project-actions-track button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e6f7ff; 
    border: 1px solid #ddd; 
    border-radius: 1px; 
    padding: 10px 20px; 
    font-size: 14px; 
    font-weight: bold;
    color: #007bff; 
    cursor: pointer;
    transition: all 0.3s ease; 
    text-decoration: none; 
}

.project-actions-track button:hover {
    background-color: #eaf1ff; /* Light blue background on hover */
    border-color: #007bff; /* Blue border on hover */
    color: #0056b3; /* Darker blue text on hover */
}

.project-actions-track button .icon {
    margin-right: 8px; /* Add space between icon and text */
    font-size: 16px; /* Slightly larger icon */
}


.btn-create-project:hover {
    background-color: #dff0d8;
    color: #3c763d;
}

.btn-export-csv {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.projects-header-track {
    display: flex;
    justify-content: space-between; /* Keeps keyword on the left and volume/growth on the right */
    align-items: center;
    flex-wrap: nowrap; /* Prevent wrapping within this row */
    padding: 20px;
}

.project-header-track {
    display: flex;
    justify-content: space-between; /* Keeps keyword on the left and volume/growth on the right */
    align-items: center;
    flex-wrap: nowrap; /* Prevent wrapping within this row */
    /*padding: 20px;*/
}

.project-name-track {
    /*padding: 0 10px;*/
    margin: 15px 10px;
    font-size: 20px;
    font-weight: bold;

}


.project-view {
    font-size: 0.8em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #007bff;
    color: white;
    text-align: left;
    width: fit-content;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.3s;
    pointer-events: auto;
}

.project-view:hover {
    background-color: #0056b3;
}

.project-divider {
    border-top: 1px solid #ddd;
    margin: 0;
}

.project-container-track {
    margin: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    min-height: 300px;
}

.project-wrapper-track {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.scroll-button-track {
    background-color: #ccc;
    border: none;
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 2;
}

.scroll-button-track:hover {
    background-color: #007bff;

}

.left-arrow-track {
    left: 10px;
}

.right-arrow-track {
    right: 10px;
}

.no-keywords-track {
    display: inline-block;
    padding: 50px 0;
    margin: 0;
    width: 100%;
    /*height: 300px;*/
    box-sizing: border-box;
    padding-left: 40px; /* To account for left button */
    padding-right: 40px; /* To account for right button */
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
}

.charts-container-track {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 10px;
    gap: 15px;
    flex-wrap: nowrap;
    width: 100%;
    padding-left: 0px; /* To account for left button */
    padding-right: 0px; /* To account for right button */
}

.keyword-link-track {
    display: inline-block;
    text-decoration: none;
    color: inherit; /* Ensure the link does not change the text color */
    border-radius: 1px;
    /*box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);*/
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid transparent;
    transition: border 0.3s ease;
}

.keyword-link-track:hover {
    border: 1px solid #007bff; /* Add a blue border on hover */
    
}

.chart-card-track {
    flex: 0 0 300px; /* Fixed width for each chart card */
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 1px;
    background-color: white;
    text-align: center;
    /*box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);*/
}

.chart-card-track h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.chart-card-header-track {
    /*display: flex;*/
    /*justify-content: space-between; */
    align-items: left;
    justify-content: left;
    margin-bottom: 20px;
    /*flex-wrap: nowrap; */
}

.keyword-name-track {
    /*font-size: 1.2em;*/
    font-size: clamp(1rem, 2vw, 1.2em); /* Dynamically adjusts font size */
    margin-bottom: 10px;
    margin-top: 5px;
    color: #333;
    text-align: left;
    white-space: wrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Show ellipsis if the text is too long */
    flex-shrink: 1; /* Allow the text to shrink if necessary */
    /*max-width: 185px;*/
    width: 100%;
    flex-wrap: wrap;
}

.volume-growth-track {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: right;
    white-space: nowrap; /* Prevent wrapping */
}

.volume-track, .growth-track {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 20px;
}



.chart-card-track canvas {
    height: 150px !important; /* Fix height to prevent unintended resizing */
    max-height: 150px;
}

.stats-track {
    margin-top: 10px;
    font-size: 14px;
}

.projects-heatmap {
    margin: 20px;
    background-color: #181c27;
    /*padding: 20px;*/
    
}

/*search results page*/

#keyword-search-container {
    display: flex;
    margin: 20px;
    padding: 20px;
    justify-content: space-between;
}

#search-result-container {
    margin: 0 20px;
    padding: 0 20px;
    /*border: 1px solid #ddd;*/
    /*border-radius: 10px;*/
    /*background-color: #fff;*/
    /*min-height: 300px;*/
}

#search-keyword-button {
    min-width: 70px;
    padding: 0;
    margin-left: 10px;
}

#search-message {
    display: flex;
    margin: 0 20px;
    padding: 0 20px;
}

