:root {
    --white: #ffffff;
    --black: rgba(0, 0, 0, 0.25);
    --gray: #30383F;
    --light-gray: #B3B3B3;
    --light-purple: rgba(239, 178, 83);
    --placeholder-text-color: #CECBCC;
    --button-default: rgba(247, 243, 244);
    --border-button: rgba(206, 203, 204);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    height: 100%;
}

body {
    margin: 0;
    font-size: 14px;
}

#webchat-floating {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#webchat-sidebar {
    height: 100%;
    width: 100%;
}

/* .rootDiv-floating {
    position: absolute;
    right: 5rem;
    bottom: 5rem;

} */

.rootDiv-floating {
    position: fixed;
    right: 7rem;
    bottom: 2.3rem;
    left: auto;
    width: fit-content;
}

.rootDiv-sidebar {
    position: absolute;
    right: 0;
    top: 0;
}

.divContainerFloating {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
}

.divContainerSidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
}

.divContainerSidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    width: 100%;
}

.divChatFullCustom {
    width: 1000px;
    height: 780px;
    display: flex;
    margin-bottom: 18px;
    border-style: solid;
    border-color: var(--gray);
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1rem 1rem 0.3rem 0.3rem;
    border-width: 2px;
    background-color: var(--white);
    transition-duration: 500ms;
    box-shadow: 0 25px 50px -12px var(--black);
}


.divChatClosed {
    opacity: 0;
    height: 0;
    width: 0;
    visibility: hidden;
    transition-duration: 500ms;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1rem 1rem 0.3rem 0.3rem;
    border-width: 2px;
    background-color: var(--white);
    box-shadow: 0 25px 50px -12px var(--black);
}

.divChatClosed .divImage {
    display: none;
}


.divContainerFloating .divChatOpenCustom {
    width: 580px;
    height: calc(100vh - 15rem) !important;
    display: flex;
    border-style: solid;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1rem 1rem 0.3rem 0.3rem;
    border-width: 2px;
    border-color: var(--gray);
    margin-bottom: 18px;
    background-color: var(--white);
    transition-duration: 500ms;
    box-shadow: 0 25px 50px -12px var(--black);
}

.divContainerSidebar .divChatOpenCustom {
    width: 300px;
    height: 100vh !important;
    display: flex;
    border-style: solid;
    flex-direction: column;
    justify-content: space-between;
    border-width: 2px;
    border-color: var(--gray);
    background-color: var(--white);
    transition-duration: 500ms;
    box-shadow: 0 25px 50px -12px var(--black);
}


@media only screen and (max-height: 1050px) {
    .divChatOpenCustom {
        height: 700px;
    }

    .divChatFullCustom {
        height: 700px;
    }
}

@media only screen and (max-height: 950px) {
    .divChatOpenCustom {
        height: 650px;
    }

    .divChatFullCustom {
        height: 650px;
    }
}

@media only screen and (max-height: 900px) {
    .divChatOpenCustom {
        height: 600px;
    }

    .divChatFullCustom {
        height: 600px;
    }
}

@media only screen and (max-height: 850px) {
    .divChatOpenCustom {
        height: 550px;
    }

    .divChatFullCustom {
        height: 550px;
    }
}

@media only screen and (max-height: 800px) {
    .divChatOpenCustom {
        height: 500px;
    }

    .divChatFullCustom {
        height: 500px;
    }
}

@media only screen and (max-height: 750px) {
    .divChatOpenCustom {
        height: 450px;
    }

    .divChatFullCustom {
        height: 450px;
    }
}

@media only screen and (max-height: 700px) {
    .divChatOpenCustom {
        height: 400px;
    }

    .divChatFullCustom {
        height: 400px;
    }
}

@media only screen and (max-height: 650px) {
    .divChatOpenCustom {
        height: 350px;
    }

    .divChatFullCustom {
        height: 350px;
    }
}

@media only screen and (max-height: 600px) {
    .divChatOpenCustom {
        height: 300px;
        transition-duration: 700ms;
    }

    .divChatFullCustom {
        height: 300px;
        transition-duration: 700ms;
    }
}

@media only screen and (max-height: 550px) {
    .divChatOpenCustom {
        height: 250px;
        transition-duration: 700ms;
    }

    .divChatFullCustom {
        height: 250px;
        transition-duration: 700ms;
    }
}

@media only screen and (max-height: 500px) {
    .divChatOpenCustom {
        height: 200px;
        transition-duration: 700ms;
    }

    .divChatFullCustom {
        height: 200px;
        transition-duration: 700ms;
    }
}

