/* General reset and styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
font-family: 'Lexend', sans-serif;    
background-color: #f8f8f8;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Logo image styling */
.logo img {
    height: 20px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}
#best-picks-container {
    display: none; /* Default to hidden */
}
/* Header styling */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #ffffff;
    color: #333;
    font-size: 1.5em;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
}

.header .logo {
    font-weight: bold;
}
.modal-title {
	width: 90%;
        color: white;
}
.my-story-btn {
    background-color: #ff9800;
    border: none;
    color: #fff;
    padding: 3px 8px;
    font-size: 0.8em;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.my-story-btn:hover {
    background-color: #e68900;
}

/* Main Content Container */
main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding-top: 10px;
    padding-bottom: 120px; /* Extra padding for fixed carousel and input */
}

/* Adjust main when best picks is collapsed */
body.best-picks-collapsed main {
    padding-top: 5px;
    padding-bottom: 120px;
}

/* Best Picks Section */
.best-picks {
    background-color: #FFF8DA; 
   margin-top:70px;
    padding: 0px;
    margin-bottom: 0px;
    border-bottom: 1px solid #e0e0e0;
   box-shadow: 0 2px 3px 1px rgba(0, 0, 0, 0.04); 
   overflow: visible;
   transition: all 0.3s ease-out;
}

/* Collapse the entire best picks section when collapsed */
body.best-picks-collapsed .best-picks {
    margin-top: 60px;
    margin-bottom: 0px;
    padding: 0px;
    min-height: auto;
}

/* On home page, never collapse best picks content regardless of body class */
body:not(.chat-page).best-picks-collapsed .card-list {
    max-height: 1000px !important;
    opacity: 1 !important;
}

body:not(.chat-page).best-picks-collapsed .best-picks {
    margin-top: 70px !important;
    margin-bottom: 0px !important;
    padding: 0px !important;
}

body:not(.chat-page).best-picks-collapsed #best-picks-section::after {
    height: 20px !important;
}

body.best-picks-collapsed #best-picks-section::after {
    height: 0px;
}

#best-picks-section {
    min-height: fit-content;
    box-sizing: border-box; /* Ensure padding doesn't affect the height */
}
#best-picks-section::after {
    content: '';
    display: block;
    height: 20px; /* Adds exactly 20px of extra space */
    transition: height 0.3s ease-out;
}




.best-picks h2 {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 7px;
    margin-bottom: 7px;
    margin-left: 20px;
    color: #333;
}

.best-picks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding-right: 20px;
    transition: background-color 0.2s ease;
    min-height: 40px;
}

/* Minimize header when collapsed */
body.best-picks-collapsed .best-picks-header {
    min-height: 35px;
    padding: 5px 20px 5px 20px;
}

.best-picks-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.caret-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    color: #666;
}

.caret-icon.collapsed {
    transform: rotate(-90deg);
}

/* Chat2 page specific styling */
.chat-page .best-picks {
    background-color: #2E7D32;
}

.chat-page .best-picks h2 {
    color: #ffffff;
}

.chat-page .best-picks .best-picks-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.chat-page .best-picks .caret-icon {
    color: #ffffff;
}

.chat-page .best-picks p {
    color: #ffffff;
    margin-left: 20px;
}

/* Ensure card text is black on chat2 page */
.chat-page .best-picks .card-item {
    color: #000000;
}

.chat-page .best-picks .product-name {
    color: #000000;
}

.chat-page .best-picks .product-provider {
    color: #000000;
}

.chat-page .best-picks .product-type {
    color: #000000;
}


.card-list {
    display: grid;
    gap: 5px;
    grid-template-columns: 1fr;
}

.card-list {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
}

.card-list.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Responsive card layout */
@media (min-width: 600px) {
    .card-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .card-list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Card item styling */
.card-item {
    position: relative;
    width:95%;
    margin:auto;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Updated shadow */
    transition: box-shadow 0.3s ease; /* Smooth transition for hover effect */
}

.card-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Stronger shadow on hover */
}

.product-type {
    position: absolute;
    top: 0px;
    right: 10px;
    font-size: 0.8em;
    color: #555;
    font-weight: bold;
    background-color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-name {
    margin-top:7px;
    font-weight: bold;
    font-size: 1em;
}

.product-provider {
    font-size: 0.95em;
    color: #555;
    margin-top:-10px;
}

/* My Story Section Styling */
.my-story-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: block;
    overflow: auto;
}

