@font-face {
    font-family: "IBMPlexSans Regular";
    src: url("/static/fonts/IBM_Plex_Sans/IBMPlexSans-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "IBMPlexSans Bold";
    src: url("/static/fonts/IBM_Plex_Sans/IBMPlexSans-Bold.ttf") format("truetype");
    font-weight: bold;
    font-style: normal;
}

body {
    /* font-family: 'IBMPlexSans Regular', 'system-ui', Arial, sans-serif; */
    font-family: 'Segoe UI Light', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    /* background-color: #044389; */
    background-color: #000058;
}

#wrapper {
    display: grid;
    grid-template-areas:
        "a a"
        "b c";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 10vh auto;
    gap: 4rem;
    margin-bottom: 2rem;
}

header {
    grid-area: a;
    background-color: white;
    padding: 1rem 1.8rem;
    display: flex;
    align-items: center;
    height: 6rem;
    justify-content: space-between; /* Distribuisce gli elementi ai lati opposti */
    width: 100%;
    box-sizing: border-box; /* Assicura che padding e bordi siano inclusi nella larghezza */
    overflow: hidden; /* Impedisce che il contenuto esca dai confini */ 
}

header>a ,
header img {
    height: 3rem;
    max-width: 100%;
}

#badge-canvas {
    grid-area: b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem 2rem;
}

#badge-canvas img,
#badge-canvas canvas {
    display: block;
    aspect-ratio: 1 / 1;
    margin: auto;
    max-width: min(512px, 100%) !important;
    height: auto !important;
}

#badge-form-container {
    grid-area: c;
    font-size: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 2rem;
}

#badge-form-container form div {
    margin: 1rem 0;
}

#badge-form-container input {
    border: 0;
    background-color: white;
    /* box-shadow: 4px 4px 0px #ff5c00; */
    box-shadow: 4px 4px 0px #059CF5;

    line-height: 2rem;
    font-size: 1.8rem;
    display: block;
    padding: 0.3rem;
    width: 100%;
}

#badge-form-container button {
    /* background-color: #ff5c00; */
    background-color: #059CF5;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    border: 0;
    border-radius: 6px;
}

span.asterisk {
    color: #059CF5;
}

.theme-selector {
    margin: 1rem 0;
}

.theme-selector label {
    display: block;
    margin-bottom: 0.5rem;
}

.theme-selector {
    margin: 1rem 0;
}

.theme-label {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.theme-tags-row {
    display: flex;
    gap: 0;
}

.theme-tag {
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
    color: white;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3);
    border-right: none;
    background: none;
    transition: background 0.15s;
}

.theme-tag:first-child {
    border-radius: 4px 0 0 4px;
}

.theme-tag:last-child {
    border-radius: 0 4px 4px 0;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.theme-tag:hover {
    background: rgba(255,255,255,0.18);
}

.theme-tag.active {
    background: rgba(5,156,245,0.35);
    border-color: #059CF5;
}

.theme-tag.active + .theme-tag {
    border-left-color: #059CF5;
}

div.not-implemented {
    display: none;
}

.footer {
    font-size: 90%;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    color: white;
    text-align: center;   
    margin-top: 2rem;
 }
 

@media (max-width: 600px) {
    #wrapper {
        grid-template-columns: 1fr;
        grid-template-areas: "a" "b" "c";
        gap: 1rem;
    }
    div#badge-wrapper {
        margin-top: 2.2rem;
    }    
 
}

@media (max-width: 600px) or (max-height: 850px) {
    .footer {
        position: relative;
     }    
}

button {
    cursor: pointer;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.text-container-right {
    margin-left: auto; /* Spinge l'elemento completamente a destra */
    text-align: right;
    max-width: 50%; /* Impedisce che il testo occupi troppo spazio */
}

/* Se necessario, puoi aggiungere questi stili per l'aspetto del testo */
.text-container-right h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #000058;
    white-space: nowrap; /* Impedisce l'andare a capo */
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-container-right p {
    margin: 0.3rem 0 0;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-container-right a {
    color: white;
    background-color: #059CF5;
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.95rem;
    display: inline-block;
    margin-top: 0.2rem;
}

.text-container-right a:hover {
    background-color: #0480cc;
    text-decoration: none;
}

/* Media query per dispositivi mobili */
@media (max-width: 600px) {
    .text-container-right {
        max-width: 60%;        
    }
    
    .text-container-right h2 {
        font-size: 0.9rem;
    }
    
    .text-container-right p {
        font-size: 0.8rem;
    }
}