/* ===================================================================
   Form One — Frontend CSS
   Il form come appare ai visitatori del sito.
   Tutti gli stili possono essere sovrascritti da "Custom Gip Css".
=================================================================== */

/* ---- WRAPPER --------------------------------------------------- */
.fone-wrap {
    --fone-accent: #4f4f4f;
    --fone-radius: 10px;
    background: #fff;
    max-width: 920px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
    line-height: 1.5;
    box-sizing: border-box;
}
.fone-wrap *,
.fone-wrap *::before,
.fone-wrap *::after { box-sizing: border-box; }

/* ---- HEADER ---------------------------------------------------- */
.fone-form-header { margin-bottom: 20px; }
.fone-form-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #0f172a;
    line-height: 1.2;
}
.fone-form-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* ---- STEP CARD + GRID ----------------------------------------- */
.fone-step-card {
    margin-bottom: 18px;
}
.fone-step-card.is-hidden {
    display: none;
}
.fone-step-grid {
    display: grid;
    gap: 16px 14px;
}
.fone-step-grid.is-one-col { grid-template-columns: 1fr; }
.fone-step-grid.is-two-col { grid-template-columns: repeat(6, 1fr); }

/* ---- FIELD ----------------------------------------------------- */
.fone-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.fone-width-full       { grid-column: 1 / -1; }
.fone-width-two-thirds { grid-column: span 4; }
.fone-width-half       { grid-column: span 3; }
.fone-width-third      { grid-column: span 2; }
/* Su mobile (single column) tutto a piena larghezza */
.fone-step-grid.is-one-col .fone-width-half,
.fone-step-grid.is-one-col .fone-width-third,
.fone-step-grid.is-one-col .fone-width-two-thirds { grid-column: 1 / -1; }