/* My Story Section Content */
#my-story-content {
    font-size: 1.2em;
    line-height: 1.5;
    color: #333;
}

/* Mobile-specific adjustments for My Story section */
@media (max-width: 599px) {
    .my-story-section {
        padding: 10px;
        font-size: 0.9em;
    }
}

.my-story-section h2 {
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
}

/* Chat Section with responsive max-height */
.chat {
    flex: 1;
    padding: 20px;
    background-color: #ffffff;
    overflow-y: auto;
    border-bottom: 1px solid #e0e0e0;
    height: 30vh; 
    display: flex;
    flex-direction: column;
}

/* Expand chat section when best picks is collapsed */
body.best-picks-collapsed .chat {
    height: calc(100vh - 250px) !important;
    max-height: calc(100vh - 250px) !important;
    padding-bottom: 30px !important;
}

/* On home page, don't expand chat when best picks caret is collapsed */
body:not(.chat-page).best-picks-collapsed .chat {
    height: 30vh !important;
    max-height: none !important;
    padding-bottom: 20px !important;
}

/* Responsive adjustments for .chat section */
@media (min-width: 1024px) {
    .chat {
        height: 65vh !important;
        max-height: 65vh;
    }
    
    body.chat-page.best-picks-collapsed .chat {
        height: calc(100vh - 230px) !important;
        max-height: calc(100vh - 230px) !important;
        padding-bottom: 30px !important;
    }
}

@media (min-width: 600px) and (max-width: 1023px) {
    .chat {
        height: 55vh !important;
        max-height: 55vh;
    }
    
    body.chat-page.best-picks-collapsed .chat {
        height: calc(100vh - 240px) !important;
        max-height: calc(100vh - 240px) !important;
        padding-bottom: 30px !important;
    }
}

@media (max-width: 599px) {
    .chat {
        height: 50vh !important;
        max-height: 50vh;
    }
    
    body.chat-page.best-picks-collapsed .chat {
        height: calc(100vh - 260px) !important;
        max-height: calc(100vh - 260px) !important;
        padding-bottom: 30px !important;
    }
    
    /* When carousel is visible on mobile, reduce chat height to prevent overlap */
    .chat.carousel-visible {
        height: 35vh !important;
        max-height: 35vh;
        padding-bottom: 20px;
    }
    
    body.chat-page.best-picks-collapsed .chat.carousel-visible {
        height: calc(100vh - 280px) !important;
        max-height: calc(100vh - 280px) !important;
        padding-bottom: 40px !important;
    }
}

/* Message styling */
.message {
    max-width: 70%;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.4;
    margin: 5px 0;
}

.message.assistant {
    align-self: flex-start;
    color: #000000;
    max-width: 100%;
    text-align: left;
    margin-bottom:5px; 
   border-radius: 8px 8px 8px 0;
line-height: 1.5;
}

.message.user {
    align-self: flex-end;
    background-color: #FFEAD1;
    color: #0c5460;
    text-align: right;
    border-radius: 50px 50px 0 50px;
    margin-left: auto;
    max-width: 70%;
    padding: 10px;
    line-height: 1.4;
    margin: 5px 0;
}

/* Librarian message styling - distinct from regular assistant messages */
.message.librarian {
    align-self: flex-start;
    background-color: #fff3cd;
    border-left: 4px solid #ff9800;
    color: #333;
    max-width: 85%;
    text-align: left;
    margin-bottom: 10px;
    margin-left: 40px;
    border-radius: 8px 8px 8px 0;
    line-height: 1.5;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-style: italic;
}

.message.librarian .message-content {
    display: flex;
    align-items: flex-start;
}

.message.librarian .message-content img {
    filter: sepia(1) hue-rotate(25deg) saturate(2);
}

/* Carousel Section (fixed just above input section) */
.carousel-section {
    position: fixed;
    padding: 10px;
    bottom: 50px; /* Position closer to the input section */
    left: 0;
    width: 100%;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background-color: #f1f1f1;
    border-top: 1px solid #e0e0e0;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    z-index: 999; /* Ensure carousel appears above other elements */
}
/* Carousel Pill Styling */
.carousel-pill {
    padding: 8px 12px;
    background-color: #e0e0e0;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    min-width: 80px;
    scroll-snap-align: start;
    white-space: nowrap;
}

.carousel-pill:hover {
    background-color: #d0d0d0;
}

/* Mobile-specific adjustments for pills */
@media (max-width: 599px) {
    .carousel-section {
        display: flex;
        padding: 8px;
        margin-bottom: 12px;
        gap: 5px;
    }

    .carousel-pill {
        font-size: 0.8em;
        padding: 6px 10px;
        min-width: 70px;
    }
}