@media only screen and (max-height: 450px) {
    .divChatOpenCustom {
        height: 150px;
        transition-duration: 700ms;
    }

    .divChatFullCustom {
        height: 150px;
        transition-duration: 700ms;
    }
}

.divContainerFloating .divImage {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.75rem 0.75rem 0.0rem 0.0rem;
    background: var(--gray);
}

.divContainerSidebar .divImage {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: var(--gray);
}

.imageLogo {
    margin-left: 1rem;
    width: 5rem;
}

.logoFull {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-right: 1rem;
    width: 1.5rem;
    cursor: pointer;


}

.logoFull:hover {
    -webkit-transform: scale(1.4);
    transition-duration: 500ms;

}

.iframeStyle {
    width: 100%;
    height: 100%;
    border: 0;
    border-bottom-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.divButton {
    border-radius: 9999px;
    width: min-content;
    cursor: pointer;
    transition-duration: 500ms;
    animation-duration: 500ms;
    align-items: end;
}


.imageClose {
    width: min-content;
    height: min-content;
    content: url("./assets/logoAIphyCircolare.svg");
}


.imageOpen {
    width: min-content;
    height: min-content;
    content: url("./assets/logoAIphyEsteso.svg");

}

.webchat__suggested-action {
    background-color: var(--gray) !important;
    border-radius: 35px !important;
    border-color: var(--gray) !important;
    color: var(--white) !important
}


ac-columnSet {
    justify-content: space-between !important;
}

.webchatStyle {
    overflow-y: hidden !important;
    border-radius: 0.75rem 0.75rem 0.3rem 0.3rem;
}

.ac-pushButton {
    background-color: var(--button-default) !important;
    border-radius: 95px !important;
    border-width: 2px !important;
    border-color: var(--border-button) !important;
    color: var(--gray) !important;
    border-style: solid !important;
}


.ac-pushButton:hover {
    background-color: var(--white) !important;
    border-radius: 35px;
    color: var(--gray) !important
}

.ac-pushButton div {
    font-family: bold;
}

.ac-pushButton:focus {
    background-color: var(--gray) !important;
    border-radius: 35px;
    border-color: var(--gray) !important;
    color: var(--white) !important
}

.webchat__bubble__content {
    font-family: bold, serif !important;
    min-height: 0px !important;
    border-width: 2px !important;
}

.webchat__send-box__main {
    height: 50px;
    border: 0;
}


.webchatStyle p {
    font-family: regular, serif;
    color: var(--gray);
    min-height: 0 !important;
}

.webchatStyle li {
    font-family: regular, serif;
    color: var(--gray);
    min-height: 0 !important;
}

.webchatStyle * {
    font-family: regular, serif;
}

#bot-avatar {
    background-image: url("./assets/logoAIphyCircolare.svg") !important;
}

.webchat__send-box-text-box__input {
    font-family: regular, serif !important;
}

.webchat__send-icon {
    rotate: -40grad;
    width: 35px;
    fill: var(--gray);
}

@font-face {
    font-family: 'bold';
    src: url('./fonts/metropolis/Metropolis-Bold.otf') format('opentype') ;
}

@font-face {
    font-family: 'regular';
    src: url('./fonts/metropolis/Metropolis-Regular.otf') format('opentype');
}

/* VARIOUS *****************/
#welcome-header {
    text-shadow: 0 1px, 1px 0, 1px 1px;
}

.ac-columnSet .ac-container:nth-child(3) .ac-horizontal-separator {
    height: 0 !important;
}

.webchat__basic-transcript__activity-indicator.webchat__basic-transcript__activity-indicator--focus {
    border: none !important;
}

/*************************************/

/* RATING ************************************/
#rating .ac-input.ac-choiceSetInput-expanded {
    display: flex;
    justify-content: center;
}

#rating input {
    position: absolute;
    left: -100vw;
}

#rating .ac-input.ac-choiceSetInput-expanded div label {
    width: 48px;
    height: 48px;
    padding: 48px 0 0;
    overflow: hidden;
    background: url('assets/icon-star-empty.png');
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 !important;
}

#rating .ac-input.ac-choiceSetInput-expanded div:hover label {
    background: url('assets/icon-star.png');
    background-repeat: no-repeat;
    background-size: contain;
}

#rating .ac-input.ac-choiceSetInput-expanded div:has(~ div:hover) label {
    background: url('assets/icon-star.png');
    background-repeat: no-repeat;
    background-size: contain;
}

#rating .ac-input.ac-choiceSetInput-expanded div:has(~ div input:checked) input ~ label,
#rating .ac-input.ac-choiceSetInput-expanded div input:checked ~ label {
    background: url('assets/icon-star.png');
    background-repeat: no-repeat;
    background-size: contain;
}

