/* 24.0 Ricerca conversazionale */
.chat-container {
    background-color: #fff;
    width: 100% !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height:500px;
    margin:auto !important;
    max-height: 750px;
}

#chat-header {
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-size: 36px;
    font-weight: bold; 
}

.sub-chat-header {
    background: #FFD100;
    -webkit-background-clip: text;
    color: transparent;
}

.sub-chat-header-colorless{
    color:#FFD100;
}

.entry-chats-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    overflow: auto;
    align-items: center;
    padding: 10px;
    gap: 10px; /* Spaziatura tra le card */
    scroll-snap-type: x mandatory; /* Scroll snap per fissare le card su posizioni definite */
    margin-left: 10px;
    align-items: stretch;
}

.entry-chat {
    background-color: #FAF8F4;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /*min-height: 220px;*/
    min-width: 160px;
    color: #000000;
    font-weight: 400;
    line-height: 1.2;
}

.entry-chat-icon {
    height: 20px;
    align-self: flex-end;
    background-color: white;
    font-size: 27px;
}

i.entry-chat-icon {
    color: #FFD100;
}

.entry-chat-icon-wrap {
    align-self: flex-end;
    padding: 10px;
    border-radius: 90px;
    background: white;
    width: 50px;
    height: 50px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
}

.chat-box {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    border-top: 1px solid #ccc;
}

.input-area-conver {
    display: flex;
    align-items: center;
    background-color: #FAF8F4;
    border-radius: 30px;
    padding: 10px;
    width: 90%;
    margin: 20px auto;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    max-height: 90px;
}

#user-input-conver {
    flex-grow: 1;
    border: none;
    background-color: transparent;
    font-size: 17px;
    padding: 10px;
    outline: none;
    color: black !important;
    margin-right: 10px;
    margin-bottom: 0px;
    font-weight: 400;
}

#send-btn-conver {
    background-color: #FF6A6A;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    margin: 10px;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    transition: all 0.5s ease;
    padding: 20px !important;
    margin: 0px !important;
}

#send-btn-conver:focus,
#send-btn-conver:hover,
#send-btn-conver:active {
    background-color: #FF6A6A;
}

#send-btn-conver {
  /*  
  background: linear-gradient(
    90deg,
    var(--rainbow-1) 0%,
    var(--rainbow-2) 21.87%,
    var(--rainbow-3) 21.88%,
    var(--rainbow-4) 43.75%,
    var(--rainbow-5) 66.67%,
    var(--rainbow-6) 93.23%
  );*/
  background: #FF6A6A;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 30px;
  cursor: pointer;
}


#send-btn-conver img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    position: absolute;
}

/* Messaggi della chat */
.chat-message {
    margin-bottom: 15px;
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.system {
    justify-content: flex-start;
}

.chat-message .message-content {
    max-width: 85%;
    padding: 10px;
    border-radius: .25rem;
}

.chat-message.user .message-content {
    background-color: #005a70;
    color: white;
    text-align: right;
}

.chat-message.system .message-content {
    background-color: #e9ecef;
}

/* Pallini di caricamento */
.loading-conver {
    display: flex;
    justify-content: flex-start;
    padding: 10px;
}

.dot {
    height: 10px;
    width: 10px;
    margin: 5px;
    border-radius: 50%;
    background-color: #FFD100;
    animation: bounce 1.2s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Classe per nascondere l'elemento */
.hidden {
    display: none;
}

/* Stile per l'icona invio */
.arrow-sending-conver {
    font-size: 20px;
}

#chat-text-open{
    display: block;
}

#chat-text-close{
    display: none;
}

#chat-header h1 {
    margin: 0px;
}

/* form in home per ricerca conversazionale */
form#start-chat-form {
    width: 100%;
    display: flex;
    align-content: center;
    background: #8080802b;
    align-items: stretch;
    border-radius: 30px;
    padding: 0px 0px 0px 20px;
    border-width: 1px;
    border-style: solid;
    border-color: #80808063;
    margin: auto;
    height: 44px;
}

button#start-chat-button {
    padding: 5px 15px !important;
    font-size: 18px;
    margin: 0px !important;
    border-radius: 30px;
    position: absolute;
    right: 30px;
}

i.fas.fa-search {
    display: flex;
    align-items: center;
}

input#start-chat-input {
    border-width: 0px;
    width: 100%;
}


@media(max-width: 768px) {
     .chat-container {
        /*width: 90vw !important;*/
        max-height: 750px;
        min-height: unset;
    }

    .page-id-25319 .entry-content-title{
        display:none !important;
    }
    .page-id-25319 .entry-header{
        height: fit-content !important;
    }
    .page-id-25319 .entry-header figure{
        min-height: 15rem !important;
    }
    .entry-chat {
        /*min-height: 175px !important;*/
        padding: 20px;
    }

    #chat-header h1{
        line-height: unset !important;
        margin-bottom:0px !important;
        font-size:24px !important;
    }
    .entry-chats-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;  /* Permette lo scrolling orizzontale */
        -webkit-overflow-scrolling: touch; /* Supporto per smooth scrolling su dispositivi touch */
        padding: 10px;
        gap: 10px; /* Spaziatura tra le card */
        scroll-snap-type: x mandatory; /* Scroll snap per fissare le card su posizioni definite */
        align-items: stretch;
    }
    .entry-chat {
        width: 60%;
        min-width: 60%;
        margin: 0 10px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    .entry-chat-icon-wrap {
        padding: 8px;
    }
    .entry-chat-icon {
        height: unset;
        width: unset;
    }
    #chat-header {
        font-size: 28px;
        padding: 10px;
    }
    .input-area-conver {
        width: 90%;
        padding: 8px;
    }
    #user-input-conver {
        font-size: 14px;
    }
    #send-btn-conver {
        width: 35px;
        height: 35px;
    }
    .arrow-sending-conver {
        width: 21px;
        height: 20px;
    }
    .chat-box {
        padding: 15px;
        border-top: 1px solid #ccc;
        flex-grow: unset;
    }
    #send-btn-conver {
        width: 100px !important;
        height: 40px !important;
        margin-bottom: 15px;
        font-size: 16px;
    }
    button#start-chat-button {
        right: 15px;
    }
    input#start-chat-input {
        font-size: 14px;
    }
    button#start-chat-button {
        position: unset;
    }
    button#start-chat-button {
        position: absolute;
        bottom: 15px;
        left: 20px;
    }
    .chat-message .message-content {
        max-width: 90%;
    }
}

@media(min-width: 768px) and (max-width: 1540px) {
    .chat-container {
        background-color: #fff;
        border-radius: 10px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        min-height: 500px;
        margin: auto !important;
        max-height: 750px;
    }
}