/* RayFlexCom Network Manager: small additions on top of Bootstrap 5. */

/* RayFlexCom brand design tokens (huisstijl). */
:root {
    --rfx-blue: #009fe3;
    --rfx-blue-dark: #0072b0;
    --rfx-orange: #ec6608;
    --rfx-ink: #1d1d1b;
}

/* Witte topnavigatie met blauwe onderrand (huisstijl 25 jaar). */
.rnm-topnav {
    border-bottom: 3px solid var(--rfx-blue);
}
.rnm-topnav .nav-link {
    color: var(--rfx-ink);
}
.rnm-topnav .nav-link:hover,
.rnm-topnav .nav-link:focus,
.rnm-topnav .nav-link.active {
    color: var(--rfx-blue-dark);
}

/* White chip behind the official logo so the (dark-inked) brand mark stays
 * legible on a dark surface. The logo asset itself is never modified. */
.rfx-logo-chip {
    display: inline-flex;
    align-items: center;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 0;
}
.navbar .rfx-logo-chip {
    padding: 3px 6px;
}

/* Mark required form fields with an asterisk after the label. */
.required > .form-label::after {
    content: " *";
    color: var(--bs-danger);
}

/* Technical identifiers (UUID, MAC, external ids) in tables. */
.app-mono {
    font-family: var(--bs-font-monospace);
    font-size: 0.875em;
}

/* Technical values are plain monospace, not the default pink <code>;
 * status colours stay reserved for conclusions and badges. */
code {
    color: var(--bs-body-color);
}

/* Truncated text cells in dense tables; full text via title tooltip. */
.rnm-truncate {
    display: inline-block;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* Compact tables: single-line badge/action cells, middle-aligned rows. */
.rnm-compact-table {
    margin-bottom: 0;
}
.rnm-compact-table th,
.rnm-compact-table td {
    vertical-align: middle;
}
.rnm-compact-table .rnm-col-badge,
.rnm-compact-table .rnm-col-actions,
.rnm-compact-table .rnm-col-select {
    white-space: nowrap;
    width: 1%;
}

/* Dashboard stat cards. */
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}
.stat-card .stat-link {
    color: inherit;
    border-radius: 0.375rem;
}
.stat-card:has(.stat-link):hover {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 1px var(--bs-primary, #0d6efd);
}
.stat-card .stat-link:hover .stat-value {
    text-decoration: underline;
}
.stat-card .stat-link:focus-visible {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

/* Reserved space for KPIs that only become real once a network module
 * runs. Deliberately visually "empty" so it can never be mistaken for a
 * measured value. */
.rnm-kpi-placeholder {
    border-style: dashed;
    background: var(--bs-tertiary-bg, #f6f8fa);
}
.rnm-kpi-placeholder .stat-value {
    color: var(--bs-secondary-color, #6c757d);
    font-size: 1.5rem;
}

/* Section accents: a soft accent on the inline-start border plus a very
 * light header tint, so each main section is recognisable. Status colours
 * (green/orange/red) stay reserved for badges; these tokens are neutral. */
.rnm-section {
    border-inline-start: 4px solid var(--rnm-section-accent, var(--rfx-blue));
}
.rnm-section > .card-header {
    background: var(--rnm-section-header-bg, transparent);
}
.rnm-section--customer { --rnm-section-accent: #2f6fb0; --rnm-section-header-bg: rgba(47, 111, 176, 0.06); }
.rnm-section--platform { --rnm-section-accent: #2aa79b; --rnm-section-header-bg: rgba(42, 167, 155, 0.07); }
.rnm-section--network  { --rnm-section-accent: #3f9bb0; --rnm-section-header-bg: rgba(63, 155, 176, 0.06); }
.rnm-section--pricing  { --rnm-section-accent: #cf8a3a; --rnm-section-header-bg: rgba(207, 138, 58, 0.07); }
.rnm-section--notes    { --rnm-section-accent: #8a7fb0; --rnm-section-header-bg: rgba(138, 127, 176, 0.07); }

/* Klantnotities als subtiele post-it: professioneel en rustig, met
   dezelfde kaartkop als de overige kaarten en goed tekstcontrast. */
.rnm-notes-card > .card-body {
    background: #fdf9e8;
}
.rnm-notes-card {
    border-inline-start: 4px solid #e3d489;
}

/* Collapsible disclosure header. The whole header is one accessible
 * toggle button; the chevron rotates when expanded. */
.rnm-disclosure-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: start;
    padding: .6rem 1rem;
    font: inherit;
    color: inherit;
    cursor: pointer;
    flex-wrap: wrap;
}
.rnm-disclosure-toggle:focus-visible {
    outline: 2px solid var(--rfx-blue);
    outline-offset: -2px;
}
.rnm-chevron {
    display: inline-block;
    transition: transform 0.15s ease;
}
.rnm-disclosure-toggle[aria-expanded="true"] .rnm-chevron {
    transform: rotate(90deg);
}

/* The reusable section disclosure header (see the
 * section_disclosure_header element): the whole title/status area is one
 * accessible toggle button; action buttons sit outside it. */
.rnm-section-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    min-height: 40px;
    padding: .5rem .75rem;
    border: 0;
    background: transparent;
    text-align: left;
    width: auto;
    color: inherit;
    font: inherit;
}
.rnm-section-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}
.rnm-section-toggle:focus-visible {
    outline: 2px solid var(--rfx-blue);
    outline-offset: -2px;
}
.rnm-section-toggle .rnm-chevron {
    display: inline-block;
    transition: transform .15s ease-in-out;
}
.rnm-section-toggle[aria-expanded="true"] .rnm-chevron {
    transform: rotate(90deg);
}
.rnm-section-toggle__summary {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    font-weight: 400;
    font-size: .875rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* Network platform badge. The background and text colour are supplied per
 * platform from the database (see the network_platform_badge element), so
 * a new platform never needs a rule here. */
.rnm-platform-badge {
    font-weight: 600;
    letter-spacing: .01em;
}