.fone-field label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    display: block;
}
.fone-required { color: #dc2626; margin-left: 3px; }

/* ---- INPUTS ---------------------------------------------------- */
.fone-field input[type="text"],
.fone-field input[type="email"],
.fone-field input[type="tel"],
.fone-field input[type="number"],
.fone-field input[type="url"],
.fone-field input[type="date"],
.fone-field input[type="password"],
.fone-field select,
.fone-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: var(--fone-radius);
    font-size: 15px;
    background: #fff;
    color: #0f172a;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.fone-field textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}
.fone-field input:focus,
.fone-field select:focus,
.fone-field textarea:focus {
    outline: none;
    border-color: var(--fone-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}
.fone-field.has-error input,
.fone-field.has-error select,
.fone-field.has-error textarea,
.fone-field.has-error-js input,
.fone-field.has-error-js select,
.fone-field.has-error-js textarea {
    border-color: #dc2626;
}

/* ---- CHOICE GROUPS (radio/checkbox) --------------------------- */
.fone-choice-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fone-choice-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.fone-choice-row:hover { border-color: var(--fone-accent); background: #f8faff; }
.fone-choice-row input { margin: 0; }
.fone-choice-row span { font-size: 14px; color: #334155; }

/* ---- AVATAR FIELD --------------------------------------------- */
.fone-field-avatar { grid-column: 1 / -1; }
.fone-avatar-slot {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    background: #f8fafc;
    transition: border-color .2s, background .2s;
}
.fone-avatar-slot:hover {
    border-color: var(--fone-accent);
    background: #fff;
}
.fone-avatar-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 12px;
}
.fone-avatar-preview {
    width: 120px;
    height: 120px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fone-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--fone-accent);
    border-radius: 50%;
}
.fone-avatar-placeholder {
    font-size: 40px;
    color: #94a3b8;
}
.fone-avatar-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.fone-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    color: var(--fone-accent);
    border: 1.5px solid var(--fone-accent);
    border-radius: var(--fone-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    overflow: hidden;
}
.fone-avatar-btn:hover {
    background: var(--fone-accent);
    color: #fff;
}
.fone-avatar-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* ---- TEXTAREA COUNTER ----------------------------------------- */
.fone-textarea-wrap { position: relative; }
.fone-char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}
.fone-char-count.is-near-limit { color: #d97706; }
.fone-char-count.is-over-limit { color: #dc2626; }

/* ---- HELP TEXT ------------------------------------------------- */
.fone-help {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
    display: block;
}

/* ---- ERRORS ---------------------------------------------------- */
.fone-field-error {
    font-size: 13px;
    color: #dc2626;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}
.fone-global-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: var(--fone-radius);
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 14px;
}

/* ---- TRUST TEXT ------------------------------------------------ */
.fone-trust-text {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    margin: 10px 0 0;
}

/* ---- CONTINUE BUTTON ------------------------------------------ */
.fone-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: transparent;
    color: var(--fone-accent);
    border: 1.5px solid var(--fone-accent);
    border-radius: var(--fone-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 14px;
    transition: background .15s, color .15s;
}
.fone-continue-btn:hover {
    background: var(--fone-accent);
    color: #fff;
}
.fone-continue-btn:disabled,
.fone-continue-btn.is-done {
    opacity: .5;
    cursor: not-allowed;
}

/* ---- SUBMIT BUTTON -------------------------------------------- */
.fone-submit-btn {
    display: inline-block;
    padding: 14px 28px;
    width: 100%;
    background: var(--fone-accent);
    color: #fff;
    border: none;
    border-radius: var(--fone-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
    transition: filter .15s, transform .1s;
}
.fone-submit-btn:hover  { filter: brightness(1.07); }
.fone-submit-btn:active { transform: translateY(1px); }
.fone-submit-btn:disabled,
.fone-submit-btn.is-loading {
    opacity: .7;
    cursor: wait;
}

/* ---- SUCCESS BOX ---------------------------------------------- */
.fone-success-box {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--fone-radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.fone-success-box p { margin: 0; font-size: 15px; }
.fone-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

/* ---- HONEYPOT (invisibile agli umani) ------------------------- */
.fone-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* ---- DONATE ---------------------------------------------------- */
.fone-donate-wrap {
    margin-top: 20px;
    text-align: center;
}
.fone-donate-btn {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: var(--fone-accent);
    border: 1px solid var(--fone-accent);
    border-radius: var(--fone-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.fone-donate-btn:hover { background: var(--fone-accent); color: #fff; }

/* ---- HTML BLOCK ------------------------------------------------ */
.fone-html-block { font-size: 14px; line-height: 1.6; }

/* ---- REVEAL ANIMATIONS ---------------------------------------- */
.fone-reveal-from-top {
    animation: mgfRevealFromTop .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes mgfRevealFromTop {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fone-reveal-fade {
    animation: mgfRevealFade .4s ease both;
}
@keyframes mgfRevealFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.fone-reveal-slide-right {
    animation: mgfRevealSlideRight .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes mgfRevealSlideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.fone-reveal-scale {
    animation: mgfRevealScale .4s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes mgfRevealScale {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---- CROP MODAL (Cropper.js) ---------------------------------- */
.fone-crop-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, .75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: mgfCropFadeIn .2s ease;
}
@keyframes mgfCropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fone-crop-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.fone-crop-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.fone-crop-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}
.fone-crop-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: background .15s, color .15s;
}
.fone-crop-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.fone-crop-body {
    padding: 16px 20px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fone-crop-stage {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: #0f172a;
    border-radius: 8px;
}
.fone-crop-stage img {
    display: block;
    max-width: 100%;
}
.fone-crop-hint {
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-style: italic;
}
/* Maschera circolare sulla crop box di Cropper.js */
.fone-crop-stage .cropper-view-box,
.fone-crop-stage .cropper-face {
    border-radius: 50%;
}
.fone-crop-stage .cropper-view-box {
    outline: 2px solid #4f4f4f;
    outline-color: #4f4f4f;
}
.fone-crop-foot {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.fone-crop-foot button {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all .15s;
}
.fone-crop-foot button:hover {
    border-color: #4f4f4f;
    color: #4f4f4f;
}
.fone-crop-zoom-in, .fone-crop-zoom-out, .fone-crop-rotate {
    min-width: 36px;
    padding: 8px 10px !important;
}
.fone-crop-confirm {
    background: #4f4f4f !important;
    color: #fff !important;
    border-color: #4f4f4f !important;
}
.fone-crop-confirm:hover {
    background: #4b5563 !important;
    color: #fff !important;
}
.fone-crop-cancel:hover {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
}
@media (max-width: 640px) {
    .fone-crop-modal { max-height: 95vh; }
    .fone-crop-foot { flex-wrap: wrap; }
    .fone-crop-foot > div { display: none; }
}

/* ---- RESPONSIVE ----------------------------------------------- */
@media (max-width: 640px) {
    .fone-wrap {
        padding: 18px 16px;
        border-radius: 12px;
    }
    .fone-form-title { font-size: 22px; }
    .fone-step-grid.is-two-col { grid-template-columns: 1fr; }
    .fone-width-half,
    .fone-width-third,
    .fone-width-two-thirds { grid-column: 1 / -1; }
    .fone-submit-btn { padding: 13px 20px; font-size: 15px; }
}

/* =====================================================================
     PULSANTE PAYPAL (campo paypal_button)
===================================================================== */
.fone-paypal-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 8px;
}
.fone-paypal-wrap .fone-paypal-intro {
    margin: 0 0 14px;
    font-size: 14px;
    color: #475569;
    text-align: center;
    font-weight: 500;
}
.fone-paypal-wrap .fone-paypal-container {
    min-height: 48px;
}
.fone-paypal-wrap .fone-paypal-status {
    margin: 12px 0 0;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
    color: #64748b;
}

/* =====================================================================
     CAMPO TELEFONO / WHATSAPP — prefisso + numero
===================================================================== */
.fone-phone-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.fone-phone-wrap .fone-phone-prefix {
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 180px;
    padding: 12px 10px;
    border: 1px solid #e2e8f0;
    border-radius: var(--fone-radius, 10px);
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}
.fone-phone-wrap .fone-phone-number {
    flex: 1 1 auto;
    min-width: 0;
}
.fone-phone-wrap.is-whatsapp .fone-phone-prefix:focus,
.fone-phone-wrap.is-whatsapp .fone-phone-number:focus {
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}
@media (max-width: 520px) {
    .fone-phone-wrap { flex-direction: column; }
    .fone-phone-wrap .fone-phone-prefix { max-width: 100%; }
}

/* =====================================================================
     INDICATORE FORZA PASSWORD
===================================================================== */
.fone-pw-strength {
    margin-top: 6px;
}
.fone-pw-strength-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.fone-pw-strength-fill {
    height: 100%;
    width: 0;
    background: #dc2626;
    transition: width .25s ease, background .25s ease;
}
.fone-pw-strength-label {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
    color: #94a3b8;
}


/* ── Rich success box ─────────────────────────────────── */
.fone-success-rich {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 20px 22px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg,#ecfdf5 0%,#f0fdf4 100%) !important;
    border: 1.5px solid #a7f3d0 !important;
}
.fone-success-icon-wrap {
    flex-shrink: 0;
    line-height: 1;
}
.fone-success-icon-big { font-size: 32px; }
.fone-success-body { flex: 1; }
.fone-success-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: #065f46;
    line-height: 1.3;
}
.fone-success-sub {
    margin: 0 0 12px;
    font-size: 14px;
    color: #047857;
    line-height: 1.5;
}

/* ── Profile button ───────────────────────────────────── */
.fone-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--fone-accent, #4f4f4f);
    color: #fff !important;
    padding: 9px 18px;
    border-radius: var(--fone-radius, 10px);
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: filter .15s;
}
.fone-profile-btn:hover { filter: brightness(1.08); }

/* ── Redirect countdown ───────────────────────────────── */
.fone-redirect-countdown {
    margin: 10px 0 0;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* ── Account avatar change button ────────────────────── */
.fone-account-avatar-field { margin-bottom: 18px; }
.fone-account-avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.fone-account-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}
.fone-change-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

/* ── Login mobile margin ──────────────────────────────── */
@media (max-width: 600px) {
    .fone-login-wrap { margin-top: 55px !important; }
}


/* Form One — extra fields */
.fone-section-divider{padding:16px 0 8px;border-top:1px solid rgba(148,163,184,.35);}
.fone-section-divider strong{display:block;font-size:18px;font-weight:800;color:#0f172a;line-height:1.25;}
.fone-section-divider small{display:block;margin-top:6px;color:#64748b;font-size:13px;line-height:1.45;}
.fone-consent-row{align-items:flex-start;gap:10px;}
.fone-consent-row input{margin-top:4px;}
.fone-range-output{display:inline-flex;margin-top:8px;padding:4px 10px;border-radius:999px;background:#f9fafb;color:#4b5563;font-size:12px;font-weight:700;}
.fone-scale-group{display:flex;flex-wrap:wrap;gap:8px;}
.fone-scale-choice{width:auto;min-width:44px;justify-content:center;}
.fone-field input[type="file"]{width:100%;padding:12px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;}
.fone-field input[type="color"]{width:72px;height:44px;padding:4px;border-radius:10px;border:1px solid #cbd5e1;background:#fff;}


/* ---- PASSWORD TOGGLE ------------------------------------------- */
.fone-password-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.fone-field .fone-password-wrap input[type="password"],
.fone-field .fone-password-wrap input[type="text"] {
    width: 100%;
    padding-right: 48px;
}
.fone-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s, transform .15s;
}
.fone-password-toggle:hover {
    background: rgba(37,99,235,.08);
    color: var(--fone-accent);
}
.fone-password-toggle:focus-visible {
    outline: 2px solid var(--fone-accent);
    outline-offset: 2px;
}
.fone-password-toggle:disabled {
    cursor: default;
    opacity: .65;
}
.fone-password-eye {
    display: block;
    transform: translateY(-1px);
}

/* =====================================================================
    MEDIA QUERY MOBILE — Pagina account v11
   Sotto i 600px di larghezza, la pagina personale scende di 60px
   per non collidere con header/menu mobile.
===================================================================== */
@media (max-width: 600px) {
    .fone-account-wrap {
        margin-top: 60px !important;
    }
}


/* Form One — WhatsApp post-submit */
.fone-whatsapp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:12px;padding:12px 18px;border-radius:999px;background:#22c55e;color:#fff!important;text-decoration:none;font-weight:800;box-shadow:0 10px 26px rgba(34,197,94,.24);transition:transform .15s ease,filter .15s ease}.fone-whatsapp-btn:hover{transform:translateY(-1px);filter:brightness(.96);color:#fff!important}

/* ===================================================================
   Form One — First Yes Mode / Resume Later
=================================================================== */
.fone-first-yes-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #64748b;
}
.fone-wrap[data-fone-first-yes="1"] .fone-step-card:first-of-type .fone-continue-btn {
    box-shadow: 0 10px 24px rgba(37, 99, 235, .14);
}


/* ── Resume Later / Conditional Logic ───────────────────── */
.fone-resume-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: var(--fone-radius, 10px);
  background: rgba(37, 99, 235, .06);
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.4;
}

.fone-resume-notice button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fone-accent, #4f4f4f);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.fone-conditional-hidden {
  display: none !important;
}

/* ===============================================================
   FORM ONE 1.0.0 — Svecchiata frontend/widget Elementor
   Accento grigio scuro, pulsanti più moderni, hover pulito,
   compatibile con il widget Elementor perché agisce sulle classi front.
=============================================================== */
.fone-wrap {
    --fone-accent: #4f4f4f;
    --fone-radius: 14px;
    border: 1px solid rgba(17,24,39,.08);
    box-shadow: 0 18px 50px rgba(17,24,39,.08);
    border-radius: 22px;
}

.fone-wrap .fa-solid,
.fone-wrap .fa-brands {
    line-height: 1;
}

.fone-form-title {
    letter-spacing: -0.025em;
}

.fone-field input[type="text"],
.fone-field input[type="email"],
.fone-field input[type="tel"],
.fone-field input[type="url"],
.fone-field input[type="password"],
.fone-field input[type="number"],
.fone-field input[type="date"],
.fone-field input[type="time"],
.fone-field input[type="color"],
.fone-field select,
.fone-field textarea {
    border-radius: 12px;
    border-color: #d9dee7;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.fone-field input:focus,
.fone-field select:focus,
.fone-field textarea:focus {
    border-color: #4f4f4f !important;
    box-shadow: 0 0 0 4px rgba(55,65,81,.11) !important;
    outline: none !important;
}

.fone-submit-btn,
.fone-continue-btn,
.fone-profile-btn,
.fone-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #4f4f4f !important;
    border-color: #4f4f4f !important;
    color: #fff !important;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(17,24,39,.14);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, filter .18s ease;
}

.fone-submit-btn:hover,
.fone-continue-btn:hover,
.fone-profile-btn:hover,
.fone-whatsapp-btn:hover {
    background: #1f2937 !important;
    border-color: #1f2937 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(17,24,39,.18);
    filter: none !important;
}

.fone-whatsapp-btn {
    background: #2f3a48 !important;
}

.fone-success-icon-big {
    background: #f3f4f6 !important;
    color: #4f4f4f !important;
    border: 1px solid #e5e7eb;
}

.fone-progress-bar > span,
.fone-progress-fill {
    background: #4f4f4f !important;
}

.fone-nps button.is-selected,
.fone-rating .is-selected,
.fone-rating button.is-selected {
    background: #4f4f4f !important;
    border-color: #4f4f4f !important;
    color: #fff !important;
}

.elementor-widget-form_one .fone-wrap,
.elementor-widget-fone_form .fone-wrap,
.elementor-widget-form-one .fone-wrap {
    width: 100%;
}


/* ===============================================================
   FORM ONE 1.0.0 — Elementor core widget cleanup
   - In Elementor preview mostra tutti gli step del form gestito.
   - Le etichette Step sono visibili solo in preview/editor.
   - Rafforza la preview live degli stili del widget Elementor.
=============================================================== */
.fone-wrap.fone-preview-mode .fone-step-card.is-hidden {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.fone-wrap.fone-preview-mode .fone-step-card[aria-hidden="true"] {
    display: block !important;
}

.fone-step-preview-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    margin: 0 0 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4f4f4f;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
}

.fone-step-preview-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #4f4f4f;
}

.fone-wrap:not(.fone-preview-mode) .fone-step-preview-label {
    display: none !important;
}

.elementor-widget-form_one .fone-wrap {
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, border-radius .18s ease, padding .18s ease, max-width .18s ease;
}

.elementor-widget-form_one .fone-field input,
.elementor-widget-form_one .fone-field select,
.elementor-widget-form_one .fone-field textarea,
.elementor-widget-form_one .fone-choice-row,
.elementor-widget-form_one .fone-submit-btn,
.elementor-widget-form_one .fone-continue-btn,
.elementor-widget-form_one .fone-profile-btn {
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, border-radius .18s ease, padding .18s ease, box-shadow .18s ease, transform .18s ease;
}


/* =====================================================================
   Form One 1.0.11 — Account header/avatar responsive refinement
===================================================================== */
.fone-account-wrap {
    margin-top: var(--fone-account-header-offset, 80px) !important;
}
.fone-account-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.fone-account-avatar-control {
    position: relative;
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    background: #f1f5f9;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
.fone-account-avatar-control .fone-account-avatar-img {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 999px;
    object-fit: cover;
}
.fone-account-avatar-change {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 8px;
    background: rgba(15, 23, 42, .76);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}
.fone-account-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.fone-account-heading {
    flex: 1;
    min-width: 0;
}
.fone-account-heading h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}
.fone-account-heading p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
.fone-account-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--fone-radius, 10px);
    color: #334155;
    background: #fff;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}
.fone-account-sessions {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: var(--fone-radius, 12px);
    background: #f8fafc;
}
.fone-account-sessions h3 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 18px;
}
.fone-account-sessions-intro {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.fone-account-session-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 10px;
}
.fone-account-session-card summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #0f172a;
}
.fone-account-session-card summary span {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}
.fone-account-session-card dl {
    margin: 12px 0 0;
}
.fone-account-session-row {
    display: grid;
    grid-template-columns: minmax(120px, 220px) 1fr;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
}
.fone-account-session-row dt {
    color: #64748b;
    font-weight: 800;
    font-size: 12px;
}
.fone-account-session-row dd {
    margin: 0;
    color: #0f172a;
    overflow-wrap: anywhere;
}
@media (max-width: 1024px) {
    .fone-account-wrap {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
@media (max-width: 640px) {
    .fone-account-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .fone-account-avatar-control {
        width: 78px;
        height: 78px;
        flex-basis: 78px;
    }
    .fone-account-logout {
        width: 100%;
    }
    .fone-account-session-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* === Gip 1.0.11C — Blocco HTML utente + altezza campi === */
.fone-html-user-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 10px;
}
.fone-html-user-insert {
    appearance: none;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}
.fone-html-user-insert:hover,
.fone-html-user-insert:focus {
    border-color: var(--fone-accent, #4f4f4f);
    color: var(--fone-accent, #4f4f4f);
    background: #ffffff;
}
.fone-html-user-editor {
    width: 100%;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.fone-field-hidden,
.fone-field-admin-only {
    display: none !important;
}

/* === Gip 1.0.11C — label visibility/position === */
.fone-label-hidden > label,
.fone-label-hidden > .fone-avatar-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.fone-label-left {
    display: grid;
    grid-template-columns: minmax(120px, 28%) 1fr;
    gap: 10px 14px;
    align-items: start;
}
.fone-label-left > label,
.fone-label-left > .fone-avatar-label {
    margin-top: 10px;
}
.fone-label-left > .fone-help,
.fone-label-left > .fone-field-error,
.fone-label-left > .fone-char-count {
    grid-column: 2;
}
@media (max-width: 640px) {
    .fone-label-left {
        display: block;
    }
}
