/* A row's action menu must not be clipped by its scrolling table, even with a single record. */
.table-responsive:has(.dropdown-menu.show) {
    overflow: visible;
}

/* A small switch with no text: green and knob right is on, red and knob left is off. */
input[switch] + label {
    width: 36px;
    height: 20px;
    padding: 0;
    margin-bottom: 0;
    vertical-align: middle;
}
input[switch] + label:before,
input[switch]:checked + label:before {
    display: none;
}
input[switch] + label:after {
    width: 14px;
    height: 14px;
    top: 3px;
    left: 3px;
}
input[switch]:checked + label:after {
    left: 19px;
}

/* Scheme rates form. */
.rate-table th {
    font-size: 12px;
    font-weight: 600;
    color: #74788d;
    padding-top: 0;
    border-bottom: 1px solid #eff2f7;
}
.rate-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}
.rate-table tbody tr + tr td {
    border-top: 1px solid #f5f6f8;
}
.rate-col-slab { width: 30%; }
.rate-col-entry { width: 22%; }
.rate-col-rate { width: 17%; }
.rate-col-value { width: 19%; }
.rate-col-gst { width: 12%; }

/* Toast messages, above popups. */
#app-toasts {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
}
.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.app-toast-success { background-color: #1f9d6f; }
.app-toast-error { background-color: #d9413f; }
.app-toast-warning { background-color: #b7791f; }
.app-toast-info { background-color: #3b6fd4; }
.app-toast-text {
    flex: 1;
    overflow-wrap: anywhere;
}
.app-toast-close {
    border: 0;
    background: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

/* JSON in a log table: fixed size, scrolling inside its own box. */
.json-box {
    position: relative;
    width: 420px;
    max-width: 70vw;
}
.json-content {
    max-height: 220px;
    margin: 0;
    padding: 36px 12px 12px;
    overflow: auto;
    white-space: pre;
    font-size: 12px;
    line-height: 1.5;
    color: #343a40;
    background-color: #f5f6f8;
    border: 1px solid #e9ebef;
    border-radius: 6px;
}
.json-copy {
    position: absolute;
    top: 4px;
    right: 18px;
    z-index: 1;
    padding: 1px 8px;
    font-size: 11px;
    border: 1px solid #ced4da;
}
