/* Techno Connect - shared AJAX form styling (inline errors, busy button, confirm dialog). */
.tc-field-error {
    color: #d9534f;
    font-size: 12.5px;
    line-height: 1.35;
    margin-top: 4px;
}
.is-invalid, .input-validation-error { border-color: #d9534f !important; }
.tc-form-summary { margin-bottom: 14px; font-size: 14px; }
.tc-form-summary div + div { margin-top: 4px; }

.tc-spin {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: tc-spin .7s linear infinite;
}
@keyframes tc-spin { to { transform: rotate(360deg); } }

.tc-confirm-overlay {
    position: fixed; inset: 0; z-index: 20050;
    background: rgba(15, 23, 42, .5);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.tc-confirm-box {
    background: #fff; border-radius: 12px; width: 100%; max-width: 420px;
    padding: 22px 22px 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.tc-confirm-box h5 { margin: 0 0 8px; font-weight: 700; color: #273449; }
.tc-confirm-box p { margin: 0 0 18px; color: #4b5563; font-size: 14.5px; word-break: break-word; }
.tc-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Example / placeholder text must look like an example: light, normal weight, in every form of the app. */
input::placeholder, textarea::placeholder, .form-control::placeholder { color: #a9b2bf !important; font-weight: 400 !important; opacity: 1 !important; }
select.form-control:invalid { color: #a9b2bf; }

/* ---- Active / Inactive switch ---- */
.tc-switch-row { display: flex; align-items: center; gap: 12px; }
.tc-switch { position: relative; display: inline-block; width: 64px; height: 32px; margin: 0; cursor: pointer; }
/* Same specificity as the theme's checkbox rule (ready.css moves checkboxes to left:-9999px), so the invisible input sits over the track. */
.tc-switch input[type="checkbox"]:not(:checked),
.tc-switch input[type="checkbox"]:checked { position: absolute; left: 0; top: 0; opacity: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; outline: 0; box-shadow: none; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; z-index: 2; }
.tc-switch { outline: 0; -webkit-tap-highlight-color: transparent; }
.tc-switch-row .tc-switch-track { overflow: hidden; }
.tc-switch-track { position: absolute; inset: 0; border-radius: 999px; background: #d3d9e0; transition: background .2s; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; color: #fff; font-size: 15px; }
.tc-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.tc-switch input:checked + .tc-switch-track { background: #25b86a; }
.tc-switch input:checked + .tc-switch-track::after { transform: translateX(32px); }
.tc-switch input:not(:checked) + .tc-switch-track .tc-on, .tc-switch input:checked + .tc-switch-track .tc-off { visibility: hidden; }
.tc-switch input:focus-visible + .tc-switch-track { outline: 2px solid #2459b5; outline-offset: 2px; }
.tc-switch-text { font-weight: 600; font-size: 14px; }
.tc-switch-text.on { color: #1d9a57; }
.tc-switch-text.off { color: #8a94a3; }

/* The theme (ready.css) moves every checkbox off-screen to draw its own box; .tc-check keeps the native checkbox visible. */
input.tc-check[type="checkbox"]:not(:checked),
input.tc-check[type="checkbox"]:checked {
    position: static; left: auto; opacity: 1;
    appearance: auto; -webkit-appearance: checkbox;
    width: 17px; height: 17px; margin: 0; cursor: pointer; vertical-align: middle;
}
