/*
Theme Name:   Trendsform
Theme URI:       Enter Your URL
Description:      Trendsform Theme - single chart
Author:             Trendsform
Author URI:      https://trendsform.io
Template:         sinatra
Version:            1.0.0
Text Domain:    Trensform
*/

.keyword-name-single {

    font-size: clamp(1rem, 2vw, 2em); /* Dynamically adjusts font size */
    margin: 0;
    color: #333;
    text-align: left;
    white-space: wrap; /* Prevent text from wrapping */
    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;
}

.chart-row-single {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    margin-bottom: 40px;
    gap: 20px;
    padding: 0 10px;
}

.chart-card-single {
    background-color: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    /*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: auto !important;
    aspect-ratio: 2;
    /*max-height: 450px;*/
    /*overflow: hidden; /* Prevent overflow if content is too large */
}

.chart-top-header {
    display: flex;
    justify-content: space-between; /* Keeps keyword on the left and volume/growth on the right */
    align-items: center;
    /*margin-bottom: 20px;*/
    gap: 20px;
    padding: 20px;
    flex-wrap: nowrap; /* Prevent wrapping within this row */
}

.chart-container-single {
    /*margin-bottom: 20px;*/
    text-align: center;
    flex-grow: 1;
    /*width: 100%;*/
}

.chart-container-single canvas {
    /*width: 100%; */
    /*height: auto !important; */
    /*max-height:185px;*/
    /*aspect-ratio: 2;*/
}

#filter-form-single {
        display: flex;
        align-items: center;
        gap: 0; /* Space between dropdown and forecast toggle */
        justify-content: flex-start; /* Align elements to the left */
        background-color: #ffffff;
        padding: 8px 15px;
        margin-left:10px;

    }

 .filter-container {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 0; /* Space between the toggle and dropdown */
    }


   /* Timeframe Dropdown */
   
   .timeframe-dropdown-single {
        position: relative;
        display: flex;
        align-items: center;
        height: 40px;
    }
    
 .timeframe-dropdown-single select {
        font-family: Arial, sans-serif;
        font-size: 14px;
        font-weight: bold;
        color: #000;
        background-color: #fff;
        padding: 5px 10px;
        border: 1px solid #ccc;
        border-radius: 0; /* No rounded corners */
        outline: none;
        cursor: pointer;
        position: relative;
        width: 100%;
        height: 40px;
    }

    .timeframe-dropdown-single select:hover {
        border-color: #4e73df;
    }
    
    /* Forecast Toggle */
    .forecast-toggle {
        display: flex;
        align-items: center;
        background-color: rgba(0, 123, 255, 0.05);
        padding: 5px 10px;
        border: 1px solid #ddd;
        gap: 10px; /* Space between elements inside the forecast toggle */
        height: 40px;
    }
    
    .forecast-toggle:hover {
        border-color: #4e73df;
    }

    .forecast-icon {
        font-size: 16px;
        color: #4e73df;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .forecast-label {
        font-family: Arial, sans-serif;
        font-size: 14px;
        font-weight: bold;
        color: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    
    .info-icon {
 
    cursor: pointer;
    border-radius: 50%;
    background-color: #0073aa;
    color: white;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: relative;
    
    }
    
    .info-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;
}
    



    .switch {
        position: relative;
        display: inline-block;
        width: 34px;
        height: 20px;
        margin: 0;
    }

    .switch input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0;
        z-index: -1; /* Ensure it does not interfere with the slider */
    }

    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: .4s;
        border-radius: 20px;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

    input:checked + .slider {
        background-color: #4e73df;
    }

    input:checked + .slider:before {
        transform: translateX(14px);
    }
    
    
    
/* keyword info */

.info-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
    width:100%;
    padding: 0 10px;
}


.info-box {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.info-box h3 {
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 18px;
    /*color: #333;*/
}

.info-box p {
    font-size: 14px;
    color: #555;
}

.divider {
    border: none;
    border-top: 1px solid #e0e0e0; /* Light grey for the divider line */
    margin-bottom: 20px;
    width: 100%; /* Full width */
}

.channel-list {
    list-style: none;
    padding: 0;
}

.channel-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.channel-list li span {
    width: 80px;
    font-size: 14px;
    color: #333;
}


.channel-list .bar {
    flex: 1;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-left: 10px;
}

.channel-list .bar-fill {
    height: 100%;
    background-color: #007bff; /* Blue color */
    border-radius: 5px;
}


/* key indicators */

.key-indicators-section {
    /*font-family: Arial, sans-serif;*/
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    background-color: #fff;
}

.key-indicators-grid {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 20px;
}

.indicator {
    display: flex;
    flex-direction: column;
}

.indicator label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.indicator-options {
    display: flex;
    justify-content: space-between; /* Ensure equal spacing between options */
    align-items: center;
}

.option {
    flex: 1; /* Ensure equal width for all options */
    margin: 0 5px; /* Add spacing between options */
    padding: 2px 15px;
    border-radius: 5px;
    background-color: #f4f4f4;
    color: #666;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #dcdcdc;
    text-align: center;
    cursor: text;
    white-space: nowrap; /* Prevent text from wrapping */
}

.option.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}


/* related keywords */


.related-header {
    /*font-size: 16px;*/
    font-weight: bold;
    margin: 0;
    color: #333;
    width: 100%;
    text-align: left;
    white-space: wrap; /* Prevent text from wrapping */
    overflow: hidden;
    margin-bottom: 20px;

}

#related-keywords {
    max-width: 100%;
    margin: 0 auto;
    margin-bottom: 40px;
    margin-top: 40px;
    gap: 20px;
    padding: 0 10px;
}
.keywords-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: 100%;

}
.keyword-row {
    display: flex;
    /*flex-direction: column;*/
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    justify-content: space-between;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
}
.keyword-info {
    text-align: center;
    margin-bottom: 10px;
}

.keyword-name {
    flex: 3;
    text-align: left;
    max-width: 60%;
}

.keyword-name h3 {
    font-size: 1.2rem;
    margin: 0;
    color: #333;
    text-transform: capitalize;
}

.keyword-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1; /* Occupies less space for chart and growth */
    gap: 10px; /* Adds space between chart and growth */
    max-width: 40%;
}

.keyword-row canvas {
    /*flex: 2;*/
    width: 120px !important; /* Fixed width for consistent size */
    height: 60px !important; /* Fixed height for consistent size */
    /*max-width: 100%; */
    max-width: 120px; /* Prevent stretching */
    max-height: 60px; /* Prevent stretching */
    margin-left: 10px; /* Adds space between the keyword name and chart */
    margin-right: 10px; /* Adds space between the chart and growth info */
    display: block; /* Ensures proper rendering inside the row */
}

.growth-info {
    /*flex: 1;*/
    text-align: left;
}

.growth-percentage {
    font-size: 1.2rem;
    color: #28a745; /* Green for positive growth */
    font-weight: bold;
    padding: 0;
}

#pagination {
    text-align: center;
    margin-top: 20px;
}
#pagination button {
    /*margin: 0 5px;*/
        text-decoration: none;
    margin: 0 10px;
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: #333;
}

#pagination button:hover {
    background-color: #e0e0e0;
}

