/* App-specific layout. Colours come only from Bootstrap/brand tokens (see .claude/skills/qnets-style). */
.login-card {
    max-width: 26rem;
}

/* Custom block editor (Monaco) */
.lua-editor {
    height: 65vh;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

/* Features page (tenants/feature_list.html): grid of block switches */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem; }
.feature-tile {
    display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; cursor: pointer;
    border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius);
}
.feature-tile:hover { background: var(--bs-primary-bg-subtle); }

/* Logs page */
.log-view { max-height: 60vh; overflow: auto; font-size: .8rem; white-space: pre-wrap; }

/* Call simulator keypad */
.sim-keypad { display: grid; grid-template-columns: repeat(3, 4.25rem); gap: .5rem; justify-content: center; }

/* Call simulator flow view (the diagram itself is styled by flows/editor.css on #fe-paper) */
.sim-flow { height: 26rem; overflow: hidden; }
#fe-paper .drawflow-node.fs-visited { background: var(--bs-success-bg-subtle); border-color: var(--bs-success-border); }
/* The block the call is in now: thick solid green border plus a pulsing glow, readable even zoomed out. */
#fe-paper .drawflow-node.fs-current {
    background: var(--bs-success-bg-subtle);
    border: 4px solid var(--bs-success-bg);
    box-shadow: 0 0 0 6px var(--bs-success-focus-ring);
    animation: fs-pulse 1.2s ease-in-out infinite;
}
#fe-paper .connection.fs-taken .main-path { stroke: var(--bs-success-bg); stroke-width: 5px; }
@keyframes fs-pulse { 50% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { #fe-paper .drawflow-node.fs-current { animation: none; } }

/* Footer */
.app-footer { border-top: 3px solid var(--qnets-primary); }
.app-footer a { color: inherit; text-decoration: none; transition: color .15s; }
.app-footer a:hover, .app-footer a:focus-visible { color: var(--bs-primary-fg); }
.app-footer-logo { height: 36px; }
.app-footer .app-social {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    border: 1px solid var(--bs-primary-border); color: var(--bs-primary-fg);
    transition: background-color .15s, color .15s, transform .15s;
}
.app-footer .app-social:hover, .app-footer .app-social:focus-visible {
    background: var(--qnets-primary); color: var(--bs-primary-contrast); transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) { .app-footer .app-social:hover { transform: none; } }
.app-footer-about { max-width: 22rem; }
/* Web phone page (templates/telephony/phone.html): dialer card, plus the extensions card beside it on wide screens. */
.phone-page { width: min(100%, 50rem); margin: auto; }
.phone-logo { height: 2rem; }
.phone-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); align-items: start; justify-content: center; }
.phone-layout:has(> #phone-blf-box[hidden]) { grid-template-columns: minmax(0, 22rem); }
@media (max-width: 767.98px) { .phone-layout { grid-template-columns: minmax(0, 1fr); } }
.phone-identity { display: flex; align-items: center; gap: .75rem; width: 100%; }
.phone-identity-icon {
    flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
    background: var(--bs-primary-bg-subtle); color: var(--qnets-primary-text); font-size: 1.2rem;
}
.phone-number { font-size: 1.75rem; text-align: center; letter-spacing: .05em; }
.phone-keypad { display: grid; grid-template-columns: repeat(3, 4rem); gap: .75rem; justify-content: center; }
.phone-keypad > button { width: 4rem; height: 4rem; border-radius: 50%; font-size: 1.35rem; justify-content: center; }
.phone-call { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; }
.phone-incoming { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; padding: .5rem 0; }
.phone-incoming[hidden] { display: none; }
.phone-avatar {
    width: 4.5rem; height: 4.5rem; border-radius: 50%; display: grid; place-items: center; margin-bottom: .75rem;
    font-size: 2rem; background: var(--bs-bg-3); color: var(--qnets-primary); animation: phone-pulse 1.5s infinite;
}
@keyframes phone-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--qnets-primary) 50%, transparent); } 100% { box-shadow: 0 0 0 1.25rem transparent; } }
.phone-round { width: 3.5rem; height: 3.5rem; border-radius: 50%; font-size: 1.3rem; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .phone-avatar { animation: none; } }
/* BLF list in the web phone; the dot's colour comes from phone.js (bg-success/warning/danger). */
.phone-blf { max-height: 28rem; overflow-y: auto; }
.phone-blf > [hidden] { display: none !important; }  /* filtered out; beats .d-flex */
.phone-blf > * { min-width: 0; }
.phone-blf-dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--bs-secondary-base); }

/* Voicemail: the mailbox picker scrolls on its own when a tenant has many. */
.vm-boxes { max-height: 60vh; overflow-y: auto; }

/* Toast countdown bar; 6s matches the delay in base.html. */
#toast-container .toast { position: relative; overflow: hidden; }
#toast-container .toast.show::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: currentColor; opacity: .5; transform-origin: left;
    animation: toast-countdown 6s linear forwards;
}
#toast-container .toast:hover::after { animation-play-state: paused; }
@keyframes toast-countdown { to { transform: scaleX(0); } }

/* MCP activity: keep long tool errors to one line (full text in the title). */
.activity-error { max-width: 24rem; }

/* DataTables: let text-end headers stay right-aligned inside its flex header. */
table.dataTable th.text-end { text-align: end; }
table.dataTable th.text-end .dt-column-header { justify-content: flex-end; }
