/* Presentation only: the original service options and save action remain in place. */
#modal-servizi.management-modal .modal-dialog {
    margin: 24px auto;
}

#modal-servizi.management-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
}

#modal-servizi.management-modal .modal-header,
#modal-servizi.management-modal .modal-footer {
    flex: 0 0 auto;
}

#modal-servizi.management-modal .modal-header {
    padding: 24px 76px 24px 24px;
}

#modal-servizi.management-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#modal-servizi.management-modal .modal-body:focus-visible {
    outline: 3px solid #287ab9;
    outline-offset: -3px;
}

#modal-servizi.management-modal .modal-footer {
    background: #fff;
    border-radius: 0 0 18px 18px;
}

#modal-servizi .customer-service-labels[hidden] {
    display: none;
}

#modal-servizi .customer-services-options {
    margin: 0;
}

#modal-servizi .customer-services-options > table.ios-switch {
    width: 100%;
    margin: 0;
}

#modal-servizi .customer-services-grouped {
    display: block;
}

#modal-servizi .customer-service-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid #dce7ee;
    border-radius: 14px;
    background: #f6f9fb;
}

#modal-servizi .customer-service-group:last-child {
    margin-bottom: 0;
}

#modal-servizi .customer-service-heading {
    display: block;
    grid-column: 1 / -1;
}

#modal-servizi .customer-service-heading > th {
    display: block;
    padding: 0 0 4px;
    border: 0;
}

#modal-servizi .customer-service-heading h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #173c56;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    text-align: start;
}

#modal-servizi .customer-service-heading .fa {
    flex: 0 0 22px;
    color: #426b88;
    text-align: center;
}

#modal-servizi .customer-service-option {
    display: block;
    min-width: 0;
}

#modal-servizi .customer-service-option > td {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 54px;
    padding: 12px;
    border: 1px solid #dfe7ed;
    border-radius: 10px;
    background: #fff;
}

/* WebForms renders ListItem attributes on a span around input and label. */
#modal-servizi .customer-services-options td > span:not(.switchery) {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

#modal-servizi .customer-service-option .switchery {
    flex: 0 0 auto;
    margin: 0;
}

#modal-servizi .customer-service-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #003c70;
}

#modal-servizi .customer-service-option label {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    text-align: start;
}

#modal-servizi .customer-service-option label,
#modal-servizi .customer-service-option label strong {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
}

#modal-servizi .customer-service-option:has(input:checked) > td {
    border-color: #abc6db;
    background: #eaf3fa;
}

#modal-servizi .customer-service-option:has(input:checked) label strong {
    color: #173c56;
    font-weight: 600;
}

#modal-servizi .customer-service-option:focus-within > td {
    outline: 3px solid #287ab9;
    outline-offset: 2px;
}

@media (min-width: 768px) {
    #modal-servizi .customer-service-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px), (max-height: 480px) {
    #modal-servizi.management-modal .modal-dialog {
        margin: 12px auto;
    }

    #modal-servizi.management-modal .modal-content {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }

    #modal-servizi.management-modal .modal-header {
        min-height: 76px;
        padding: 20px 72px 20px 20px;
    }

    #modal-servizi .customer-service-group {
        padding: 12px;
    }
}
