@import url('https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Sorts+Mill+Goudy:ital@0;1&display=swap');

.zmc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.zmc-modal-overlay.is-open {
    display: flex;
}

.zmc-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 860px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: zmcFadeIn 0.3s ease;
}

@keyframes zmcFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zmc-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none !important;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    padding: 4px 8px;
}

.zmc-modal-close:hover {
    background: none !important;
    color: #fff;
}

.zmc-modal-body {
    display: flex;
    flex-wrap: wrap;
    font-family: 'Rethink Sans', sans-serif;
}

.zmc-modal-left {
    flex: 1 1 50%;
    padding: 20px 25px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.zmc-modal-form {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.zmc-modal-title {
    font-family: 'Rethink Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.zmc-modal-form .wpcf7-form > p:first-child {
    display: none;
}

.zmc-modal-form .wpcf7-form label {
    display: block;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    margin-bottom: 2px;
}

.zmc-modal-form .wpcf7-form input[type="text"],
.zmc-modal-form .wpcf7-form input[type="email"],
.zmc-modal-form .wpcf7-form input[type="tel"],
.zmc-modal-form .wpcf7-form textarea {
    font-family: 'Rethink Sans', sans-serif;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.zmc-modal-form .wpcf7-form input:focus,
.zmc-modal-form .wpcf7-form textarea:focus {
    border-color: #1a1a2e;
    outline: none;
}

.zmc-modal-form .wpcf7-form textarea {
    min-height: 40px;
    resize: vertical;
}

.zmc-modal-form .wpcf7-form input[type="submit"] {
    font-family: 'Rethink Sans', sans-serif;
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 9px 24px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.zmc-modal-form .wpcf7-form input[type="submit"]:hover {
    background: #333;
}

.zmc-modal-form .wpcf7-acceptance {
    margin-bottom: 8px;
}

.zmc-modal-form .wpcf7-acceptance label {
    display: inline !important;
    font-weight: 400;
    font-size: 12px;
    color: #777;
    margin-left: 6px;
}

.zmc-modal-form .wpcf7-acceptance input[type="checkbox"] {
    margin: 0;
}

.zmc-modal-form .wpcf7-not-valid-tip {
    font-size: 12px;
    color: #c0392b;
    margin-top: -8px;
    margin-bottom: 8px;
}

.zmc-modal-form .wpcf7-response-output {
    margin: 16px 0 0;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
}

.zmc-modal-right {
    flex: 1 1 50%;
    background: #1a1a2e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 25px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.zmc-modal-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.zmc-modal-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    background-image: url('../img/avvocato.jpg');
    background-size: cover;
    background-position: center 20%;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .zmc-modal-overlay {
        overflow-y: auto;
        align-items: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .zmc-modal-body {
        flex-direction: column;
    }

    .zmc-modal-left {
        flex: 1 1 100%;
        padding: 30px 20px;
    }

    .zmc-modal-right {
        display: none;
    }

    .zmc-modal {
        max-height: none;
        overflow-y: visible;
        margin: 0;
    }

    .zmc-modal-close {
        color: #333;
    }

    .zmc-modal-close:hover {
        color: #333;
    }
}
