/*
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
*/

/* styles for public charts and memeber charts page */


/* public charts */

.filter-dropdowns {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between the dropdowns */
    margin-top: 30px;
    margin-bottom: 30px;
}


.timeframe-dropdown-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}



.timeframe-dropdown {
    position: relative;
    display: inline-block;
    width: 190px; /* Adjust width */
}

.timeframe-dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    margin-top: 5px;
    border-radius: 5px;
    width: 100%;
    padding: 10px;
}

.timeframe-dropdown.open .timeframe-dropdown-content {
    display: block;
}

.timeframe-dropdown-section {
    padding: 10px;
}

.timeframe-dropdown-label {
    font-weight: bold;
    display: flex;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
    
}


.tooltip-icon {
    margin-left: 5px;
    cursor: pointer;
    border-radius: 50%;
    background-color: #0073aa;
    color: white;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 2;
    font-size: 12px;
}

.divider {
    border-top: 1px solid #ddd;
    margin: 5px 0;
}


.timeframe-dropdown-item.locked {
    color: #888;
}


.timeframe-dropdown-current .arrow svg {
    transition: transform 0.3s ease;
}

.timeframe-dropdown.open .arrow svg {
    transform: rotate(180deg); /* Rotates the arrow to point up */
}



.timeframe-dropdown-current {
    padding: 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border 0.3s ease;
    cursor: pointer;
    user-select: none; /* Prevents text selection */
}

.timeframe-dropdown-current:hover {
    border-color: #666;
    
}

.timeframe-dropdown-item {
    background-color: #e0e7ff;
    padding: 8px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    text-align: left;
    cursor: pointer;
    margin-bottom: 10px;
}




.timeframe-dropdown-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}


.timeframe-dropdown-item:hover {
    background-color: #c7d2fe;
    /* border-color: #666; */
}

.timeframe-dropdown-item.selected, .timeframe-dropdown-item.selected a {
    background-color: #0000FF;
    color: white;
}

.timeframe-dropdown-item.selected:hover {
    background-color: #0000FF;
    color: white;
}


.arrow {
    margin-left: 10px;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.popup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 99;
    background-color: white;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-radius: 5px;
}



.popup-background {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 98;
}

.popup.show {
    display: block;
}

.popup-background.show {
    display: block;
}


.popup .close {
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    font-size: 24px;
}

.popup .btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

.popup .btn:hover {
    background-color: #005f8d;
}


.category-dropdown-container {
    position: relative;
    display: inline-block;
}

.category-dropdown {
    position: relative;
    display: inline-block;
    
    width: 250px;
}

.category-current .arrow svg {
    transition: transform 0.3s ease;
}

.category-dropdown.open .arrow svg {
    transform: rotate(180deg); /* Rotates the arrow to point up */
}


.category-current {
    padding: 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border 0.3s ease;
    cursor: pointer;
    user-select: none; /* Prevents text selection */
}

.category-current:hover {
    border-color: #666;
    
}

.category-content {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    margin-top: 5px;
    border-radius: 5px;
    padding: 10px;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
    justify-content: center;
    
    min-width: 500px; /* Adjust to control how items wrap */
    flex-wrap: wrap; /* Ensures that items wrap */
}

.category-dropdown.open .category-content {
    display: flex;
}

.category-item {
    background-color: #e0e7ff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    
    box-sizing: border-box;
}

.category-item.selected, .category-item.selected:hover {
    background-color: #0073aa; /* Highlight selected category */
    color: white;
}

.category-item a {
    text-decoration: none;
    color: inherit;
}

.category-item.selected a {
    color: white; /* Make link white when selected */
}




.category-item:hover {
    background-color: #c7d2fe;
}



/* member charts page */
.breadcrumb {
    display: flex;
    color: #5A5A5A;
    font-weight: bold;
    /*margin-top: 40px;*/
    margin-bottom: 40px;
    padding: 0 20px;
}


.crumblink:hover {
    color: #007bff;
}

.sidebar-menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar-menu ul li a:hover {
    background-color: #4d4dff; /* Highlight color on hover */
}


.charts-subcat {
   
    margin-bottom: 40px;
    padding: 0 20px;
}

/* filter styles */


/* Container Styling */
.filter-container {
    display: flex;
    gap: 20px; /* Space between filters */
    margin-bottom: 40px;
    padding: 0 10px;
}

/* Individual Filter Group Styling */
.filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
}

/* Label Styling */
.filter-group label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px; /* Space between label and dropdown */
}

/* Dropdown Styling */
.filter-group select {
    width: 150px;
    height: 40px;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

.filter-group select option {
    border-radius: 0;
}


/* chart cards */

.chart-page {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}



.keyword-link {
    text-decoration: none;
    color: inherit; /* Ensure the link does not change the text color */
    border-radius: 10px;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
    padding: 0;
    box-sizing: border-box;
    /*flex: 1 1 calc(33.333% - 20px);*/
    max-width: calc(33.333% - 20px);
    flex: 1 1 0;
    max-height: 450px;
    min-width: 340px;
    display: flex;
    /*flex-direction: column;*/
    border: 1px solid transparent;
    transition: border 0.3s ease;
    
    /*overflow: hidden; /* Prevent overflow if content is too large */
}

.keyword-link:hover {
    border: 1px solid #007bff; /* Add a blue border on hover */
    
}



.chart-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    margin-bottom: 40px;
    gap: 20px;
    padding: 0 10px;
}

