/* HG Connect — shared contact/profile form, all page contexts.
   Moved from includes/shared/contact-form.php without changing its forms or actions.
   Presentation only; PHP/JS retain stateful display of conditional fields. */
    .hg-contact-shared-form .hg-phone-numbers-group .hg-phone-row {
        margin-top: 10px;
    }

    .hg-contact-shared-form .hg-phone-numbers-group .hg-phone-row:first-child {
        margin-top: 8px;
    }

    .hg-contact-shared-form .hg-phone-numbers-group .hg-remove-phone-row {
        height: 42px;
        min-height: 42px;
        min-width: 42px;
        padding: 0;
        font-size: 18px;
        line-height: 1;
    }

    /* NOUVEAU: Community select styles */
    .hg-contact-shared-form .hg-community-select-group select.hg-community-select {
        width: 100%;
        padding: 10px 14px;
        border: 2px solid #d9e6f8;
        border-radius: 6px;
        font-size: 14px;
        font-family: 'Montserrat', sans-serif;
        background: #fff;
        transition: border-color 0.3s ease;
    }
    
    .hg-contact-shared-form .hg-community-select-group select.hg-community-select:focus {
        border-color: #001d6e;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0,29,110,0.1);
    }
    
    .hg-contact-shared-form .hg-community-select-group select.hg-community-select:invalid,
    .hg-contact-shared-form .hg-community-select-group select.hg-community-select.is-invalid {
        border-color: #dc3232;
    }
    
    
    
    
    
    /* NOUVEAU: Save Contact Flow Info */
    
    
    /* Responsive pour petits écrans */
    @media (max-width: 600px) {
        .hg-contact-shared-form .hg-phone-numbers-group .hg-phone-row > div {
            grid-template-columns: 1fr;
            gap: 6px;
        }

        .hg-contact-shared-form .hg-phone-numbers-group .hg-remove-phone-row {
            width: 100%;
        }

        .hg-contact-shared-form .hg-form-actions {
            flex-direction: column;
        }

        .hg-contact-shared-form .hg-form-actions .hg-button {
            width: 100%;
            justify-content: center;
        }

        /* Deux colonnes pour nom/prénom sur mobile */
        .hg-contact-shared-form .hg-profile-name-grid {
            grid-template-columns: 1fr;
            gap: 0;
        }
    }

    /* Petits écrans très petits */
    @media (max-width: 400px) {
        .hg-contact-shared-form .hg-phone-numbers-group .hg-phone-row > div {
            gap: 4px;
        }

        .hg-contact-shared-form .hg-phone-numbers-group .hg-phone-code-select {
            font-size: 12px;
            padding: 6px 8px;
        }

        .hg-contact-shared-form .hg-phone-numbers-group .hg-phone-field {
            font-size: 13px;
            padding: 6px 8px;
        }

        .hg-contact-shared-form .hg-phone-numbers-group .hg-remove-phone-row {
            height: 34px;
            min-height: 34px;
            font-size: 16px;
        }
    }


/* Existing decorative inline attributes moved into the component. */
.hg-contact-shared-form .hg-required-star { color:#dc3232; }
.hg-contact-shared-form .hg-community-error-message { color:#dc3232; font-size:13px; margin-top:5px; }
.hg-contact-shared-form .hg-community-warning,
.hg-contact-shared-form .hg-bt-profile-community,
.hg-contact-shared-form .hg-save-contact-flow-info { padding:12px 16px; border-radius:6px; margin-bottom:15px; }
.hg-contact-shared-form .hg-community-warning { background:#fff3cd; border-left:4px solid #ffc107; }
.hg-contact-shared-form .hg-community-warning-title { margin:0; color:#856404; font-weight:600; }
.hg-contact-shared-form .hg-community-warning-copy { margin:5px 0 0; color:#856404; font-size:13px; }
.hg-contact-shared-form .hg-bt-profile-community,
.hg-contact-shared-form .hg-save-contact-flow-info,
.hg-contact-shared-form .hg-community-summary { background:#e8f4fd; border-left:4px solid #001d6e; }
.hg-contact-shared-form .hg-profile-context-title { margin:0; font-size:13px; color:#001d6e; }
.hg-contact-shared-form .hg-profile-context-copy { margin:5px 0 0; font-size:12px; color:#5f6f89; }
.hg-contact-shared-form .hg-profile-context-copy--manager { margin-top:4px; }
.hg-contact-shared-form .hg-profile-name-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.hg-contact-shared-form .hg-phone-row-fields { display:grid; grid-template-columns:100px 1fr 90px auto; gap:8px; align-items:center; }
.hg-contact-shared-form .hg-phone-warning { color:#dc3232; }
.hg-contact-shared-form .hg-phone-warning:empty { display:none; }
.hg-contact-shared-form .hg-phone-warning:not(:empty) { display:block; }
.hg-contact-shared-form .hg-add-phone-row {
    display:flex;
    align-items:center;
    justify-content:center;
    width:min(100%,340px);
    max-width:100%;
    min-height:36px;
    box-sizing:border-box;
    margin:12px auto 0;
    text-align:center;
}
/* Edit My Profile only: align with the full width of the Phone Numbers inputs.
   Save Contact and other shared-form contexts keep their existing button layout. */
#hg-edit-profile-modal .hg-contact-shared-form .hg-phone-numbers-group > .hg-add-phone-row,
#hg-member-edit-profile-modal .hg-contact-shared-form .hg-phone-numbers-group > .hg-add-phone-row {
    display: flex;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 12px auto 0;
    justify-content: center;
}
.hg-contact-shared-form .hg-consent-label { display:flex; align-items:center; gap:10px; cursor:pointer; font-weight:normal; }
.hg-contact-shared-form .hg-community-summary { padding:10px 14px; border-radius:6px; margin-bottom:15px; background:#e8f4fd; border-left:4px solid #001d6e; }
.hg-contact-shared-form .hg-community-summary .hg-profile-context-copy { margin-top:2px; }
