/* ============================================
   YACHT CF7 QUOTE MODAL - Compatto v5
   ============================================ */

/* Modal Overlay */
.yacht-cf7-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.yacht-cf7-modal.active {
    opacity: 1;
    visibility: visible;
}
.yacht-cf7-modal-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Container - PIU COMPATTO */
.yacht-cf7-modal-container {
    position: relative;
    background: linear-gradient(90deg, rgba(23, 61, 106, 1) 38%, rgba(15, 40, 70, 1) 49.9%, rgba(23, 61, 106, 1) 50%, rgba(15, 40, 70, 1) 62%);
    border-radius: 12px;
    width: 100%;
    max-width: 1000px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 0 50px 30px 50px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.yacht-cf7-modal.active .yacht-cf7-modal-container {
    transform: translateY(0);
}

/* Badge header */
.yacht-cf7-modal-header {
    text-align: center;
    margin-bottom: 0;
}
.yacht-cf7-modal-header h2 {
    display: inline-block;
    background: #f5f0e8;
    padding: 14px 50px;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #173d6a;
    text-transform: uppercase;
    margin: 0;
    border-radius: 0;
    border: none;
}

/* Close */
.yacht-cf7-modal-close {
    position: absolute;
    top: 18px; right: 22px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 10;
    line-height: 1;
    padding: 0;
}
.yacht-cf7-modal-close:hover { opacity: 1; }

/* Subtitle - COMPATTO */
.yacht-cf7-modal-subtitle {
    text-align: center;
    font-family: Inter, Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff !important;
    margin: 0 0 25px 0;
    letter-spacing: 0.3px;
    background: none !important;
    padding: 0;
    border-radius: 0;
    border: none;
}

/* ============================================
   RESET
   ============================================ */
.yacht-cf7-modal .wpcf7-form br { display: none !important; }
.yacht-cf7-modal .wpcf7-form p { margin: 0; padding: 0; }
.yacht-cf7-modal .wpcf7-form-control-wrap { display: block; width: 100%; }
.yacht-cf7-modal * { box-sizing: border-box; }

/* Kill bordi ovunque */
.yacht-cf7-modal .yacht-cf7-field,
.yacht-cf7-modal .yacht-cf7-ports-row,
.yacht-cf7-modal .yacht-cf7-dates-row,
.yacht-cf7-modal .yacht-cf7-adults-row,
.yacht-cf7-modal .yacht-cf7-phone-row,
.yacht-cf7-modal .yacht-cf7-prefix,
.yacht-cf7-modal .yacht-cf7-cellphone,
.yacht-cf7-modal .yacht-cf7-left,
.yacht-cf7-modal .yacht-cf7-right,
.yacht-cf7-modal .yacht-cf7-quote-form,
.yacht-cf7-modal .wpcf7-form-control-wrap,
.yacht-cf7-modal .wpcf7-form-control,
.yacht-cf7-modal span.wpcf7-form-control-wrap,
.yacht-cf7-modal p,
.yacht-cf7-modal div:not(.yacht-cf7-modal-container) {
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ============================================
   LAYOUT 2 COLONNE - gap ridotto
   ============================================ */
.yacht-cf7-quote-form {
    display: flex;
    gap: 30px;
}
.yacht-cf7-left { flex: 1; }
.yacht-cf7-right { flex: 1; }

/* ============================================
   INPUT - bianchi, ZERO bordi
   ============================================ */
.yacht-cf7-modal input[type="text"],
.yacht-cf7-modal input[type="email"],
.yacht-cf7-modal input[type="tel"],
.yacht-cf7-modal textarea,
.yacht-cf7-modal select {
    width: 100% !important;
    padding: 14px 15px !important;
    background: #fff !important;
    background-color: #fff !important;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    color: #173d6a !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    outline: none !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
    height: auto !important;
    line-height: normal !important;
}
.yacht-cf7-modal input::placeholder,
.yacht-cf7-modal textarea::placeholder {
    color: #173d6a !important;
    opacity: 0.6 !important;
}
.yacht-cf7-modal input:focus,
.yacht-cf7-modal textarea:focus,
.yacht-cf7-modal select:focus {
    box-shadow: 0 0 0 2px #4ecdc4 !important;
    border: none !important;
}

/* Textarea PIU BASSA */
.yacht-cf7-modal textarea {
    resize: vertical;
    min-height: 80px !important;
    max-height: 120px;
    height: 80px !important;
}

/* Select */
.yacht-cf7-modal select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23173d6a'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
    padding-right: 35px !important;
}

/* ============================================
   COLONNA SINISTRA - margini ridotti
   ============================================ */
.yacht-cf7-left .wpcf7-form-control-wrap {
    margin-bottom: 10px;
}

/* Phone row */
.yacht-cf7-phone-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.yacht-cf7-prefix { flex: 0 0 90px; }
.yacht-cf7-cellphone { flex: 1; }

/* ============================================
   COLONNA DESTRA - floating labels BLU SCURO
   ============================================ */
.yacht-cf7-field {
    position: relative;
    margin-bottom: 10px;
    background: transparent !important;
    padding: 0 !important;
}

/* LABEL - blu scuro #173d6a */
.yacht-cf7-field label {
    position: absolute;
    top: 5px;
    left: 15px;
    font-family: Inter, Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #173d6a;
    pointer-events: none;
    z-index: 2;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}
.yacht-cf7-field .wpcf7-form-control-wrap {
    margin-bottom: 0 !important;
}
.yacht-cf7-field input[type="text"],
.yacht-cf7-field select {
    padding: 26px 15px 8px 15px !important;
}

/* Ports row - gap ridotto */
.yacht-cf7-ports-row {
    display: flex;
    gap: 10px;
}
.yacht-cf7-ports-row > .yacht-cf7-field { flex: 1; }

/* Dates row - compatto */
.yacht-cf7-dates-row {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
}
.yacht-cf7-dates-row > .yacht-cf7-field { flex: 1; }
.yacht-cf7-dates-row .yacht-cf7-field label {
    top: 8px;
    font-size: 9px;
}
.yacht-cf7-dates-row .yacht-cf7-field input[type="text"] {
    padding: 34px 15px 10px 15px !important;
}

/* Adults - compatto */
.yacht-cf7-adults-row { max-width: 150px; }
.yacht-cf7-adults-row .yacht-cf7-field select {
    padding: 26px 15px 8px 15px !important;
}

/* ============================================
   CHECKBOXES
   ============================================ */
.yacht-cf7-modal .wpcf7-acceptance {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff !important;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
}
.yacht-cf7-modal .wpcf7-acceptance input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    accent-color: #4ecdc4;
    flex-shrink: 0;
    border-radius: 2px !important;
}
.yacht-cf7-modal .wpcf7-acceptance .wpcf7-list-item-label,
.yacht-cf7-modal .wpcf7-acceptance span {
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    color: #ffffff !important;
    line-height: 1.4;
}
.yacht-cf7-modal .wpcf7-acceptance a {
    color: #4ecdc4 !important;
    text-decoration: underline;
}
.yacht-cf7-right .wpcf7-acceptance { margin-top: 15px; }

