html, body {
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.container {
    display: flex;
    height: calc(100vh - 40px);
    box-sizing: border-box;
    flex-direction: column;
}

.selected-items {
    background-color: #fff;
    box-sizing: border-box;
    flex-shrink: 0;
}

.selected-items-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e0d1f3;
    padding: 5px;
    box-sizing: border-box;
    position: relative;
}

.selected-items-label {
    margin-left: 10px;
    flex-shrink: 0;
}

.search-wrapper {
    flex-grow: 1;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.selected-item-content {
    display: flex;
    gap: 5px;
    padding: 5px;
    height: 120px;
    overflow-x: auto;
}

.selected-item {
    position: relative;
    margin: 5px;
}

.selected-poster {
    width: auto;
    height: 110px;
    object-fit: cover;
    border-radius: 5px;
}

.selected-item-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
}

.close-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    cursor: pointer;
    font-size: 12px;
    background-color: #5B3C88;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 16px;
}

.thumbs-up {
    position: absolute;
    bottom: 0px;
    right: 0px;
    background-color: #684a89;
    color: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.recommendations {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recommendation-content-types {
    display: flex;
    gap: 15px;
    padding: 5px;
    background-color: #e0d1f3;
    justify-content: center;
}

.recommendation-content-list {
    background-color: #fff;
    flex: 1;
    overflow-y: auto;
    box-sizing: border-box;
}

.recommendation-per-type {
    margin-bottom: 20px;
}

.recommendation-title {
    background-color: #684a89;
    color: #fff;
    padding: 5px;
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
}

.items-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    justify-content: space-evenly;
}

.item {
    width: 120px;
    text-align: center;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* padding: 0px 5px; */
}

.poster-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 5px;
    overflow: hidden;
}

.poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    position: relative;
    z-index: 1;
}

.add-as-like {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    cursor: pointer;
    color: #fff;
    font-size: 12px;
    background-color: #684a89;
    padding: 5px;
    border-radius: 5px;
    z-index: 2;
}

.poster-wrapper:hover .poster {
    filter: brightness(0.5);  
}

/* Show the 'Add as like' button only when hovering over the poster */
.poster-wrapper:hover .add-as-like {
    display: block;
}

.score {
    background-color: #ecaf6c;
    color: #684a89;
    font-weight: bold;
    padding: 5px;
    display: inline-block;
    font-size: 12px;
    margin-bottom: 5px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
}

.description-btn {
    margin-top: 5px;
    display: block;
    cursor: pointer;
    color: #684a89;
    font-size: 14px;
    text-decoration: underline;
    z-index: 3;
    position: relative;
}

.details {
    margin-top: 5px;
}

.details .title {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.details .year {
    margin: 0;
    font-size: 12px;
    color: #777;
}

#description-modal {
    display: none;
}

#description-modal,
#description-modal * {
    font-family: 'Nunito', sans-serif !important;
}

.ui-dialog .ui-widget-header {
    color: #684a89 !important;
    background-color: #e0d1f3 !important;
    font-size: 16px !important;
}

.ui-widget-content a {
    color: #684a89 !important;
}

.modal-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
    max-width: 100%;
}

.modal-left {
    flex: 1;
    max-width: 150px;
    padding-right: 15px;
}

.modal-right {
    flex: 3;
    overflow-y: hidden;
    max-width: calc(100% - 150px);
}

#modal-poster {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.modal-year,
.modal-author,
.modal-trailer,
.modal-rating {
    margin-bottom: 10px;
}

.modal-year {
    font-size: 16px;
}

.modal-description {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.modal-author {
    margin-top: 10px;
}

.modal-trailer {
    margin-top: 10px;
}

#suggestions {
    list-style-type: none;
    margin: 0;
    padding: 0;
    background-color: #fff;
    position: absolute;
    left: 0;
    width: 100%;
    z-index: 1000;
    max-height: 30vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#suggestions li {
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
}

#suggestions li:hover {
    background-color: #f0f0f0;
}

.selected-items {
    position: relative;
    overflow: visible;
}

.container {
    overflow: visible;
}

#clear-selected-items {
    width: auto;
    height: 30px;
    object-fit: contain;
    cursor: pointer;
    margin-left: 5px;
    margin-right: 5px;
}


@media (max-width: 768px) {
    .selected-items-title {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .search-wrapper {
        width: 100%;
        margin-right: 0;
    }

    .modal-container {
        flex-direction: column;
    }

    .modal-left,
    .modal-right {
        max-width: 100%;
    }

    .selected-items-title {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .selected-items-label-wrapper,
    .search-wrapper {
        width: 100%;
    }

    .selected-items-label-wrapper {
        justify-content: space-between;
    }

    .selected-items-label {
        margin-left: 0;
    }
}

.cc-window {
    background-color: #8069a7 !important; 
    color: #FFFFFF !important;
    font-family: "Nunito", sans-serif;
}

.cc-btn {
    background-color: #EAB595 !important; 
    color: #684a89 !important; 
    font-family: "Nunito", sans-serif;
    font-weight: bold;
}


.selected-items-label-wrapper {
    display: flex;
    align-items: center; 
    justify-content: space-between;
}


.selected-items-label {
    font-size: 16px; 
}

#clear-selected-items {
    width: auto; 
    height: 30px;
    margin-left: 10px; 
    object-fit: contain;
    cursor: pointer;
}
