/* Custom theme overrides for Wirigan Status
   Matches branding from https://cedric.com.au
   Build 20260618.2028
*/

/* Bootstrap 5 CSS variable overrides */
:root {
  /* Navbar background: dark purple */
  --bs-dark: #380a3b;
  --bs-dark-rgb: 56, 10, 59;

  /* Primary action buttons: dark green */
  --bs-primary: #006600;
  --bs-primary-rgb: 0, 102, 0;

  /* Optional: slightly adjust primary text contrast if needed */
  --bs-primary-text-emphasis: #004d00;
}

/* Navbar refinements for the dark purple background */
.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
  color: #ffffff;
}

/* Primary action buttons */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #006600;
  --bs-btn-border-color: #006600;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #005200;
  --bs-btn-hover-border-color: #005200;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #004d00;
  --bs-btn-active-border-color: #004d00;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #006600;
  --bs-btn-disabled-border-color: #006600;
  --bs-btn-focus-shadow-rgb: 0, 102, 0;
}

/* Primary outline buttons */
.btn-outline-primary {
  --bs-btn-color: #006600;
  --bs-btn-border-color: #006600;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #006600;
  --bs-btn-hover-border-color: #006600;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #005200;
  --bs-btn-active-border-color: #005200;
  --bs-btn-focus-shadow-rgb: 0, 102, 0;
}

/* Consistent focus ring for both primary variants */
.btn-primary:focus,
.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 0, 0.5);
}

.status-entry .accordion-button {
  background: #ffffff;
  color: #212529;
  box-shadow: none;
  padding: 1rem 1.25rem;
  border-left: 4px solid #ece6ee;
}

.status-entry .accordion-button:not(.collapsed) {
  color: inherit;
  background: #fbfcfd;
  border-left-color: #b797bf;
}

.status-entry {
  border-top: 1px solid #ebeef2;
}

.history-batch .status-entry:first-child {
  border-top: 1px solid #ddd6e0;
}

.status-entry-summary {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px) minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  align-items: center;
  padding-right: 1rem;
}

.status-entry-badge {
  justify-self: start;
  min-width: 4.75rem;
  text-transform: lowercase;
}

.status-entry-site {
  font-weight: 600;
  color: #212529;
}

.status-entry-notes {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-entry-pre {
  background: #f3f5f7;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.825rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.history-batch > .accordion-header > .accordion-button {
  background: #f2ebf3;
  color: #212529;
  box-shadow: none;
  padding: 1rem 1.25rem;
}

.history-batch > .accordion-header > .accordion-button:not(.collapsed) {
  color: #212529;
  background: #e7d9e9;
}

.history-batch {
  border-top: 1px solid #d8c2dc;
}

.history-batch:first-child {
  border-top: 0;
}

.history-batch-summary {
  display: grid;
  grid-template-columns: auto minmax(170px, 220px) minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  align-items: center;
  padding-right: 1rem;
}

.history-batch-badge {
  min-width: 7.25rem;
}

.history-batch-time {
  font-weight: 600;
  color: #212529;
}

.history-batch-notes {
  color: #6c757d !important;
}

.history-batch > .accordion-header > .accordion-button::after {
  filter: none;
}

.history-batch-notes {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .history-batch-summary,
  .status-entry-summary {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding-right: 0.5rem;
  }

  .history-batch-notes,
  .status-entry-notes {
    white-space: normal;
  }
}
