/* Global container styles */
/* Default styles for postid zero */
.custom-search-all.postid-zero{
    width: 65%;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Styles for non-zero postid */
.custom-search-all.postid-nonzero,
.search-results-container {
    width: 70%;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    margin-left: calc(15% + (85% - 70%) / 2);
    margin-right: auto;
}

/* Search options styles */
#search-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.search-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.search-button {
    background: transparent;
    color: black;
    border: 2px solid #f5f5f5;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
    margin-right: 10px;
}

.search-button:hover {
    background-color: #f5f5f5;
    border-color: #F08521;
    color: #F08521;
}

/* Specific styles for YouTube and Web search options */
#youtube-options.active #youtube-search-button,
#web-options.active #web-search-button {
    background-color: #f5f5f5;
    border-color: #F08521;
    color: #F08521;
}

#youtube-options.active #youtube-source-number,
#youtube-options.active #video-duration,
#web-options.active #web-source-number {
    border-color: #F08521;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 5px;
}

.filter-select {
    width: auto;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 25px;
    border: 2px solid #f5f5f5;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.filter-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e0e0e0;
}

/* Tooltip styles */
.tooltip {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.select-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Search bar styles */
#custom-search-bar {
    display: flex;
    align-items: center;
    border: 2px solid #F08521;
    border-radius: 25px;
    padding: 5px 10px;
    overflow-y: auto;
    max-height: 200px;
    margin-bottom: 20px;
}

#custom-search-input {
    width: 90%;
    border: none;
    padding: 10px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    border-radius: 25px;
    outline: none;
    overflow-y: auto;
    min-height: 20px;
    max-height: 200px;
    box-sizing: border-box;
}

#custom-search-button {
    width: 10%;
    background-color: #F08521;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-left: 10px;
    padding: 10px;
    transition: background-color 0.3s;
}

#custom-search-button:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

/* YouTube and Web options */
#youtube-options, #web-options {
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.3s;
}

#youtube-options.active, #web-options.active {
    opacity: 1;
}

/* Video card styles */
.video-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-card {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 300px; /* Fixed height */
}

.video-preview {
    flex: 1; /* Takes up half the space */
    position: relative;
}

.video-meta-data {
    flex: 1; /* Takes up half the space */
    display: flex;
    flex-direction: column;
    padding: 15px;
    overflow: hidden;
}

.video-actions {
    display: flex;
    align-items: center; /* This will vertically center the items */
    gap: 5px;
    margin-bottom: 5px;
}

.video-actions a {
    display: flex;
    align-items: center;
    justify-content: center; /* This ensures the content inside the link is centered */
    width: 24px; /* Giving a fixed width */
    height: 24px; /* Giving a fixed height */
}

.video-actions img {
    width: 20px;
    height: 20px;
    object-fit: contain; /* This ensures the image maintains its aspect ratio */
}

.video-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.video-info p {
    margin: 0;
}

.chatwithAI {
    margin-bottom: 0;
}

.chatwithAI button {
    padding: 4px 8px;
    background-color: #fff;
    color: #F08521;
    border: 2px solid #F08521;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 90px; /* Fixed width */
    height: 26px; /* Match height with other action items */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    text-transform: none;
}

.chatwithAI button:hover {
    background-color: #F08521;
    color: #fff;
}

.video-description-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.video-description-wrapper {
    overflow-y: auto;
    max-height: 3.6em; /* Approximately 3 lines of text */
    transition: max-height 0.3s ease;
}

.video-description {
    font-size: 0.9em;
    line-height: 1.2em;
    margin: 0;
    padding-bottom: 20px; /* Space for read-more button */
}

.read-more-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, transparent, white 50%);
    padding-top: 10px;
    text-align: center;
}

.read-more {
    font-size: 0.9em;
    color: #F08521;
    cursor: pointer;
    margin: 0;
    display: inline-block;
}

/* Style for expanded state */
.video-description-container.expanded .video-description-wrapper {
    max-height: 150px; /* Adjust this value as needed */
}

.video-description-container.expanded .video-description {
    padding-bottom: 30px; /* Increased space for show-less button */
}

.video-description-container.expanded .read-more-wrapper {
    background: linear-gradient(to bottom, transparent, white 50%);
    padding-top: 20px;
}

/*copy link button and video2docx button*/
#copy-all-link, #video2docx {
    width: 50%;
    padding: 10px;
    border: 2px solid #F08521; /* Orange border */
    background-color: white;
    color: #F08521; /* Orange text */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
#copy-all-link {
    border-right: 2px solid #F08521;
}

#video2docx {
    border-left: 1px solid #F08521;
}

#copy-all-link:hover, #video2docx:hover {
    background-color: #F08521;
    color: white;
}

/*css for video report content*/

#report-editor {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

#report-editor h1 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
}

#report-editor h2 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #34495e;
}

#report-editor > div {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
}

#overview-section {
    background-color: #e6f3ff;
    border: 1px solid #b3d9ff;
}

#summaries-section {
    background-color: #f0f5f0;
    border: 1px solid #c6e0c6;
}

#summaries-section .video-summary {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 5px;
}

#conclusion-section {
    background-color: #fff0f0;
    border: 1px solid #ffcccc;
}

.word {
    display: inline-block;
    transition: opacity 0.3s ease;
}

/* Common styles for both types of buttons */
.keyword-buttons,
.suggested-question-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* Styles for keyword buttons */
.keyword-buttons {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
}

.keyword-btn {
    display: inline-block;
    padding: 5px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.keyword-btn:hover {
    background-color: #e0e0e0;
}

/* Styles for suggested question buttons */
.suggested-question-buttons {
    flex-direction: column;
    align-items: flex-start;
}

.suggested-question-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    color: #333;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s;
}

.suggested-question-btn:hover {
    background-color: #e0e0e0;
}



/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .keyword-buttons {
        overflow-x: auto;
    }
    
    .suggested-question-buttons {
        flex-direction: column;
    }

    .custom-search-all, .search-results-container {
        width: 95%;
    }

    .video-card {
        flex-direction: column;
        height: auto;
    }
    
    .video-preview {
        flex: 0 0 auto;
        height: 180px;
    }
    
    .video-meta-data {
        padding: 10px;
    }

    #custom-search-bar {
        flex-direction: column;
    }

    #custom-search-input, #custom-search-button {
        width: 100%;
        margin: 5px 0;
    }

    .video-info {
        flex-direction: column;
    }

    .video-actions {
        justify-content: flex-start;
    }


}
