/**
 * Trailmark — shared custom CSS (plain CSS, not the webpack SCSS bundle).
 *
 * Use for patterns documented in the UI component library that are not yet
 * (or should not be) in assets/theme/custom.scss.
 *
 * In Blade, load after the main theme so variables from index.css apply:
 *   <link rel="stylesheet" href="<?= asset_url('assets/mdb5/css/index.min.css') ?>" />
 *   <link rel="stylesheet" href="<?= asset_url('assets/mdb5/css/index.css') ?>" />
 *   <link rel="stylesheet" href="<?= asset_url('assets/css/trailmark-custom-styles.css') ?>" />
 *
 * Dashboard layout samples (copy-paste): classes prefixed with tm-dash-* (see component library).
 * Production dashboard widgets (tm-dashboard-*, tm-recent-image-*) live in app/Views/dashboard/dashboard.blade.php.
 *
 * In-page icon toolbar (pill): .tm-inpage-nav-pill, .tm-inpage-nav-pill__link, optional .tm-inpage-nav-pill--deep-water, .tm-inpage-nav-pill--eeeeed.
 *
 * Outline primary + icon matching secondary hover: defined in assets/theme/custom.scss as .tm-btn-outline-with-icon.
 */

/* ----- In-page navigation pill (toolbar row of icon links, any count) ----- */
/* Expects :root theme vars from index.css (e.g. --salalBerryLite, --deepWater, --salalBerry). Use icon-fill-on-hover on each link (assets/theme/custom.scss). */