.ac-container.ac-adaptiveCard:has(div#rating) textarea {
    background: white;
    border-color: rgb(206, 203, 204);
    border-radius: 30px;
    border-style: solid;
    border-width: 2px;
    resize: none;
    height: 8rem;
    padding: 1rem;
    font-family: inherit;
}

.ac-container.ac-adaptiveCard:has(div#rating) .ac-input-container:has(textarea) {
    border: 0;
}

.ac-container.ac-adaptiveCard button[aria-disabled="true"]:hover,
.ac-container.ac-adaptiveCard button[aria-disabled="true"]:focus,
.ac-container.ac-adaptiveCard button[aria-disabled="true"] {
    background-color: white !important;
    border-color: lightgrey !important;
    color: lightgrey !important;
}

.ac-container.ac-adaptiveCard button[aria-disabled="true"][aria-pressed="true"] {
    background-color: darkgrey !important;
}

#welcomeTitle p {
    text-shadow: 1px 0 #888888 !important;
}

#welcomeImage {
    margin-bottom: 15px;
}

#headerColumnSet {
    justify-content: space-between !important;
    align-items: start !important;
}

#resourceColumnSet {
    flex-direction: column !important;
}

#resourceDescription {
    margin-top: 1rem !important;
}

.divChatFullCustom #resourceColumnSet {
    flex-direction: row !important;
}

.divChatFullCustom #resourceDescription {
    margin-top: unset !important;
}

/* Accordion */

#worksAccordionContainer .ac-container .ac-columnSet {
    align-items: center;
}

#worksResultContainer button,
div[id^='categoryContent'] button {
    border: 0 !important;
    padding: 0 !important;;
    text-align: left !important;;
    background-color: transparent !important;
    justify-content: start !important;
    height: unset !important;
    margin-top: 1rem !important;
}

#worksResultContainer button div,
div[id^='categoryContent'] button div {
    overflow: unset !important;
    white-space: unset !important;
}

div[id^='toggleVisibility'] button div::after {
    content: '\25BC';
}


/* Devo mettere anche le classi iniziali altrimenti non prende priorità */
.ac-container.ac-adaptiveCard #worksResultContainer button[aria-disabled="true"],
.ac-container.ac-adaptiveCard div[id^='categoryContent'] button[aria-disabled="true"] {
    background-color: unset !important;
    color: darkgrey !important;
}

.ac-container.ac-adaptiveCard #worksResultContainer button[aria-disabled="true"][aria-pressed="true"],
.ac-container.ac-adaptiveCard div[id^='categoryContent'] button[aria-disabled="true"][aria-pressed="true"] {
    background-color: unset !important;
    color: #313131 !important;
}

.ac-container.ac-adaptiveCard #worksResultContainer .ac-actionSet button:not([aria-disabled="true"]).ac-pushButton:focus,
.ac-container.ac-adaptiveCard div[id^='categoryContent'] button:not([aria-disabled="true"]).ac-pushButton:focus {
    background-color: unset !important;
    color: grey !important;
}

.ac-container.ac-adaptiveCard #worksResultContainer .ac-container:has(button[aria-disabled="true"]) .ac-textBlock p,
div[id^='categoryContent'] .ac-container:has(button[aria-disabled="true"]) .ac-textBlock p {
    color: grey !important;
}

div[id^='categoryContent'] .ac-columnSet .ac-container:nth-child(1) .ac-textBlock p {
    text-align: right;
    margin-top: 1rem !important;
}

#worksAccordionContainer .ac-container:has(+ .ac-horizontal-separator + div[id^='categoryContent'][aria-expanded='true']) div[id^='toggleVisibility'] button div::after {
    content: '\25B2';
}

#resourceTitle {
    margin-right: 60px;
}

/*************************/

.divContainerSidebar #topRightSphere img {
    width: 30px !important;
    height: 30px !important;
    min-width: unset !important;
    margin-left: 1rem;
}

.divContainerSidebar #welcomeImage {
    margin-bottom: unset !important;
}

.divContainerSidebar #welcomeImage img {
    height: auto !important;
    width: 65px !important;
}

.divContainerSidebar #welcomeTitle p {
    font-size: 12px;
    margin-top: 0.5rem !important;
}

.divContainerSidebar button {
    height: 30px !important;
    font-size: smaller !important;
}

.divContainerSidebar p {
    font-size: 12px !important;
    line-height: 1.3;
}

.divContainerSidebar #rating .ac-choiceSetInput-expanded label {
    width: 35px !important;
    height: 35px !important;
    padding: 35px 0 0 !important;
}

