
*,
*::before,
*::after {
    box-sizing: border-box;
}
/* TITLE */
.gegov-form-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 20px;
}

/* GRID */
.gegov-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* UPLOAD */
.gegov-upload {
    text-align: center;
    margin: 15px 0;
}

.gegov-preview {
    margin-top: 10px;
}

.gegov-preview img {
    max-width: 100px;
    display: none;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* LOADER */
.gegov-loader {
    display: none;
    margin: 20px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gegov-select {
    appearance: none;
    background: #fafafa;
    cursor: pointer;
    position: relative;
}

/* freccia custom */
.gegov-select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%230073aa' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* WRAPPER PAGINA */
.gegov-crypto-form {
    max-width: 620px;
    margin: 60px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeUp 0.5s ease;
}

/* INPUT BASE */
.gegov-crypto-form input,
.gegov-crypto-form textarea,
.gegov-crypto-form select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    font-size: 15px;
    transition: all 0.25s ease;
}

/* FOCUS MODERNO */
.gegov-crypto-form input:focus,
.gegov-crypto-form textarea:focus,
.gegov-crypto-form select:focus {
    border-color: #0073aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
    transform: scale(1.01);
    outline: none;
}

/* TEXTAREA */
.gegov-crypto-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* GRID SOCIAL PIÙ ARIOSO */
.gegov-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* BUTTON PRO */
.gegov-crypto-form button {
    margin-top: 10px;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #0073aa, #005f8a);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* HOVER BUTTON */
.gegov-crypto-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* FILE INPUT CLEAN */
.gegov-upload input[type="file"] {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed #ccc;
    cursor: pointer;
}

/* PREVIEW */
.gegov-preview img {
    max-width: 90px;
    display: none;
    margin-top: 10px;
    border-radius: 12px;
    transition: 0.3s;
}

/* ANIMAZIONE INGRESSO */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ERRORI PIÙ PULITI */
.gegov-crypto-form p {
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.gegov-crypto-form p[style*="red"] {
    background: #ffeaea;
    color: #d8000c;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .gegov-crypto-form {
        padding: 25px;
        margin: 30px 15px;
    }

    .gegov-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* HOVER EXTRA */
.gegov-crypto-form input:hover,
.gegov-crypto-form textarea:hover {
    transform: scale(1.01);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .gegov-grid {
        grid-template-columns: 1fr;
    }
}

/* FIELD WRAPPER */
.gegov-field {
    position: relative;
}

/* INPUT */
.gegov-field input,
.gegov-field textarea {
    width: 100%;
    padding: 16px 45px 16px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
    outline: none;
}

/* LABEL FLOAT */
.gegov-field label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
    transition: 0.2s ease;
    background: #fff;
    padding: 0 5px;
}

/* ACTIVE FLOAT */
.gegov-field input:focus + label,
.gegov-field input:not(:placeholder-shown) + label,
.gegov-field textarea:focus + label,
.gegov-field textarea:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
    color: #0073aa;
}

/* ICON */
.gegov-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.6;
}

/* DROPZONE */
.gegov-dropzone {
    border: 2px dashed #ccc;
    padding: 25px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    background: #fafafa;
}

.gegov-dropzone:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

/* PREVIEW */
.gegov-dropzone img {
    max-width: 80px;
    margin-top: 10px;
    display: none;
}

/* MESSAGGI */
.gegov-msg {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
	text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.5s ease, transform 1.5s ease; /* transition per fade-out */
}

/* SUCCESS */
.gegov-success {
    background: linear-gradient(135deg, #e6f9f0, #d2f5e3);
    color: #1e7e5a;
    border-left: 4px solid #00c896;
}

/* ERROR */
.gegov-error {
    background: #ffecec;
    color: #b30000;
    border-left: 4px solid #ff4d4d;
}

/* ANIMAZIONE */
@keyframes gegovFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}