/* CIS WBM — shared button layer (the button-style companion to the container system).
 *
 * Global, enqueued on every page (cis-web-business-manager.php). Five roles, one base.
 * Use cis-btn + ONE role class on every portal button so intent reads the same everywhere:
 *
 *   cis-btn-primary    main action on a screen        solid brand-blue
 *   cis-btn-create     make a new thing (+ a + icon)  solid green
 *   cis-btn-secondary  supporting action              white + blue border (reads on light AND colored bars)
 *   cis-btn-ghost      low-emphasis                   text only, inherits bar text color
 *   cis-btn-danger     destructive                    red
 *
 * Doc: Documentation/Architecture & Design/CIS_Web_Business_Manager/Container_Components/INDEX.md (Buttons).
 * Heights always match because every variant shares the cis-btn base (padding + min-height + line-height).
 */

.cis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    min-height: 40px;
    padding: .45em 1.1em;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 1.1rem;            /* flat, readable everywhere (no em/max ambiguity that fell back to the small UA button size) */
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;          /* allow 2-line wrap without shrinking height (align-items keeps row even) */
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.cis-btn:focus-visible { outline: 2px solid #1a5fb4; outline-offset: 2px; }
.cis-btn:disabled, .cis-btn.is-disabled { opacity: .5; cursor: not-allowed; }

/* Size modifier — compact buttons for dense contexts (in a grid cell / table row),
   so a per-row Detail/Edit button doesn't inflate the row to the 40px bar height. */
.cis-btn-sm { min-height: 0; padding: .25em .7em; font-size: .85em; gap: .3em; }

/* Primary — the main action */
.cis-btn-primary {
    background: #2271b1; color: #fff; border-color: #2271b1;
}
.cis-btn-primary:hover { background: #185a8f; color: #fff; }

/* Create — make a new thing (pair with a leading + in the label) */
.cis-btn-create {
    background: #1a7f37; color: #fff; border-color: #1a7f37;
}
.cis-btn-create:hover { background: #15692e; color: #fff; }

/* Secondary — supporting action. White fill + blue border reads on BOTH a white page
   and a colored bar (e.g. the blue action bar), unlike a transparent outline. */
.cis-btn-secondary {
    background: #fff; color: #2271b1; border-color: #2271b1;
}
.cis-btn-secondary:hover { background: #eaf2fa; color: #185a8f; }

/* Ghost — low emphasis; inherits the surrounding text color so it works on any bar */
.cis-btn-ghost {
    background: transparent; color: inherit; border-color: transparent;
    font-weight: 500; text-decoration: underline; min-height: 0; padding: .4em .6em;
}
.cis-btn-ghost:hover { color: inherit; opacity: .8; }

/* Destructive */
.cis-btn-danger {
    background: #c0392b; color: #fff; border-color: #c0392b;
}
.cis-btn-danger:hover { background: #a33024; color: #fff; }

/* Opt-in: full width (handy when stacking buttons on a phone). Not forced globally so
   it can't break inline bars; add cis-btn-block where a stacked phone layout wants it. */
@media (max-width: 600px) {
    .cis-btn-block { width: 100%; }
}
