/* EasyFix flat theme (owner's choice, Nov 2026): one calm look on every screen.
   No shadows, no gradients, small corners; circles stay round. Loaded last on every page frame.
   Only appearance changes here: no layout, logic or text. */

/* ---- Bootstrap building blocks: small corners everywhere ---- */
/* The owner panel (body.ef-owner) and tables keep their original corners (owner's choice). */
:root {
  --ef-line: #e5e7eb;
  --ef-ink: #111827;
  --ef-muted: #6b7280;
  --bs-box-shadow: none;
  --bs-box-shadow-sm: none;
  --bs-box-shadow-lg: none;
}
body:not(.ef-owner) {
  --bs-border-radius: 4px;
  --bs-border-radius-sm: 3px;
  --bs-border-radius-lg: 4px;
  --bs-border-radius-xl: 4px;
  --bs-border-radius-xxl: 4px;
  --bs-border-radius-2xl: 4px;
}
body:not(.ef-owner) :is(.card, .card-header, .card-footer, .btn, .btn-group > .btn, .form-control, .form-select, .input-group-text,
.dropdown-menu, .modal-content, .alert, .toast, .list-group, .list-group-item, .nav-pills .nav-link,
.page-link, .popover, .tooltip-inner, .offcanvas, .accordion, .accordion-item, .progress):not(table *):not(.table-responsive *) {
  border-radius: 4px !important;
}
body:not(.ef-owner) .badge:not(table *) { border-radius: 3px !important; }
body:not(.ef-owner) :is(.rounded, .rounded-1, .rounded-2, .rounded-3, .rounded-4, .rounded-5, .rounded-top, .rounded-bottom):not(table *) { border-radius: 4px !important; }

/* ---- No shadows (the focused element keeps its focus ring) ---- */
html body *:not(:focus):not(:focus-visible),
html body *::before, html body *::after { box-shadow: none !important; }
html body :focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.shadow, .shadow-sm, .shadow-lg { box-shadow: none !important; }

/* ---- Cards read as flat panels with a hairline ---- */
.card { border: 1px solid var(--ef-line) !important; }
.card-header { background: #f9fafb; border-bottom: 1px solid var(--ef-line); font-weight: 600; }

/* ---- Tables: calm header, roomy rows ---- */
.table > thead > tr > th, .table thead th {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4b5563;
  background: #f3f4f6 !important; border-bottom: 1px solid var(--ef-line) !important; vertical-align: middle;
}
.table > :not(caption) > * > * { padding-top: .7rem; padding-bottom: .7rem; }
.table-dark > thead > tr > th, thead.table-dark th { color: #374151 !important; }

/* ---- Alerts: white panel with a coloured edge instead of a filled box ---- */
.alert { background: #fff !important; border: 1px solid var(--ef-line) !important; border-left-width: 4px !important; color: var(--ef-ink) !important; }
.alert-success { border-left-color: #16a34a !important; }
.alert-info { border-left-color: #0284c7 !important; }
.alert-warning { border-left-color: #d97706 !important; }
.alert-danger { border-left-color: #dc2626 !important; }
.alert-primary { border-left-color: #2563eb !important; }

/* ---- Buttons: solid, no lift on hover ---- */
.btn { font-weight: 600; transform: none !important; }
.btn:hover { transform: none !important; }

/* ---- Small round things stay round ---- */
.rounded-circle, .status-dot, .avatar, [class*="avatar"], .form-check-input[type=radio], .spinner-border, .spinner-grow,
.live-dot, .kds-live-dot, .dot { border-radius: 50% !important; }
.form-switch .form-check-input { border-radius: 2em !important; }

/* ---- Row actions in tables (cashier orders): Pay and Cancel stay solid (green / red), the rest quiet ---- */
.table .btn-group-vertical > .btn:not(.btn-success):not(.btn-primary):not(.btn-danger) {
  background: #fff !important; color: #374151 !important; border: 1px solid #d1d5db !important;
}
.table .btn-group-vertical > .btn:not(.btn-success):not(.btn-primary):not(.btn-danger):hover { background: #f3f4f6 !important; }

/* ---- Toasts (static/js/easyfix-toast.js): every message, top right ---- */
.ef-toasts {
  position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px;
  width: 360px; max-width: calc(100vw - 32px); pointer-events: none;
}
.ef-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px;
  background: #fff; color: var(--ef-ink); border: 1px solid var(--ef-line); border-left: 4px solid #0284c7;
  border-radius: 6px; font-size: .9rem; line-height: 1.4;
  opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease;
}
.ef-toast.ef-in { opacity: 1; transform: none; }
.ef-toast-icon { margin-top: 2px; font-size: 1rem; color: #0284c7; }
.ef-toast-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ef-toast-close {
  border: 0; background: none; color: var(--ef-muted); font-size: 1.25rem; line-height: 1; padding: 0 2px; cursor: pointer;
}
.ef-toast-close:hover { color: var(--ef-ink); }
.ef-success { border-left-color: #16a34a; } .ef-success .ef-toast-icon { color: #16a34a; }
.ef-warning { border-left-color: #d97706; } .ef-warning .ef-toast-icon { color: #d97706; }
.ef-danger { border-left-color: #dc2626; }  .ef-danger .ef-toast-icon { color: #dc2626; }
@media (max-width: 576px) { .ef-toasts { top: 8px; right: 16px; left: 16px; width: auto; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .ef-toast { transition: none; } }
