/* Modale contatti riusabile (includes/contact-modal.php) */
body.cmodal-open { overflow: hidden; }
.cmodal[hidden] { display: none; }
.cmodal {
    position: fixed; inset: 0; z-index: 10050;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; transition: opacity .18s ease;
}
.cmodal.is-open { opacity: 1; }
.cmodal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cmodal-card {
    position: relative;
    width: 100%; max-width: 620px; max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 40px 40px 32px;
    border-radius: 24px;
    background: linear-gradient(165deg, #1b1b21 0%, #111114 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 40, 40, .08);
    color: #f8fafc;
    transform: translateY(14px) scale(.985); transition: transform .2s ease;
}
.cmodal.is-open .cmodal-card { transform: none; }
.cmodal-x {
    position: absolute; top: 16px; right: 16px;
    width: 38px; height: 38px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    color: #cbd5e1; transition: background .15s ease, color .15s ease;
}
.cmodal-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.cmodal-x svg { width: 18px; height: 18px; }
.cmodal-title {
    font-family: var(--font-display, inherit);
    font-size: 1.7rem; font-weight: 700; line-height: 1.2;
    margin: 0 44px 8px 0; color: #fff;
}
.cmodal-subtitle { margin: 0 0 22px; font-size: .98rem; line-height: 1.6; color: #b6bfcc; }
.cmodal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmodal-field { margin-bottom: 16px; }
.cmodal-field label {
    display: block; margin-bottom: 6px;
    font-size: .86rem; font-weight: 600; color: #e2e8f0;
}
.cmodal-field label span { color: #ff5a5a; }
.cmodal-field input,
.cmodal-field textarea {
    width: 100%; box-sizing: border-box;
    padding: 12px 14px;
    font: inherit; font-size: 16px; color: #f8fafc;
    background: rgba(255, 255, 255, .04);
    border: 1.5px solid rgba(255, 255, 255, .13);
    border-radius: 12px; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cmodal-field textarea { resize: vertical; min-height: 104px; }
.cmodal-field input::placeholder,
.cmodal-field textarea::placeholder { color: #6b7686; }
.cmodal-field input:focus,
.cmodal-field textarea:focus { border-color: #ff4d4d; box-shadow: 0 0 0 4px rgba(255, 60, 60, .14); }
.cmodal-field .is-bad { border-color: #ff5a5a; }
.cmodal-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cmodal-errors {
    margin: 0 0 18px; padding: 12px 16px 12px 32px;
    border-radius: 12px; font-size: .9rem; line-height: 1.5;
    background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .4); color: #fecaca;
}
.cmodal-errors[hidden] { display: none; }
.cmodal-submit { width: 100%; justify-content: center; margin-top: 4px; cursor: pointer; }
.cmodal-submit[disabled] { opacity: .65; cursor: wait; }
.cmodal-privacy { margin: 14px 0 0; font-size: .78rem; line-height: 1.5; color: #8b95a5; text-align: center; }
.cmodal-privacy a { color: #cbd5e1; text-decoration: underline; }
.cmodal-ok-view { text-align: center; padding: 12px 0 4px; }
.cmodal-ok-view[hidden], .cmodal-form-view[hidden] { display: none; }
.cmodal-ok-view .cmodal-title { margin: 0 0 10px; }
.cmodal-ok-icon {
    width: 72px; height: 72px; margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(16, 185, 129, .14); color: #34d399;
}
.cmodal-ok-icon svg { width: 36px; height: 36px; }
@media (max-width: 600px) {
    .cmodal { padding: 0; align-items: flex-end; }
    .cmodal-card { max-width: none; max-height: 94vh; padding: 30px 20px 24px; border-radius: 22px 22px 0 0; }
    .cmodal-row { grid-template-columns: 1fr; gap: 0; }
    .cmodal-title { font-size: 1.4rem; }
}
