/**
 * AccEasy AdminLTE 3 content bridge.
 * Maps AdminLTE 2 .box* widgets to AdminLTE 3 card-like look without requiring Blade rewrites.
 * Loaded after vendor.css + adminlte.min.css so these rules win.
 */

body.adminlte3-shell .box {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
}

body.adminlte3-shell .box.box-solid {
  border-top: 0;
}

body.adminlte3-shell .box.box-primary {
  border-top: 3px solid #007bff;
}

body.adminlte3-shell .box.box-success {
  border-top: 3px solid #28a745;
}

body.adminlte3-shell .box.box-info {
  border-top: 3px solid #17a2b8;
}

body.adminlte3-shell .box.box-warning {
  border-top: 3px solid #ffc107;
}

body.adminlte3-shell .box.box-danger {
  border-top: 3px solid #dc3545;
}

body.adminlte3-shell .box.box-default {
  border-top: 3px solid #6c757d;
}

body.adminlte3-shell .box.box-widget {
  border: none;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.adminlte3-shell .box-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

body.adminlte3-shell .box-header.with-border {
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

body.adminlte3-shell .box-header > .fa,
body.adminlte3-shell .box-header > .fas,
body.adminlte3-shell .box-header > .far,
body.adminlte3-shell .box-header > .glyphicon,
body.adminlte3-shell .box-header > .ion {
  margin-right: 0.5rem;
}

body.adminlte3-shell .box-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.5;
  flex: 1 1 auto;
}

body.adminlte3-shell .box-tools,
body.adminlte3-shell .card-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Dual-class: treat nested box-tools from widget slots as card-tools */
body.adminlte3-shell .box-header.card-header > .box-tools {
  margin-left: auto;
}

body.adminlte3-shell .box-tools.pull-right {
  float: none;
  margin-left: auto;
}

body.adminlte3-shell .btn-box-tool,
body.adminlte3-shell .btn-tool {
  background: transparent;
  border: 0;
  color: #6c757d;
  padding: 0.25rem 0.5rem;
}

body.adminlte3-shell .btn-box-tool:hover,
body.adminlte3-shell .btn-tool:hover {
  color: #343a40;
}

body.adminlte3-shell .box-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

body.adminlte3-shell .box-body > .table {
  margin-bottom: 0;
}

body.adminlte3-shell .box-body > .table > thead > tr > th,
body.adminlte3-shell .box-body > .table > tbody > tr > th,
body.adminlte3-shell .box-body > .table > tfoot > tr > th,
body.adminlte3-shell .box-body > .table > thead > tr > td,
body.adminlte3-shell .box-body > .table > tbody > tr > td,
body.adminlte3-shell .box-body > .table > tfoot > tr > td {
  border-top: 1px solid rgba(0, 0, 0, 0.125);
}

body.adminlte3-shell .box-footer {
  padding: 0.75rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

/* Collapsed state (ALTE2 collapsed-box + ALTE3 collapsed-card) */
body.adminlte3-shell .box.collapsed-box > .box-body,
body.adminlte3-shell .box.collapsed-box > .box-footer,
body.adminlte3-shell .card.collapsed-card > .card-body,
body.adminlte3-shell .card.collapsed-card > .card-footer {
  display: none;
}

/* Dual-class widgets: avoid double borders/shadows when both .box and .card apply */
body.adminlte3-shell .box.card {
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.adminlte3-shell .box.card > .box-header.card-header {
  background-color: transparent;
}

body.adminlte3-shell .box.card > .box-body.card-body {
  padding: 1.25rem;
}

/* POS toolbar (header-pos) under lockscreen / pos_layout */
body.adminlte3-shell .pos-header.navbar {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.adminlte3-shell .pos-header .navbar-meta {
  margin: 0;
  font-size: 0.9rem;
}

body.adminlte3-shell .pos-header .pos-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
}
