/*
 * Bridge CSS - Paradigm-based webhosting template
 * Purpose: makes Blesta's legacy Bootstrap 3/4 classes (still used across
 * 28 of the 76 client .pdt page files, confirmed via survey on 2026-08-17,
 * matching the same class list found in the earlier Velzon-based bridge.css)
 * render correctly against Paradigm, without editing any .pdt file.
 */

/* ---------- form-group spacing (removed after Bootstrap 3) ---------- */
.form-group {
    margin-bottom: 1rem;
}

/* ---------- btn-block (removed in Bootstrap 5, replaced by d-grid) ---------- */
.btn-block {
    display: block;
    width: 100%;
}
.btn-block + .btn-block {
    margin-top: 0.5rem;
}

/* ---------- panel -> card bridge (Paradigm variable names) ---------- */
.panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}
.panel-blesta { /* inherits .panel */ }
.panel-fix { overflow: hidden; }
.panel-pad { padding: 1.5rem; }
.panel-body { padding: 1.5rem; color: var(--text-primary); }
.panel-footer {
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 0.5rem 0.5rem;
}
.panel-heading {
    padding: 14px 1.5rem;
    font-size: 1rem;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* .card-content is a legacy wrapper (distinct from Bootstrap's .card) */
.card-content { width: 100%; padding: 10px; }

/* ---------- table styling bridge ---------- */
.table-curved { border-radius: 0.5rem; overflow: hidden; }
.table-curved thead th {
    background-color: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
}
.table-striped-alt tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ---------- Bootstrap 3/4 utility classes removed in later versions ---------- */
.btn-xs {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 0.2rem;
}
.col-md-offset-1 { margin-left: 8.33333333%; }

/* ---------- form controls inside legacy panels stay theme-aware ---------- */
.panel input:not([type="checkbox"]):not([type="radio"]),
.panel select,
.panel textarea {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* ---------- legacy .checkbox wrapper (Bootstrap 3 pattern, no BS5 equivalent) ---------- */
/* Used for "Remember me" style checkboxes across login/reset/forgot pages -
   without this, the checkbox and its label text collapse together and
   overlap the following button (confirmed via founder screenshot). */
/* CONFIRMED root cause (via live DOM inspection): Bootstrap/Paradigm's own
   CSS has a compound selector ".checkbox, input[type=\"checkbox\"].checkbox"
   that sizes native checkbox INPUTS to 16px - but Blesta's legacy markup
   also uses .checkbox as a wrapper DIV class name, so our wrapper div
   accidentally matches that rule and gets squeezed to 16px wide too,
   collapsing everything inside it. Target the div specifically with a
   tag-qualified selector (div.checkbox) so it wins over the colliding
   compound rule regardless of source order. */
div.checkbox {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0;
}
.checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    min-height: 1.5rem;
}
.checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0;
}

/* Ensure a submit button that immediately follows a .checkbox always starts
   on its own line with proper spacing, regardless of markup order. */
.checkbox + .btn,
.checkbox + button {
    margin-top: 0.5rem;
}