/* ============================================
   SUBMIT - compatto
   ============================================ */
.yacht-cf7-modal .wpcf7-submit,
.yacht-cf7-modal input[type="submit"] {
    display: inline-block !important;
    padding: 1rem 3rem !important;
    background: #4ecdc4 !important;
    background-color: #4ecdc4 !important;
    color: #fff !important;
    border: none !important;
    border-width: 0 !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    width: 260px !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4) !important;
    border-radius: 0 !important;
    margin: 0 auto !important;
    -webkit-appearance: none !important;
    height: auto !important;
}
.yacht-cf7-modal .wpcf7-submit:hover { background: #3dbdb5 !important; }
.yacht-cf7-modal .wpcf7-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.yacht-cf7-modal .wpcf7-form > p:last-of-type,
.yacht-cf7-modal-body > .wpcf7 > form > p:last-of-type {
    text-align: center;
    margin-top: 25px !important;
    margin-bottom: 1rem !important;
}

/* CF7 Messages */
.yacht-cf7-modal .wpcf7-response-output {
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    margin: 10px 0 0 !important;
    padding: 10px !important;
}
.yacht-cf7-modal .wpcf7 form.sent .wpcf7-response-output {
    border-color: #4ecdc4 !important;
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
}
.yacht-cf7-modal .wpcf7 form.failed .wpcf7-response-output {
    border-color: #ff6b6b !important;
    color: #ff6b6b;
}
.yacht-cf7-modal .wpcf7-not-valid-tip { font-size: 12px; color: #ff6b6b; margin-top: 3px; }
.yacht-cf7-modal .wpcf7-not-valid { box-shadow: 0 0 0 2px #ff6b6b !important; }
.yacht-cf7-modal .wpcf7-spinner { display: block; margin: 8px auto 0; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 800px) {
    .yacht-cf7-modal {
        padding: 0;
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .yacht-cf7-modal-container {
        padding: 0 15px 20px 15px;
        border-radius: 0;
        max-height: none;
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
    }
    .yacht-cf7-modal-header { padding-top: 15px; padding-bottom: 8px; }
    .yacht-cf7-modal-header h2 { padding: 10px 20px; font-size: 9px; letter-spacing: 2px; }
    .yacht-cf7-modal-subtitle { font-size: 12px; padding: 0 10px; margin-top: 8px; margin-bottom: 12px; }
    .yacht-cf7-quote-form { flex-direction: column; gap: 0; margin-top: 8px; }
    .yacht-cf7-left, .yacht-cf7-right { flex: 1 1 100%; }
    .yacht-cf7-phone-row { flex-direction: row !important; gap: 8px !important; }
    .yacht-cf7-prefix { flex: 0 0 90px !important; }
    .yacht-cf7-cellphone { flex: 1 !important; }
    .yacht-cf7-ports-row { flex-direction: column; gap: 8px; }
    .yacht-cf7-dates-row { flex-direction: row !important; gap: 8px !important; margin-top: 5px; margin-bottom: 5px; }
    .yacht-cf7-dates-row > .yacht-cf7-field { flex: 1 1 calc(50% - 4px) !important; }
    .yacht-cf7-dates-row .yacht-cf7-field input[type="text"] { padding: 26px 8px 6px 8px !important; font-size: 14px !important; }
    .yacht-cf7-dates-row .yacht-cf7-field label { font-size: 7px !important; top: 4px !important; left: 8px !important; }
    .yacht-cf7-field { margin-bottom: 8px; }
    .yacht-cf7-adults-row { max-width: 50%; }
    .yacht-cf7-left .wpcf7-form-control-wrap { margin-bottom: 8px; }
    .yacht-cf7-modal input[type="text"],
    .yacht-cf7-modal input[type="email"],
    .yacht-cf7-modal input[type="tel"],
    .yacht-cf7-modal select { font-size: 16px !important; padding: 12px 10px !important; }
    .yacht-cf7-modal textarea { font-size: 16px !important; padding: 10px !important; min-height: 60px !important; height: 60px !important; }
    .yacht-cf7-field select { padding: 22px 10px 8px 10px !important; }
    .yacht-cf7-field label { top: 5px; font-size: 8px; }
    .yacht-cf7-modal .wpcf7-acceptance { font-size: 11px; margin-top: 8px; gap: 8px; }
    .yacht-cf7-modal .wpcf7-acceptance input[type="checkbox"] { width: 16px !important; height: 16px !important; min-width: 16px !important; min-height: 16px !important; }
    .yacht-cf7-left .wpcf7-acceptance { margin-bottom: 12px; }
    .yacht-cf7-modal .wpcf7-submit { width: 100% !important; padding: 0.9rem 1.5rem !important; font-size: 0.9rem !important; }
    .yacht-cf7-modal .wpcf7-form > p:last-of-type { margin-top: 12px !important; margin-bottom: 8px !important; }
    .yacht-cf7-modal-close { top: 8px; right: 8px; width: 32px; height: 32px; font-size: 22px; }
}

@media (max-width: 400px) {
    .yacht-cf7-modal-container { padding: 0 10px 15px 10px; }
    .yacht-cf7-modal-header { padding-top: 35px; }
    .yacht-cf7-modal-header h2 { padding: 8px 15px; font-size: 8px; }
    .yacht-cf7-modal-subtitle { font-size: 11px; }
    .yacht-cf7-field { margin-bottom: 6px; }
    .yacht-cf7-modal input[type="text"],
    .yacht-cf7-modal input[type="email"],
    .yacht-cf7-modal input[type="tel"],
    .yacht-cf7-modal select { padding: 10px 8px !important; }
    .yacht-cf7-modal textarea { min-height: 50px !important; height: 50px !important; }
    .yacht-cf7-dates-row { gap: 6px !important; }
    .yacht-cf7-dates-row > .yacht-cf7-field { flex: 1 1 calc(50% - 3px) !important; }
}
.yacht-cf7-modal .yacht-cf7-right .yacht-cf7-field label,
.yacht-cf7-modal .yacht-cf7-ports-row .yacht-cf7-field label,
.yacht-cf7-modal .yacht-cf7-dates-row .yacht-cf7-field label,
.yacht-cf7-modal .yacht-cf7-adults-row .yacht-cf7-field label {
    color: #173d6a !important;
}

.yacht-cf7-modal .yacht-cf7-field label,
.yacht-cf7-modal .yacht-cf7-prefix label {
    color: #173d6a !important;
}
.yacht-cf7-modal .yacht-cf7-prefix select,
.yacht-cf7-modal .yacht-cf7-field select,
.yacht-cf7-modal .yacht-cf7-field input {
    color: #173d6a !important;
}