/* ── Modal overlay ── */
#hn-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
#hn-modal.is-open {
    display: flex;
}
body.hn-modal-open {
    overflow: hidden;
}

/* ── Modal box ── */
#hn-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: hn-slide-in .25s ease;
}
@keyframes hn-slide-in {
    from { opacity:0; transform: translateY(-20px); }
    to   { opacity:1; transform: translateY(0); }
}

/* ── Close button ── */
#hn-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 50%;
    transition: color .2s, background .2s;
}
#hn-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

/* ── Titolo e testo ── */
#hn-modal-title {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin: 0 0 10px;
}
#hn-step-form > p {
    color: #666;
    font-size: .95rem;
    margin-bottom: 22px;
}

/* ── Campi ── */
.hn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.hn-field {
    margin-bottom: 16px;
}
.hn-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 5px;
}
.hn-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: .95rem;
    transition: border-color .2s;
    box-sizing: border-box;
}
.hn-field input:focus {
    outline: none;
    border-color: #c9a84c;
}

/* ── Privacy ── */
.hn-privacy {
    font-size: .75rem;
    color: #999;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* ── Messaggi ── */
.hn-msg {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: .9rem;
}
.hn-msg-error   { background: #fde8e8; color: #c0392b; border-left: 3px solid #c0392b; }
.hn-msg-success { background: #e8f8ef; color: #27ae60; border-left: 3px solid #27ae60; }
.hn-result-success { color: #27ae60; }
.hn-result-error   { color: #c0392b; }
.hn-result-info    { color: #2471a3; }

/* ── Mobile ── */
@media (max-width: 500px) {
    #hn-modal-box { padding: 28px 20px 24px; }
    .hn-row { grid-template-columns: 1fr; gap: 0; }
}
