/* =========================================================
   PAGE SCOPE
   ========================================================= */

.custom-table {
    font-family: Arial, sans-serif;
    color: #222;
    background-color: #ffffff;
    padding: 20px;
}

/* =========================================================
   FORM LAYOUT / LABEL ALIGNMENT
   ========================================================= */

.custom-table .form-group .d-flex {
    align-items: center;
}

.custom-table .form-check-label {
    min-width: 180px;
    text-align: right;
    margin-right: 12px;
    font-weight: bold;
    color: #000;
    white-space: nowrap;
}

/* Helper text under label */
.custom-table .sanitize-help {
    font-weight: normal;
    font-style: italic;
    font-size: 13px;
    color: #555;
    margin-left: 4px;
}

/* =========================================================
   CUSTOM TOGGLE SWITCH (CHECKBOX)
   ========================================================= */

.custom-table .switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.custom-table .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-table .slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border: 2px solid #000;
    border-radius: 24px;
    transition: 0.25s ease-in-out;
}

.custom-table .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border: 2px solid #000;
    border-radius: 50%;
    transition: 0.25s ease-in-out;
}

/* Checked state */
.custom-table .switch input[type="checkbox"]:checked ~ .slider {
    background-color: #000;
}

.custom-table .switch input[type="checkbox"]:checked ~ .slider::before {
    transform: translateX(22px);
}

/* Focus / accessibility */
.custom-table .switch input:focus + .slider {
    box-shadow: 0 0 0 0.15rem rgba(0, 0, 0, 0.25);
}

/* Make entire control clickable */
.custom-table .switch,
.custom-table .switch * {
    cursor: pointer;
}

/* =========================================================
   BUTTONS (LOCAL ONLY)
   ========================================================= */

.custom-table button {
    margin: 6px;
    padding: 10px 20px;
    background-color: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.custom-table button:hover {
    background-color: #333;
    border-color: #000;
}

/* =========================================================
   TABLE STYLES (STRICTLY SCOPED)
   ========================================================= */

.custom-table .custom-mapper-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    border-bottom: 3px solid #000;
}

.custom-table .custom-mapper-table th,
.custom-table .custom-mapper-table td {
    border: 1px solid #000;
    padding: 10px;
    text-align: center;
}

.custom-table .custom-mapper-table th {
    background-color: #000;
    color: #fff;
    text-transform: uppercase;
}

.custom-table .custom-mapper-table td {
    background-color: #f4f4f4;
}

.custom-table .custom-mapper-table tbody tr:last-child td {
    border-bottom: 3px solid #000;
}

/* =========================================================
   INPUTS — BOOTSTRAP OVERRIDES
   ========================================================= */

.custom-table input.form-control,
.custom-table select.form-control {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000 !important;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
}

.custom-table input.form-control:focus,
.custom-table select.form-control:focus {
    border-color: #333 !important;
    box-shadow: 0 0 0 0.15rem rgba(0, 0, 0, 0.25) !important;
    outline: none;
}

/* =========================================================
   PRIMARY SAVE BUTTON
   ========================================================= */

.custom-table .btn-primary {
    background-color: #000 !important;
    border-color: #000 !important;
    color: #fff !important;
    height: 50px;
    width: 300px;
    font-weight: bold;
    font-size: 16px;
}

.custom-table .btn-primary:hover {
    background-color: #333 !important;
    border-color: #333 !important;
}

/* =========================================================
   ALERT / MISC CLEANUP
   ========================================================= */

.custom-table .alert {
    max-width: 600px;
    margin: 0 auto 20px;
}

.custom-table .save-config-wrapper {
    position: sticky;
    bottom: 0;
    background-color: #ffffff;
    padding: 15px 0;
    border-top: 2px solid #000;
    margin-top: 30px;
    z-index: 10;
    text-align: right;
}