@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Titillium Web", sans-serif;
}

:root {
    --primary-color: #06c;
    --primary-color-light: #f2f6fc;
    --primary-color-dark: #00368F;
    --title-text-color: #002460;
    --text-color: #454d56;;

    --success-color: #8dec8d;
    --warning-color: #faeeba;
    --error-color: #ffdcdc;
}

body {
    color: var(--text-color);
    display: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--title-text-color);
}

.text-dark{
  color: var(--primary-color-dark) !important;
}

p {
    margin-top: 10px;
}

a {
  color: var(--primary-color);
}

.text-center {
    text-align: center;
}

.content-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    height: 100svh;
    display: flex;
    flex-direction: column;
}

.container-title {
    animation: 1s fadeIn;
}

#app-title {
    position: relative;
    z-index: 2;
    line-height: 1.1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.secondary-title {
    font-style: italic;
    position: absolute;
    left: 50%;
    top: 0px;
    transform: translateX(-50%);
    width: 100%;
    color: #efd255;
    letter-spacing: 1px;
}

/* -------
BUTTON
------------------------------- */
.btn {
    border-radius: 16px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: .3s;
    border: none;
}

.btn:hover {
    background: var(--primary-color-dark);
}

.btn.btn-secondary {
    background: var(--primary-color-light);
    border: 2px solid #d6e6fd;
    color: var(--primary-color);
}

.btn.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

.link {
    background: transparent !important;
    text-decoration: underline !important;
    color: var(--primary-color) !important;
    font-size: 16px;
}

.link.dark {
  color: var(--primary-color-dark) !important;
}

/* -------
AUTH SECTION
------------------------------- */
.main-container.auth-container {
    background: var(--primary-color-light);
}

.auth-container_identity {
    height: 225px;
    background: linear-gradient(180deg, #fff, var(--primary-color-light));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 40px;
}

.auth-container_identity img {
    height: 125px;
}

.auth-container_identity #municipality {
  text-align: center;
}

.auth-container_operative {
  background: #fff;
  flex-grow: 1;
  border-top-left-radius: 50px;
  border-top-right-radius: 50px;
  padding: 40px 30px 20px 30px;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.intro {    
  position: relative;
  text-align: center;
  max-width: 400px;
  margin-bottom: 50px;
}

.divider-authservice {
  margin: 20px 0;
  position: relative;
  width: 150px;
}

.divider-authservice::before{
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  border-top: 2px dashed rgba(0,0,0,.15);
  width: 100%;
}

.divider-authservice span {
  position: relative;
  z-index: 2;
  width: 70px;
  display: block;
  background: #fff;
  margin: auto;
  text-align: center;
  text-transform: uppercase;
  font-size: .8rem;
  font-weight: 600;
}

.spid-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.help-spid-link.btn.link {
  color: var(--text-color) !important;
  display: block;
  width: 100%;
  text-align: center;
  padding: 0;
}

.help-spid-link:nth-of-type(1) {
  margin-top: 15px;
}

.btn.authservice-button {
    /*text-transform: uppercase;*/
    width: 200px;
    padding: 15px 20px;
    font-size: 18px;
}

.authservice-button img{
    height: 25px;
}

.spid-provider-container{
    display: none; 
    position: absolute;
    border: 1px solid rgba(0,0,0,.1);
    max-width: 90%;
    overflow-y: auto;
    z-index: 9;
    background: #fff;
    border-radius: 8px;
    width: 200px;
    top: 60px;
    z-index: 3;
}

.provinder {
    cursor: pointer;
    width: 100%;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    background: #fff;
}

.provinder img {
    height: 20px;
}

.info-spid-provider{
    color: #4E4E4E;
}

.info-spid-provider:not(:last-child){
    border-bottom: 1px solid rgba(0,0,0,.1);    
}

.banner-informativa-ai {
  width: 800px;
  max-width: 100%;
  font-size: 12px;
  text-align: center;
  padding-top: 20px;
}

/* -------
HOME
------------------------------- */
.topbar {
    padding: 10px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.topbar img {
    width: 40px;
}

#btnLogout{
    position: fixed;
    top: 7px;
    right: 10px;
    z-index: 99;
}

#welcome-title {
    color: var(--text-color);
    font-size: 14px;    
    font-weight: 500;
}

#welcome-user {
    font-size: 18px;
}

.welcome-container {
    padding: 30px;
}

.welcome-container .grid {
    display: flex;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#welcome-title, #welcome-user { text-transform: capitalize; }
#welcome-user { line-height: 1; }

.welcome-container p {
    margin-top: 20px;
}

.agent-container {
  position: relative;
    flex-grow: 1;
    /*padding: 20px 40px;*/
}

.agent-container img {
    width: 100%;
    max-width: 500px;
}

.agent-container .informativa-ai {
  position: absolute;
  bottom: 3px;
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: #666;
  padding: 4px 0;
  z-index: 1000;
  font-weight: bold;
}

chat-messenger {
    width: 100%;
    height: 100%;
}

@media screen and (max-width: 600px) {
    chat-messenger::slotted(.chat-wrapper) {
        top: calc(50% + 50px) !important;
    }
}

chat-messenger{    
    height: 100svh;

    --chat-messenger-color--primary: var(--primary-color);
    --chat-messenger-shape--corner-value-extra-large: 0;
}


/* -------
NOTIFICATION
------------------------------- */
.notification-container {
    position: fixed;
    right: 30px;
    top: 30px;
    z-index: 10;
}

.notification {
    position: relative;
    width: 200px;
    padding: 20px 30px;
    border-radius: 20px;
}

.notification.success { background: var(--success-color); }
.notification.warning { background: var(--warning-color); }
.notification.error { background: var(--error-color); }

.notification .btn-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

/* -------------------
LOADER
------------------------------- */
#mgg-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);  
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;  
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mgg-loader-overlay.mgg-loader-active {
  opacity: 1;
  visibility: visible;
}

.mgg-loader-spinner {
  width: 64px;
  height: 64px;
  border: 6px solid var(--primary-color-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: mgg-spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
  position: relative;
}

.mgg-loader-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background-color: var(--primary-color-dark);
  border-radius: 50%;
  animation: mgg-pulse 1s ease-in-out infinite alternate;
}

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

@keyframes mgg-pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}