/* Add/edit SMS line — static version of the project's standard news panels. */
.sms-line-form-card.mud-paper {
    background: #fff !important;
    border: 1px solid #d5d9e0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
    overflow: hidden;
    padding: 0 !important;
}

.sms-line-form-card__header {
    align-items: center;
    background: linear-gradient(100deg, #f0eef8 0%, #f7f6fb 55%, #fff 100%);
    border-bottom: 1px dashed #d1d5db;
    display: flex;
    min-height: 47px;
    padding: 7px 12px;
}

.sms-line-form-card__body {
    background: #fff;
    padding: 14px;
}

.sms-line-form-card .line-settings-grid {
    border-top: 1px solid #eef0f4;
    margin-top: 2px;
    padding-top: 4px;
}

/* Match the boxed access switches used in Users > System information. */
.sms-line-form-card .line-settings-grid > .mud-grid-item {
    align-content: center !important;
    display: flex !important;
    flex: 0 0 25% !important;
    flex-wrap: wrap !important;
    max-width: 25% !important;
    min-height: 54px;
    /* Keep controls 10px inside the box drawn by ::before (8px inset). */
    padding: 6px 18px !important;
    position: relative;
}

.sms-line-form-card .package-active-box {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    /* Match the vertical margins of adjacent dense outlined inputs. */
    margin-top: 8px;
    margin-bottom: 4px;
/*    padding: .35rem .65rem;
*/    display: flex;
    min-height: 40px;
    width: 100%;
}

.sms-line-form-card .package-active-box > .mud-switch {
    align-items: center;
    box-sizing: border-box;
    justify-content: flex-start;
    margin: 0 !important;
    min-height: 38px;
    padding-inline: 14px !important;
    width: 100%;
}

.sms-line-form-card .package-active-box .status-active {
    color: #168447 !important;
    font-weight: 700 !important;
}

.sms-line-form-card .line-settings-grid > .mud-grid-item::before {
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    content: "";
    inset: 6px 8px;
    position: absolute;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
    z-index: 0;
}

.sms-line-form-card .line-settings-grid > .mud-grid-item:has(input:checked)::before {
    background: #f8fafc;
    border-color: #e8edf3;
    box-shadow: none;
}

.sms-line-form-card .line-settings-grid > .mud-grid-item > * {
    position: relative;
    z-index: 1;
}

.sms-line-form-card .line-settings-grid > .mud-grid-item > .mud-switch {
    align-items: center;
    background: transparent;
    border: 0;
    display: flex;
    margin: 0 !important;
    min-height: 42px;
    padding: 6px 10px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.sms-line-form-card .line-settings-grid > .mud-grid-item > .mud-switch:has(input:checked) {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sms-line-form-card .line-settings-grid .status-active {
    color: #424242 !important;
    font-weight: 500 !important;
}

.sms-line-form-card .line-settings-grid .status-inactive {
    color: #424242 !important;
    font-weight: 400 !important;
}

/* Only the main line-status label changes colour, matching the previous UI. */
.sms-line-form-card .line-settings-grid > .mud-grid-item:first-child .status-active {
    color: #168447 !important;
    font-weight: 700 !important;
}

.sms-line-form-card .line-settings-grid .mud-typography-caption {
    font-size: .74rem !important;
    line-height: 1.45 !important;
}

.sms-line-form-card .line-settings-grid label.mud-switch {
    height: auto !important;
    margin-bottom: 0 !important;
}

@media (max-width: 960px) {
    .sms-line-form-card .line-settings-grid > .mud-grid-item {
        flex-basis: 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 600px) {
    .sms-line-form-card__header {
        padding: 8px 10px;
    }

    .sms-line-form-card__body {
        padding: 12px 10px;
    }

    .sms-line-form-card .line-settings-grid > .mud-grid-item {
        flex-basis: 100% !important;
        max-width: 100% !important;
    }
}
