/* File: wwwroot/css/device-forms.css                                        */
/* Shared styling for compact device/channel/alarm edit forms                */
/* (Views/Devices/_RenderDeviceChannel, _RenderChannelAlarmDigital,          */
/*  _RenderChannelAlarmBattery, _RenderChannelAlarmAnalog, ... and future    */
/*  device edit templates built the same way).                              */

/* ── Subheadings used to group fields into sections ("Details", "Geo", …) ── */
.alarm-section-title {
    color: #999;
    letter-spacing: .05em;
    font-size: .75rem;
    margin: 1rem 0 .5rem 0;
}

.alarm-section-title:first-child {
    margin-top: 0;
}

/* ── Compact checkbox flag grid ─────────────────────────────────────────── */
.alarm-flag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.5rem;
}

.alarm-flag {
    display: flex;
    align-items: center;
    min-width: 140px;
}

.alarm-flag .form-check-input {
    position: static;
    margin: 0 .5rem 0 0;
}

.alarm-flag .form-check-label {
    margin: 0;
    color: #fff !important;
}

/* ── Select label: sit statically above the box instead of MDB's           */
/*    absolute-positioned float, which overlaps native <select> text ────── */
.form-select-label {
    position: static !important;
    display: block;
    transform: none !important;
    font-size: .8rem !important;
    color: #999 !important;
    margin-bottom: .25rem;
    cursor: default;
}

/* ── Native <select> dropdown options: force a readable light background ── */
select.form-control option {
    background-color: #fff;
    color: #000;
}

/* ── Left padding for the closed select's displayed value ──────────────── */
select.form-control {
    padding-left: .75rem !important;
}

/* ── Field labels uppercase, matching the section subheadings ──────────── */
.alarm-compact .md-form label,
.device-form-fields .md-form label {
    text-transform: uppercase;
}

/* ── Per-alarm-instance heading (e.g. "HiHi"/"Hi"/"Lo"/"LoLo" thresholds   */
/*    on the same channel) — separates repeated alarm blocks from one     */
/*    another when a channel has more than one ────────────────────────── */
.alarm-instance-title {
    color: #fff;
    font-weight: 700;
    margin: 1.5rem 0 .5rem 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}
