/* ═══════════════════════════════════════════════════════════════
   Triggers Admin — TriggerControl + TemplateStationControl styles
   ═══════════════════════════════════════════════════════════════ */

/* ── RadWindow: title bar buttons to the right, content scrollable ── */
.trigger-rw .rwTitleRow,
.trigger-rw .rwTitleRow table {
    width: 100% !important;
}
.trigger-rw .rwContent {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* ════════════════════════════════════════════════════════════════
   TriggerControl form
   ════════════════════════════════════════════════════════════════ */
.tc-form {
    padding: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #1e293b;
    box-sizing: border-box;
}

.tc-field {
    display: grid;
    grid-template-columns: 110px 350px;
    align-items: start;
    gap: 0 8px;
    margin-bottom: 6px;
}

.tc-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding-top: 5px;
    padding-right: 8px;
    text-align: right;
    line-height: 1.4;
}

.tc-input-wrap {
    min-width: 0;
    position: relative;
}

/* Telerik controls fill their 350px grid cell */
.tc-input-wrap .RadInput,
.tc-input-wrap .RadInput_Default,
.tc-input-wrap .RadInputWrapper,
.tc-input-wrap .riTextBox,
.tc-input-wrap .RadDropDownList,
.tc-input-wrap .rddlInner,
.tc-input-wrap .rddlFakeInput,
.tc-input-wrap .RadComboBox,
.tc-input-wrap input[type="text"],
.tc-input-wrap select {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* RadComboBox: internal table must stay within the cell */
.tc-input-wrap .RadComboBox table {
    width: 100% !important;
    table-layout: fixed !important;
}
.tc-input-wrap .rcbArrowCell {
    width: 26px !important;
}

/* Autocomplete widgets */
#user-selection-span,
#series-selection-span {
    margin-top: 4px;
}
.tc-autocomplete {
    position: relative;
    display: block;
}
.tc-autocomplete input[type="text"] {
    width: 100%;
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    background: #fff;
    color: #1e293b;
    height: 28px;
}
.tc-autocomplete input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.tc-autocomplete-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 170px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-top: none;
    background: #fff;
    z-index: 10000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 5px 5px;
}
.tc-autocomplete-results div {
    padding: 7px 11px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}
.tc-autocomplete-results div:hover,
.tc-autocomplete-results div.ac-active {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Template section separator */
.tc-template-section {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* Save row: indent to align with inputs */
.tc-save-row {
    padding-left: 118px; /* 110px label + 8px gap */
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    margin-top: 6px;
}

/* Status message */
.tc-msg {
    margin-top: 6px;
    padding-left: 118px;
    font-size: 13px;
    font-weight: 500;
    color: #16a34a;
}

.clear-height tr { height: auto !important; }

/* ════════════════════════════════════════════════════════════════
   TemplateStationControl — station card
   ════════════════════════════════════════════════════════════════ */
.station-card {
    display: grid;
    grid-template-columns: 44px 125px 115px 62px 105px 100px auto;
    align-items: center;
    gap: 0 8px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #3b82f6;
    border-radius: 0 5px 5px 0;
    margin-bottom: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
}
.station-card:hover {
    border-left-color: #2563eb;
    background: #fafcff;
}

.station-card-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.station-card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.station-card-field label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
}
.station-card-field select {
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 6px;
    background: #fff;
    color: #1e293b;
    height: 30px;
    width: 100%;
    box-sizing: border-box;
}
.station-card-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.station-card-field .RadInput,
.station-card-field .RadInput_Default,
.station-card-field .riTextBox {
    width: 60px !important;
    height: 30px;
    box-sizing: border-box;
}
.station-card-field textarea {
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 7px;
    resize: none;
    height: 30px;
    min-height: unset;
    line-height: 1.4;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    color: #1e293b;
    font-family: inherit;
}
.station-card-field textarea:focus {
    height: 60px;
    overflow: auto;
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}
.station-last-label {
    font-size: 11px;
    color: #2563eb;
    font-weight: 600;
    font-style: normal;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 2px 8px;
    white-space: nowrap;
}
