/* ============================================================
   T030 — every button reads as a box.
   The theme ships many buttons with a transparent border and no
   background (links, light / subtle / icon-only buttons), so they
   looked like loose text or icons. Loaded after font-18.css in
   every layout; close (×) buttons and menu items are left alone.
   ============================================================ */

.btn:not(.btn-close) {
    --bs-btn-border-width: 1px;
    border-width: 1px;
    border-style: solid;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    transition: box-shadow 0.15s ease, transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:not(.btn-close):not(:disabled):not(.disabled):hover {
    box-shadow: 0 4px 10px rgba(16, 24, 40, 0.12);
    transform: translateY(-1px);
}
.btn:not(.btn-close):active {
    transform: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

/* Buttons joined into a group or an input keep their shared edges. */
.input-group > .btn,
.btn-group > .btn,
.btn-group-vertical > .btn {
    box-shadow: none;
}
.input-group > .btn:hover,
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover {
    transform: none;
}

/* Borderless styles get a visible outline and a white face. */
.btn-link,
.btn-light,
.btn-subtle,
.btn-white,
.btn-default,
.btn-outline-light {
    --bs-btn-border-color: #d6dbe3;
    --bs-btn-hover-border-color: #b9c1ce;
    --bs-btn-active-border-color: #b9c1ce;
    border-color: #d6dbe3 !important;
    background-color: #fff;
}
.btn-link,
.btn-light,
.btn-subtle,
.btn-white,
.btn-default,
.btn-outline-light {
    --bs-btn-hover-bg: #f5f7fa;
}
.btn-link:hover,
.btn-light:hover,
.btn-subtle:hover,
.btn-white:hover,
.btn-default:hover,
.btn-outline-light:hover {
    background-color: #f5f7fa;
}
.btn-link {
    text-decoration: none;
    padding: 0.3rem 0.75rem;
}
/* "btn-link p-0" was used for inline text actions — give them room to be a box. */
.btn-link.p-0 {
    padding: 0.2rem 0.6rem !important;
}

/* Theme "subtle" colour buttons (soft background, no border). */
.btn-primary-subtle,
.btn-warning-subtle,
.btn-brown-subtitle,
.btn-light-blue-subtitle,
.btn-blue-subtitle,
.btn-light-green-subtitle,
[class*="btn-light-"] {
    border-color: rgba(16, 24, 40, 0.14) !important;
}

/* Table row icon buttons (.action-btn wrappers) — square, even boxes. */
.action-btn {
    width: auto;
    height: auto;
    border-radius: 8px;
}
.action-btn > .btn,
.action-btn > a.btn,
.action-btn > form > .btn {
    margin: 0 !important;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Matter workspace icon-only row actions (bin, eye, reminder…). */
.mw-row-del {
    border: 1px solid #e0e4ea !important;
    background: #fff !important;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    transition: box-shadow 0.15s ease, background-color 0.15s ease;
}
.mw-row-del:hover {
    background: #f5f7fa !important;
    box-shadow: 0 4px 10px rgba(16, 24, 40, 0.12);
}
.mw-actions-btn {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.mw-actions-btn:hover {
    background: #f5f7fa;
}

/* Things that must never look like a boxed button. */
.btn-close,
.dropdown-item,
.mw-actions-menu a,
.mw-actions-menu button,
.nav-link {
    box-shadow: none !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .btn:not(.btn-close),
    .mw-row-del {
        transition: none;
    }
    .btn:not(.btn-close):hover {
        transform: none;
    }
}