/* Input Section (fixed at bottom) */
.input-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    gap: 10px;
}

.input-section input[type="text"] {
    flex: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

@media (max-width: 600px) {
    .input-section input[type="text"] {
        font-size: 0.9em;
    }
}

.input-section button {
    padding: 10px 20px;
    background-color: #ffaf18;
    border: none;
    color: #000000;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.input-section button:hover {
    background-color: #e68900;
}

/* JSON Display Section with scrolling */
.json-display {
    padding: 20px;
    background-color: #f1f1f1;
    border-top: 1px solid #ccc;
    overflow-y: auto;
    max-height: 200px;
}

#modal-product-url {
    color: #FFFFFF;
    text-decoration: none;
}

#modal-product-url:hover {
    text-decoration: none;
}

/* Modal background overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-header {
    background-color: #ff9800; /* Orange banner color */
    height: 20%;
    color: white; /* White text */
    padding: 0; /* Remove padding */
    border-radius: 8px 8px 0 0; /* Rounded top corners */
    text-align: center; /* Center align text */
    font-size: 1.2em; /* Slightly larger font size */
    font-weight: bold;
}

.modal-content {
    position: relative;
    padding: 0; /* Remove padding for full-width banner */
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    background-color: #fff;
    overflow: hidden; /* Ensure the banner doesn't overflow */
}

.modal-content h3 {
    background-color: #ff9800; /* Orange color for the banner */
    color: white;
    margin: 0;
    padding: 15px;
    text-align: center;
    width: 90%; /* Full width of the modal */
    border-radius: 0; /* Remove rounding for the banner */
    box-sizing: border-box; /* Include padding in width calculation */
}

#folder-structure {
    list-style: none; /* Removes bullet points */
    padding-left: 0; /* Removes default indentation */
    margin: 0; /* Ensures no extra margin is applied */
}
.close-modal {
    position: absolute;
    top: -5px; /* Adjust to align with your modal header padding */
    right: 5px; /* Adjust for spacing from the edge */
    color: #000;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10; /* Ensure it stays above other elements */
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
/* Spinner overlay */
.spinner {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner-icon {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

.spinner-text {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
    color: black;
    display: block;
}

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

.modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.apply-now-btn {
    background-color: #ff9800;
    color: white;
    width: 70%;
    text-align:center;
    padding: 15px 40px;
    margin: 0px auto 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
margin-left: auto;
    cursor: pointer;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: 0.3s;
}

#hamburger-menu-items {
    display: none;
    position: absolute;
    top: 60px; /* Adjust based on the header's height */
    right: 10px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 1011; /* Slightly higher than breadcrumbs */

}
#breadcrumbs + ul {
    margin-top: 10px; /* Spacing between breadcrumbs and list */
    padding: 0;
    list-style-type: none; /* Optional: default bullet points */
    margin-left: 20px;
}

#breadcrumbs {
    position: relative; /* Ensures the list follows naturally */
    z-index: 1;
}

ul {
    margin-top: 0; /* Reset default margin */
}

#hamburger-menu-items ul {
    list-style: none;
    margin: 0;
    padding: 10px;
}

#hamburger-menu-items ul li {
    margin: 10px 0;
}

#hamburger-menu-items ul li a {
font-family: Arial, sans-serif;   
font-size: 1em; 
color: black;
text-decoration:none;
 
}
.apply-now-btn:hover {
    background-color: #e68900;
}

@keyframes curtainOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes curtainIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.best-picks {
    animation-duration: 1s; /* Ensure animation timing matches JS */
    animation-fill-mode: both;
}
.assistant-icon {
    height: 15px; /* Adjust to fit next to text */
    width: auto;
    margin-top: 4px;
    margin-right: 5px; /* Space between icon and text */
    vertical-align: text-top; /* Align to the top of the text */
}

.message-content {
    display: inline-flex;
    align-items: baseline; /* Align text and icon properly */
    gap: 5px; /* Additional spacing for clarity */
}
#submit-btn {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#submit-btn img {
    width: 40px; /* Adjust the size as needed */
    height: auto;
}

.modal-header {
    background-color: #ff9800;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.modal-body {
    padding: 20px;
    background-color: #ffffff;
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.orange-line {
    display: block !important;
    visibility: visible !important;
    background-color: #ff9800;
    height: 10px !important;
    width: 100%;
    margin: 10px 0;
}


