:root {
    --bs-danger: #bb2300;
}

/* Core utility overrides */
.bg-danger      { background-color: var(--bs-danger) !important; }
.text-danger    { color: var(--bs-danger) !important; }
.border-danger  { border-color: var(--bs-danger) !important; }

/* Buttons */
.btn-danger {
    color: #fff;
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
}

.btn-danger:hover {
    background-color: #b01e2c;
    border-color: #a31c29;
}

.btn-outline-danger {
    color: var(--bs-danger);
    border-color: var(--bs-danger);
}

.btn-outline-danger:hover {
    background-color: var(--bs-danger);
    color: #fff;
}

/* Override Bootstrap defaults */
body, .card, .btn, .form-control, .navbar, .alert, .badge {
    font-family: 'Nunito', sans-serif;
    font-weight: 500; /* Medium */
}

/* Bold text */
.fw-bold {
    font-weight: 700 !important;
}

.image-container {
  position: relative;
  width: 100%;
  padding-top: 66.66%; /* 2:3 aspect ratio */
  overflow: hidden;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* aspect-fill style */
}

.map-container {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* 2/3 aspect ratio */
}

.map {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.app-badge {
    height: 3rem;
}

.status-bar {
  --circle-size: 60px;     /* icon circle diameter */
  --bar-thickness: 15px;   /* line thickness */
  --bar-offset: -45px;     /* vertical nudge for perfect centering through circles */
  position: relative;
  height: 140px;
}

.status-icon:disabled {
    opacity: 1;
    pointer-events: none;
}

.status-bar .bar-bg,
.status-bar .bar-active {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--bar-thickness);
  border-radius: calc(var(--bar-thickness) / 2);
  top: 50%;
  transform: translateY(var(--bar-offset));
  z-index: 0;
}

.status-bar .bar-bg {
  background-color: var(--bs-secondary);
}

.status-bar .bar-active {
  background-color: #bb2300;
}

@keyframes throb {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(187, 35, 0, 0.4); }
  70%  { transform: scale(1.15); box-shadow: 0 0 10px 5px rgba(187, 35, 0, 0.25); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(187, 35, 0, 0.4); }
}

.status-icon.throbbing {
  animation: throb 3s ease-in-out infinite;
  /*border-color: #bb2300 !important;*/
}

.status-icon {
    transition: transform 0.1s ease;
}
.status-icon:hover {
    transform: scale(1.05);
}
.status-icon:active {
    transform: scale(0.97);
}

.message-list > div:nth-child(odd) {
  background-color: var(--bs-table-striped-bg);
}

/* Status header for dashboard */

.status-header {
  border-radius: 0.75rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* Title + description */
.status-header h4 {
  font-size: 1.05rem;
  line-height: 1.1;
}

.status-header small {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.1;
}

/* Icons and buttons */
.status-header .material-symbols-outlined {
  font-size: 1.4rem;
  line-height: 1;
  position: relative;
  top: 0.03em; /* tiny optical nudge for better centring */
}

.status-header .btn {
  transition: opacity 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
}

.status-header .btn:hover {
  opacity: 0.8;
}

.status-count {
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.issue-card[data-status] {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  max-height: 1200px;
  opacity: 1;
  transform: scale(1);
}

.issue-card[data-status].collapsed {
  max-height: 0;
  opacity: 0;
  transform: scale(0.98);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Snoozed issues */
.issue-card.snoozed-faded {
    opacity: 0.25;
    transition: opacity 0.3s ease;
}

.issue-card.snoozed-hidden {
    display: none !important;
}

/* -------- */

[id^="section-"] {
    scroll-margin-top: 15px;
}

.status-summary {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.status-summary-segment {
    cursor: pointer;
    transition: filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-summary-segment:hover {
    filter: brightness(1.1);
}

.status-summary-segment .material-symbols-outlined {
    line-height: 1;
    vertical-align: middle;
}

.status-count {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.snooze-toggle .btn {
    height: 100%;
}

.snooze-toggle .btn {
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snooze-toggle .material-symbols-outlined {
    font-size: 1.2rem;
    line-height: 1;
}

.calendar {
    border: none;                 /* remove border */
    width: 100%;                  /* fill the card container */
    max-width: none;              /* remove fixed width cap */
}

.calendar {
    border: none;          /* remove outer border */
    margin-bottom: 0.5rem; /* smaller bottom margin (was mb-3) */
    padding: 0.5rem;       /* optional: keep a little inner breathing room */
}

.calendar .d-grid {
    grid-template-columns: repeat(7, 1fr); /* ensure 7 equal-width columns */
    width: 100%;
}

.calendar .day {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;      /* makes them shorter vertically */
    font-size: 0.75rem;
    color: #212529;
    border-radius: 4px;
}

/* For coloured (status) days */
.calendar .day:not([style*="#f8f9fa"]) {
    color: #fff;
    font-weight: 500;
}

.calendar .day.prospective {
    outline: 3px solid rgba(0, 0, 0, 0.5);
    outline-offset: -2px;
    border-radius: 50%;
}

/* Body parts */

html, body {
    height: 100%;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    background-color: color-mix(in srgb, var(--bs-body-bg) 90%, var(--bs-body-color));
    color: var(--bs-body-color);
    margin-top: auto;
}

.rule-dirty td {
    transition: background-color 1s ease;
    background-color: #ffc10715 !important;
}

.example-body .form-select,
.example-body .form-control {
    background-color: #77777710;  /* slightly lighter */
}

.example-body .form-select:disabled,
.example-body .form-control:disabled {
    opacity: 0.5;              /* hint they’re not real inputs */
}