.chart-card {
    background-color: white;
    border-radius: 10px;
    /*box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);*/
    padding: 20px;
    box-sizing: border-box;
    /*flex: 1 1 calc(33.333% - 20px);*/
    /*max-width: calc(33.333% - 20px);*/
    flex: 1 1 0;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    transition: border 0.3s ease;
    height: 100%;
    max-height: 450px;
    /*overflow: hidden; /* Prevent overflow if content is too large */
}



@media (max-width: 900px) {
    .keyword-link, .chart-card {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
        height: auto; /* Allow height to adjust on smaller screens */
    }
    .chart-container canvas {
    /*width: 100%; */
    /*height: auto !important; */
    width: 100% !important;
    height: 100% !important;
    max-height:240px;
}
}

@media (max-width: 600px) {
    .keyword-link, .chart-card {
        flex: 1 1 100%;
        max-width: 85%;
        height: auto; /* Allow height to adjust on smaller screens */
    }
    .chart-container canvas {
    /*width: 100%; */
    /*height: auto !important; */
    width: 100% !important;
    height: 100% !important;
    max-height:325px;
    }
    .filter-dropdowns, .timeframe-dropdown-current {
    flex: 1 1 calc(50% - 20px);
    max-width: 50%
    justify-content: center;
    gap: 20px; /* Space between the dropdowns */
    
    }
}

.chart-card-header {
    display: flex;
    justify-content: space-between; /* Keeps keyword on the left and volume/growth on the right */
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: nowrap; /* Prevent wrapping within this row */
}

.keyword-name {
    /*font-size: 1.2em;*/
    font-size: clamp(1rem, 2vw, 1.2em); /* Dynamically adjusts font size */
    margin: 0;
    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 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: right;
    white-space: nowrap; /* Prevent wrapping */
}

.volume, .growth {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 20px;
}

.volume-number, .growth-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
    text-align: center; /* Ensure text is left-aligned */
    width: 100%; /* Ensure the text spans the full width of the .growth div */

}

.volume-label, .growth-label {
    font-size: 0.9em;
    color: #666;
    text-align: center; /* Ensure text is left-aligned */
    width: 100%; /* Ensure the text spans the full width of the .growth div */
}

.chart-container {
    margin-bottom: 20px;
    text-align: center;
    flex-grow: 1;
    width: 100%;
    height: 150px;
}

.chart-container canvas {
    /*width: 100%; */
    /*height: auto !important;*/
    width: 100% !important;
    height: 100% !important;
    max-height:185px;
}

.keyword-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.chart-card-bottom {
    position: relative;
    display: flex;
    justify-content: space-between; /* Keeps keyword on the left and volume/growth on the right */
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: nowrap; /* Prevent wrapping within this row */
    
}


.trend-tag {
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #e0e7ff;
    color: #333;
    text-align: left;
    width: fit-content;
    margin: 0;
}

.exploding {
    /*background-color: #ff4d4d;*/
    background-color: #089950;
    color: white;
    text-align: left;
}

.regular {
    /*background-color: #4d94ff;*/
    background-color: #056636;
    color: white;
    text-align: left;
}

.peaked {
    /*background-color: #ffd24d;*/
    background-color: #f23645;
    color: white;
    text-align: left;
}


.track-keyword {
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    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;
}

.track-keyword:hover {
    background-color: #0056b3;
}

.tracked {
    /*background-color: #23c175;*/
    background-color: #4d94ff;
    color: white;
    /*cursor: not-allowed; */
}


/* track keyword */

.project-list {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    width: 160px;
    padding: 10px;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    max-height: 300px; /* Set a maximum height for the project list */
    overflow-y: auto; /* Enable vertical scrolling */
}

.project-option {
    padding: 8px;
    cursor: pointer;
    color: #007bff;
    background-color: #e6f7ff;
    margin-bottom: 10px;
    font-weight: 500;
}

.project-option:hover {
    background-color: #007bff;
    color: white;
}

.new-project {
    color: #007bff;
    font-weight: 500;
}

.new-project:hover {
    background-color: #007bff;
}

.project-option.highlighted {
    background-color: #007bff; /* Light blue background */
    font-weight: bold;
    color: white; /* Darker color to indicate active */
    /*pointer-events: none;*/
    cursor: text;
}



/* member area */


/* Container for the members area */
.members-area {
    display: flex;
    min-height: 100vh;
    
}

/* Left Sidebar Panel */
.members-sidebar {
    width: 100px;
    background-color: #2f3c5b; /* Dark background color for sidebar */
    color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    /*height: 100vh;*/
    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: white;
    text-decoration: none;
    font-weight: bold;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar-menu ul li a:hover {
    background-color: #4d4dff; /* Highlight color on hover */
}

/* Right Content Area */
.members-content {
    margin-left: 250px; /* Leave space for the sidebar */
    padding: 40px;
    width: calc(100% - 250px);
    background-color: #f5f7fa;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .members-sidebar {
        width: 200px;
    }

    .members-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
}

@media screen and (max-width: 600px) {
    .members-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .members-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
}