.divContainerSidebar .webchat__send-icon {
    width: 25px !important;
}

.divContainerSidebar #imageSource {
    text-align: left !important;
}

.divContainerSidebar .webchat__send-box__main {
    height: 40px !important;
    align-items: center !important;
}

.divContainerSidebar .webchat__icon-button {
    align-self: auto !important;
}

.divContainerSidebar #rating #comment textarea {
    font-size: 12px;
}

.divContainerSidebar #resourceTitle p {
    font-size: medium !important;
}

.divContainerSidebar #resourceTitle {
    margin-right: 30px;
}

#topRightSphere img {
    min-width: unset !important;
}

#refineSearchPrompt {
    margin-top: 0.5rem;
}

@media (max-width: 950px) {

    #resourceTitle p {
        font-size: medium !important;
    }

    .divContainerFloating button {
        height: 30px !important;
        font-size: smaller !important;
    }

    .divContainerFloating p {
        font-size: 12px !important;
        line-height: 1.3;
    }

    .rootDiv-floating {
        position: unset !important;
    }

    .divContainerFloating {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
    }

    .divContainerFloating .divChatOpenCustom {
        width: 100% !important;
        height: 100% !important;
        margin-bottom: -13% !important;
        border-radius: unset;
    }

    .divContainerFloating .divImage {
        border-radius: unset;
    }

    #chat-floating {
        z-index: 5 !important;
        position: static !important;
        width: 100% !important;
    }


    .webchat__stacked-layout__avatar-gutter,
    .webchat__bubble__nub-pad {
        display: none !important;
    }

    .action-full,
    .action-changemode {
        display: none;
    }


    #topRightSphere img {
        width: 30px !important;
        height: 30px !important;
        min-width: unset !important;
        margin-left: 1rem;
    }

    #welcomeImage img {
        height: auto !important;
        width: 65px !important;
    }

    #rating .ac-choiceSetInput-expanded label {
        width: 35px !important;
        height: 35px !important;
        padding: 35px 0 0 !important;
    }

    .webchat__send-icon {
        width: 25px !important;
    }

    #imageSource {
        text-align: left !important;
    }

    .webchat__send-box__main {
        height: 40px !important;
        align-items: center !important;
    }

    .webchat__icon-button {
        align-self: auto !important;
    }

    .imageOpen {
        width: min-content;
        height: min-content;
        content: url("./assets/logoAIphyCircolare.svg") !important;
    }


    #welcomeTitle p {
        font-size: 12px !important;
        margin-top: 0.5rem !important;
    }

    #rating #comment textarea {
        font-size: 12px;
    }

    #welcomeImage {
        margin-bottom: unset !important;
    }

    #resourceTitle {
        margin-right: 30px;
    }

}


/*FONT AWESOME*/

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url(https://ka-f.fontawesome.com/releases/v6.5.2/webfonts/free-fa-solid-900.woff2) format("woff2"), url(https://ka-f.fontawesome.com/releases/v6.5.2/webfonts/free-fa-solid-900.ttf) format("truetype")
}

#phone-container p {
    display: inline;
    margin-left: 0.3rem;
}
#phone-container::before {
    font-weight: 900;
    font-family: "Font Awesome 6 Free";
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
    content: "\f095";
}


#email-container p {
    display: inline;
    margin-left: 0.3rem;
}
#email-container::before {
    font-weight: 900;
    font-family: "Font Awesome 6 Free";
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
    content: "\f0e0";
}


#pec-container p {
    display: inline;
    margin-left: 0.3rem;
}
#pec-container::before {
    font-weight: 900;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
    content: "PEC";
}

#website-container p {
    display: inline;
    margin-left: 0.3rem;
}
#website-container::before {
    font-weight: 900;
    font-family: "Font Awesome 6 Free";
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
    content: "\f0ac";
}

#accessibilita-container p,
#accessibilita-full-container p {
    display: inline;
    margin-right: 0.3rem;
}

#accessibilita-container::after,
#accessibilita-full-container::after {
    font-weight: 900;
    font-family: "Font Awesome 6 Free";
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
    content: "\f193";
}

.button-text{
    border: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    background-color: transparent !important;
    justify-content: start !important;
    height: unset !important;
}

.button-text:focus{
    color: grey !important;
}

.button-text span{
    font-family: "bold" !important;
}

#buttonToLink button{
    border: 0 !important;
    background-color: transparent !important;
    text-decoration: underline;
}

#buttonToLink button:focus{
    border: 0 !important;
    color: darkgray !important;
    background-color: transparent !important;
    text-decoration: underline;
}