form {
    width: 100%;
    max-width: 22rem;
    margin: 2rem auto;
    margin-bottom: 0;
    padding: 1.5rem;
    border-radius: calc(var(--radius) * 2);
    position: relative;
    z-index: 1;
}

form .inner {
    overflow: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: calc(var(--radius) * 2);
    z-index: -1;
}

form .inner::before {
    content: "";
    position: absolute;
    width: calc(100% - 2px);
    height: calc(100% - 2px);
    top: 1px;
    left: 1px;
    opacity: 1;
    background-color: rgba(var(--space-rgb), 0.9);
    border-radius: calc(var(--radius) * 2);
    z-index: 1;
}

form .inner::after {
    content: "";
    background: linear-gradient(90deg, #3850ca 10%, #b93bb0 55%, #c5953c 88%);
    background-size: 100%;
    width: 200%;
    height: 200%;
    aspect-ratio: 1 / 1;
    position: absolute;
    top: -50%;
    left: -50%;
    right: 0;
    bottom: 0;
    z-index: 0;
    animation: spinning 3000ms linear infinite;
}

@keyframes spinning {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

form fieldset input,
form fieldset textarea {
    background-color: var(--terziario);
    border: 1px solid rgba(var(--details-rgb), 0.15);
    border-radius: var(--radius);
    padding: 0.7rem 0.8rem;
    width: 100%;
    outline: none;
    transition: all var(--t-ms) var(--t-type);
    user-select: none;
    resize: none;
    box-shadow: 0px 0px 15px 0px rgba(var(--details-rgb), 0.0);
    color: var(--testo) !important;
}

form fieldset::before {
    content: "";
    background: radial-gradient(rgba(var(--details-rgb), 1), rgba(255, 145, 0, 0.0) 50%);
    background-size: 100% 200%;
    background-position: 50% 20%;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    height: 2rem;
    transition: all var(--t-ms) var(--t-type);
    pointer-events: none;
    opacity: 0.12;
}

form fieldset::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: calc(100% - 3rem);
    height: 1px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, transparent, var(--details), transparent);
    transition: all var(--t-ms) var(--t-type);
    opacity: 1;
}

form fieldset:hover::after {
    opacity: 1;
}

form fieldset input:focus,
form fieldset textarea:focus {
    border-color: var(--details);
}

form fieldset {
    width: 100%;
    margin-top: 0.8rem;
    border: none;
    position: relative;
}

form fieldset textarea:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    user-select: none;
    overflow: hidden;
}

form fieldset label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
    font-weight: bold;
    user-select: none;
}

form fieldset label svg {
    width: 1.15rem;
    margin-right: 0.4rem;
}

form fieldset label.required::after {
    content: "*";
    color: red;
    display: inline-block;
    margin-left: 0.3rem;
}

form fieldset .textarea-wrap {
    overflow: hidden;
    border-radius: var(--radius);
}

form fieldset.buttons {
    justify-content: center;
    margin-top: 1.5rem;
}

form fieldset.buttons::before,
form fieldset.buttons::after {
    display: none;
}

form fieldset button.annulla {
    background-color: transparent !important;
    color: #fff !important;
    flex-grow: 2;
}

form fieldset button.main {
    flex-grow: 3;
}

form fieldset button.main.red {
    background-color: hsl(0, 100%, 30%) !important;
    color: #fff !important;
}

form fieldset button.main.red:hover {
    background-color: hsl(0, 100%, 25%) !important;
}

form fieldset textarea {
    margin-bottom: -3.3px;
}