.tm-inpage-nav-pill {
  --tm-inpage-nav-pill-min-width: 11.5rem;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  column-gap: 0.25rem;
  min-width: min(100%, var(--tm-inpage-nav-pill-min-width, 11.5rem));
  background: var(--salalBerryLite, #c6ccd8);
  border-radius: 9999px;
  padding: 0.45rem 0.65rem;
  box-shadow: none;
}

.tm-inpage-nav-pill__link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.2rem;
  color: var(--deepWater, #35485b);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.tm-inpage-nav-pill__link:hover {
  color: var(--salalBerry, #4f597b);
}

.tm-inpage-nav-pill__link.active {
  color: var(--deepWater, #35485b);
  font-weight: 600;
}

.tm-inpage-nav-pill__link i {
  pointer-events: none;
}

.tm-inpage-nav-pill--deep-water {
  background: var(--deepWater, #35485b);
}

.tm-inpage-nav-pill--deep-water .tm-inpage-nav-pill__link {
  color: rgba(255, 255, 255, 0.9);
}

.tm-inpage-nav-pill--deep-water .tm-inpage-nav-pill__link:hover {
  color: #fff;
}

.tm-inpage-nav-pill--deep-water .tm-inpage-nav-pill__link.active {
  color: #fff;
  font-weight: 600;
}

/* Off-white surface; pair with fa-duotone fa-light icons if desired */
.tm-inpage-nav-pill--eeeeed {
  background: #eeeeed;
}

.tm-inpage-nav-pill--eeeeed .tm-inpage-nav-pill__link {
  color: var(--deepWater, #35485b);
}

.tm-inpage-nav-pill--eeeeed .tm-inpage-nav-pill__link:hover {
  color: var(--salalBerry, #4f597b);
}

.tm-inpage-nav-pill--eeeeed .tm-inpage-nav-pill__link.active {
  color: var(--deepWater, #35485b);
  font-weight: 600;
}

/* ----- Broken image thumbnail placeholder (tmpage.createThumbFallbackElement / thumbError) ----- */

.tm-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 2px dotted rgba(201, 29, 29, 0.38);
  border-radius: 0.35rem;
  background: transparent;
  cursor: help;
}

.tm-thumb-fallback .fa-light {
  font-size: 1.15rem;
  line-height: 1;
  color: var(--danger);
}

.dev-dashboard-board .main-content-blocks {
  padding: 1.25rem 1rem;
}

@media (min-width: 768px) {
  .dev-dashboard-board .main-content-blocks {
    padding: 1.5rem 1.5rem;
  }
}

.dev-dashboard-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .dev-dashboard-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tm-dash-placeholder {
  min-height: 7.5rem;
  border: 2px dotted var(--storm, #bcbdb8);
  border-radius: var(--card-border-radius, 0.75rem);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--granite, #737570);
  font-size: 0.875rem;
  padding: 1rem;
}

/* Integrated “header” inside one .card-body (no .card-header) */

.tm-dash-card-band {
  border: 0;
  box-shadow: 0 0.125rem 0.35rem rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.tm-dash-card-band__ribbon {
  background: linear-gradient(135deg, #448625 0%, #35691e 55%, #2d5a18 100%);
  color: #fff;
  padding: 0.9rem 1rem 0.85rem;
  flex-shrink: 0;
}

.tm-dash-card-band__ribbon-title {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.tm-dash-card-band__ribbon-meta {
  display: block;
  font-size: 0.72rem;
  opacity: 0.9;
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-dash-card-band__content {
  padding: 1rem;
  flex: 1 1 auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tm-dash-card-sheet {
  background: #eeebe2;
  border: 1px solid #d9d0b8 !important;
  box-shadow: 0 0.15rem 0.4rem rgba(65, 62, 57, 0.08);
}

.tm-dash-card-sheet .card-body {
  background: transparent;
}

.tm-dash-card-sheet__head {
  border-bottom: 3px solid #e9c12d;
  color: #413e39;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.tm-dash-card-sheet__head-title {
  font-family: "DM Serif Display", serif;
  font-size: 1.15rem;
  line-height: 1.2;
}

.tm-dash-card-sheet__head .fa-light {
  color: #7d6431;
  font-size: 1.2rem;
}

.tm-dash-card-sheet .tm-dash-placeholder {
  border-color: rgba(79, 78, 100, 0.35);
  color: #4f4e64;
}

.tm-dash-card-dusk {
  border: 0;
  box-shadow: 0 0.125rem 0.35rem rgba(36, 35, 58, 0.14);
  overflow: hidden;
}

.tm-dash-card-dusk__cap {
  background: #c6ccd8;
  border-left: 6px solid #4f4e64;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.tm-dash-card-dusk__cap-title {
  font-weight: 600;
  font-size: 1rem;
  color: #24233a;
  letter-spacing: 0.02em;
}

.tm-dash-card-dusk__cap-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #716e8c;
  white-space: nowrap;
}

.tm-dash-card-dusk__main {
  flex: 1 1 auto;
  background: #fff;
  min-height: 0;
}

.tm-dash-card-dusk .tm-dash-placeholder {
  border-color: rgba(79, 89, 123, 0.4);
  color: #4f597b;
}

.tm-dash-card-signal {
  background: #fff;
  border: 1px solid rgba(53, 72, 91, 0.12);
  box-shadow: 0 0.1rem 0.35rem rgba(53, 72, 91, 0.07);
}

.tm-dash-card-signal__top {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.tm-dash-card-signal__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #c3d8d2;
  box-shadow: 0 0 0 3px rgba(195, 216, 210, 0.45);
  margin-top: 0.32rem;
  flex-shrink: 0;
}

.tm-dash-card-signal__eyebrow {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #737570;
  margin-bottom: 0.12rem;
}

.tm-dash-card-signal__title {
  font-weight: 600;
  font-size: 1rem;
  color: #35485b;
  line-height: 1.25;
}

.tm-dash-card-signal .tm-dash-placeholder {
  border-color: rgba(53, 72, 91, 0.22);
  color: #35485b;
}

/* fa-light in primary card headers (theme SCSS targets .fas/.far for size/color) */
.card-header .tm-card-header-icon .fa-light {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.92);
}

/* ----- Dashboard wide layouts ----- */

.dev-dashboard-wide-stack {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tm-dash-wide-title {
  margin: 0 0 0.75rem;
  margin-top: 0 !important;
  color: #35485b;
  font-size: 1.2rem;
  line-height: 1.25;
}

.tm-dash-card-wide {
  border: 1px solid rgba(65, 62, 57, 0.15);
  box-shadow: 0 0.2rem 0.55rem rgba(65, 62, 57, 0.08);
}

.tm-dash-card-wide .card-body {
  padding: 0;
}

.tm-dash-card-wide--tall {
  min-height: 34rem;
}

.tm-dash-file-table {
  width: 100%;
  border-collapse: collapse;
}

.tm-dash-file-table thead th {
  background: #eeebe2;
  color: #413e39;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(65, 62, 57, 0.15);
  white-space: nowrap;
  vertical-align: middle;
}

.tm-dash-file-table tbody td {
  padding: 0.78rem 1rem;
  border-bottom: 1px solid rgba(65, 62, 57, 0.12);
  color: #413e39;
  font-size: 0.9rem;
  vertical-align: middle;
}

.tm-dash-file-table tbody tr:last-child td {
  border-bottom: 0;
}

.tm-dash-file-table__mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #35485b;
}

.tm-dash-file-table__dot {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: #c6ccd8;
  color: #24233a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tm-dash-file-table__tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-dash-file-table__tag--urgent {
  color: #6f1717;
  background: #f6d8d8;
}

.tm-dash-file-table__tag--validating {
  color: #39436d;
  background: #dde2f5;
}

.tm-dash-file-table__tag--resolved {
  color: #4a4a4a;
  background: #e7e5e1;
}

.tm-dash-file-table__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(65, 62, 57, 0.12);
  background: #f6f5f3;
}

.tm-dash-file-table__footer-note {
  font-size: 0.84rem;
  color: #737570;
}

.tm-dash-file-table__pager {
  display: inline-flex;
  gap: 0.4rem;
}

.tm-dash-file-table__pager-btn {
  border: 1px solid rgba(65, 62, 57, 0.2);
  background: #fff;
  color: #413e39;
  padding: 0.27rem 0.8rem;
  border-radius: 0.45rem;
  font-size: 0.82rem;
}

.tm-dash-split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 992px) {
  .tm-dash-split-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
}

.tm-dash-pane {
  background: #fff;
  border: 1px solid rgba(65, 62, 57, 0.12);
  border-radius: 0.6rem;
  overflow: hidden;
  min-height: 0;
}

.tm-dash-pane--left {
  display: flex;
  flex-direction: column;
}

.tm-dash-tabs {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.8rem 0.8rem 0.5rem;
}

.tm-dash-tab {
  border: 1px solid rgba(65, 62, 57, 0.18);
  background: #fff;
  color: #413e39;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.tm-dash-tab.active {
  background: #35485b;
  color: #fff;
  border-color: #35485b;
}

.tm-dash-pane--left .tm-dash-file-table-wrap {
  flex: 1 1 auto;
}

.tm-dash-right-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(210px, 1fr);
  gap: 1rem;
}

.tm-dash-right-stack > .tm-dash-pane:first-child .tm-dash-file-table thead th {
  font-size: 0.68rem;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.tm-dash-right-stack > .tm-dash-pane:first-child .tm-dash-file-table tbody td {
  font-size: 0.82rem;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.tm-dash-map {
  min-height: 210px;
  border-radius: 0.6rem;
  border: 1px solid rgba(53, 72, 91, 0.22);
  background: linear-gradient(145deg, #d7e6e2 0%, #c3d8d2 45%, #c6ccd8 100%);
  position: relative;
  overflow: hidden;
}

.tm-dash-map:before,
.tm-dash-map:after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 2px solid rgba(53, 72, 91, 0.3);
}

.tm-dash-map:before {
  width: 82px;
  height: 82px;
  top: 20%;
  left: 15%;
}

.tm-dash-map:after {
  width: 56px;
  height: 56px;
  right: 18%;
  bottom: 16%;
}

.tm-dash-map__pin {
  width: 0.95rem;
  height: 0.95rem;
  background: #c91d1d;
  border: 2px solid #fff;
  border-radius: 999px;
  position: absolute;
  box-shadow: 0 0 0 2px rgba(201, 29, 29, 0.2);
}

.tm-dash-map__pin--a {
  top: 30%;
  left: 30%;
}

.tm-dash-map__pin--b {
  top: 55%;
  right: 25%;
}

.tm-dash-map__label {
  position: absolute;
  left: 0.9rem;
  bottom: 0.85rem;
  font-size: 0.8rem;
  color: #35485b;
  font-weight: 600;
}

/* Station-monitor style left pane (wide split dashboard card) */
.tm-dash-pane--stations {
  padding: 0.75rem;
}

.tm-dash-pane--stations .tm-dash-tabs {
  padding: 0;
  gap: 1.4rem;
  border-bottom: 1px solid rgba(65, 62, 57, 0.2);
  margin-bottom: 0.7rem;
}

.tm-dash-pane--stations .tm-dash-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0.15rem 0.1rem 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #737570;
}

.tm-dash-pane--stations .tm-dash-tab.active {
  color: #35485b;
  border-bottom-color: #35485b;
}

.tm-dash-stations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.tm-dash-stations-add-btn {
  border: 0;
  border-radius: 999px;
  background: #35485b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.42rem 0.8rem;
}

.tm-dash-station-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

@media (min-width: 1200px) {
  .tm-dash-station-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tm-dash-station {
  border: 1px solid rgba(65, 62, 57, 0.16);
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 0.1rem 0.32rem rgba(65, 62, 57, 0.08);
  padding: 0.7rem 0.75rem;
}

.tm-dash-station--full {
  grid-column: 1 / -1;
}

.tm-dash-station__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.tm-dash-station__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #413e39;
  line-height: 1.25;
}

.tm-dash-station__meta {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #737570;
}

.tm-dash-station__kebab {
  font-size: 1rem;
  line-height: 1;
  color: #737570;
}

.tm-dash-station__rows {
  margin-top: 0.45rem;
}

.tm-dash-station__row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.34rem 0;
  border-top: 1px solid rgba(65, 62, 57, 0.12);
}

.tm-dash-station__label {
  font-size: 0.72rem;
  color: #737570;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tm-dash-station__spark {
  height: 0.14rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #35485b 0%,
    #35485b 38%,
    rgba(53, 72, 91, 0.3) 38%,
    rgba(53, 72, 91, 0.3) 100%
  );
}

.tm-dash-station__spark--step {
  background: linear-gradient(
    90deg,
    rgba(53, 72, 91, 0.35) 0%,
    rgba(53, 72, 91, 0.35) 18%,
    #35485b 18%,
    #35485b 62%,
    rgba(53, 72, 91, 0.35) 62%,
    rgba(53, 72, 91, 0.35) 100%
  );
}

.tm-dash-station__spark--alert {
  background: linear-gradient(
    90deg,
    #c91d1d 0%,
    #c91d1d 12%,
    #35485b 12%,
    #35485b 62%,
    rgba(53, 72, 91, 0.35) 62%,
    rgba(53, 72, 91, 0.35) 100%
  );
}

.tm-dash-station__value {
  font-size: 0.74rem;
  color: #737570;
  font-weight: 600;
  white-space: nowrap;
}
