/* GM live-quest shell + detail tabs (Starting Text / Previous Expeditions / Party Members).
   Lives in wwwroot so styles are not lost to Blazor CSS isolation on MudBlazor hosts. */

.gm-quest-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 183, 0, 0.5);
  border-radius: 12px;
  background: #111318;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.gm-quest-shell .mud-tabs-tabbar,
.gm-quest-shell .mud-tabs-tabbar-inner,
.gm-quest-shell .mud-tabs-toolbar,
.gm-quest-shell .mud-tabs-toolbar-wrapper {
  border-bottom: 1px solid rgba(255, 183, 0, 0.34) !important;
  background: linear-gradient(180deg, #1c2027 0%, #12151a 100%) !important;
}

.gm-quest-shell .mud-tab {
  color: #d7d9dd !important;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.gm-quest-shell .mud-tab.mud-tab-active {
  color: #ffb300 !important;
}

.gm-quest-shell .mud-tabs-panels,
.gm-quest-shell .mud-tab-panel,
.gm-quest-shell .gm-quest-tab-panel {
  background: #101217 !important;
  color: #f5f5f5 !important;
  padding: 0 !important;
}

.gm-detail-tab {
  position: relative;
  min-height: 560px;
  padding: clamp(0.9rem, 2.4vw, 1.6rem);
  color: #f4f1ea;
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.72), rgba(8, 10, 13, 0.92)),
    url('/images/live-quests/gm-quest-overview.png') center top / cover fixed;
}

.gm-detail-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 1180px;
  margin: 0 auto 1rem;
}

.gm-detail-header > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.gm-detail-kicker,
.gm-detail-header .mud-typography-overline {
  color: #ffb300 !important;
  letter-spacing: 0.16em;
}

.gm-detail-title,
.gm-detail-header .mud-typography-h4 {
  color: #fff !important;
  font-family: 'Cinzel', serif !important;
  text-shadow: 0 2px 12px #000;
}

.gm-detail-subtitle,
.gm-detail-header .mud-typography-body2 {
  color: #c8cbd1 !important;
}

.gm-detail-icon {
  display: grid;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(255, 183, 0, 0.45);
  border-radius: 10px;
  background: rgba(255, 183, 0, 0.08);
  color: #ffb300;
}

.gm-detail-count,
.gm-status-pill {
  border: 1px solid rgba(255, 183, 0, 0.5);
  border-radius: 999px;
  background: rgba(255, 183, 0, 0.09);
  color: #ffd36a;
  font-size: 0.78rem;
  font-weight: 700;
}

.gm-detail-count {
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}

.gm-status-pill {
  display: inline-block;
  min-width: 4.2rem;
  padding: 0.2rem 0.55rem;
  text-align: center;
}

.gm-detail-card {
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 183, 0, 0.3);
  border-radius: 10px;
  background: rgba(14, 17, 22, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  color: #f4f1ea;
}

.gm-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.gm-card-toolbar .mud-typography-subtitle1 {
  color: #ffb300 !important;
  font-weight: 700;
}

.gm-card-toolbar .mud-typography-caption {
  color: #aeb3bc !important;
}

.gm-narrative-copy {
  max-width: 900px;
  padding: clamp(1.2rem, 3vw, 2.25rem);
  color: #dedede;
  font-size: 1.02rem;
  line-height: 1.75;
}

.gm-detail-empty {
  padding: 1.5rem 1.15rem;
  color: #aeb3bc;
}

.gm-expedition-list {
  display: grid;
  gap: 0;
}

.gm-expedition-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gm-expedition-row:first-child {
  border-top: 0;
}

.gm-expedition-row:hover {
  background: rgba(255, 183, 0, 0.07);
}

.gm-expedition-row span {
  color: #aeb3bc;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gm-expedition-row strong {
  display: block;
  margin-top: 0.2rem;
  color: #fff;
  font-size: 0.95rem;
}

.gm-expedition-meta {
  text-align: right;
}

.gm-party-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.15rem 1.15rem;
}

.gm-party-card {
  padding: 1rem;
  border: 1px solid rgba(255, 183, 0, 0.26);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(26, 30, 37, 0.96), rgba(12, 14, 18, 0.96));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.gm-party-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gm-party-card-top > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.gm-party-card-top .mud-typography-h6 {
  color: #fff !important;
}

.gm-party-card-top .mud-typography-caption {
  color: #aeb3bc !important;
}

.gm-hero-avatar {
  display: grid;
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid #ffb300;
  border-radius: 50%;
  color: #ffcf59;
  font-family: 'Cinzel', serif;
  font-weight: 800;
}

.gm-hero-vitals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gm-hero-vitals > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gm-hero-vitals span {
  color: #aeb3bc;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gm-hero-vitals strong {
  color: #fff;
}

/* In-dungeon GM command tab */
.gm-dungeon-tab {
  position: relative;
  min-height: 560px;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  color: #f4f1ea;
  background:
    linear-gradient(180deg, rgba(8, 10, 13, 0.78), rgba(8, 10, 13, 0.94)),
    url('/images/live-quests/gm-quest-overview.png') center top / cover fixed;
}

.gm-dungeon-chrome {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.gm-dungeon-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gm-dungeon-kicker {
  color: #ffb300 !important;
  letter-spacing: 0.16em;
}

.gm-dungeon-title {
  color: #fff !important;
  font-family: 'Cinzel', serif !important;
  text-shadow: 0 2px 12px #000;
}

.gm-dungeon-phase {
  border: 1px solid rgba(255, 183, 0, 0.68);
  border-radius: 999px;
  background: rgba(255, 183, 0, 0.12);
  color: #ffd36a;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
}

.gm-dungeon-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.gm-dungeon-stat-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.gm-dungeon-stat-strip > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 183, 0, 0.26);
  border-radius: 8px;
  background: rgba(15, 18, 23, 0.9);
}

.gm-dungeon-stat-strip span {
  color: #aeb3bc;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gm-dungeon-stat-strip strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.gm-dungeon-party-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.55rem;
}

.gm-dungeon-party-chip {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 183, 0, 0.26);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(26, 30, 37, 0.96), rgba(12, 14, 18, 0.96));
}

.gm-dungeon-party-chip-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.gm-dungeon-party-chip-top > div {
  min-width: 0;
  flex: 1;
}

.gm-dungeon-party-chip-top strong {
  display: block;
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.gm-dungeon-party-chip-top span {
  color: #aeb3bc;
  font-size: 0.72rem;
}

.gm-hero-avatar--sm {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

.gm-dungeon-party-chip-vitals {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #d7d9dd;
  font-size: 0.78rem;
}

/* Dark GM reference / workflow panels inside the dungeon tab */
.gm-dungeon-tab .live-quest-panel,
.gm-dungeon-tab .dungeon-counters-panel {
  border: 1px solid rgba(255, 183, 0, 0.28) !important;
  border-radius: 10px !important;
  background: rgba(14, 17, 22, 0.94) !important;
  color: #f4f1ea !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
}

.gm-dungeon-tab .table-title,
.gm-dungeon-tab .mud-typography,
.gm-dungeon-tab .mud-expand-panel-text {
  color: #f4f1ea !important;
}

.gm-dungeon-tab .mud-table,
.gm-dungeon-tab .mud-table-container,
.gm-dungeon-tab .mud-table-root {
  background: transparent !important;
  color: #f4f1ea !important;
}

.gm-dungeon-tab .mud-table-head th {
  border-bottom: 2px solid rgba(255, 181, 0, 0.4) !important;
  color: #ffb500 !important;
  font-family: 'Cinzel', serif !important;
  font-size: 0.82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.gm-dungeon-tab .mud-table-body td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
  color: #f4f1ea !important;
}

.gm-dungeon-tab .mud-table-body tr:hover {
  background: rgba(255, 183, 0, 0.08) !important;
}

.gm-dungeon-tab .mud-expansion-panel,
.gm-dungeon-tab .mud-expand-panel {
  background: transparent !important;
  color: #c8cbd1 !important;
}

.gm-dungeon-tab .mud-alert {
  background: rgba(18, 22, 28, 0.92) !important;
  color: #f4f1ea !important;
}

@media (max-width: 1100px) {
  .gm-dungeon-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .gm-dungeon-tab {
    background-attachment: scroll;
  }

  .gm-dungeon-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gm-dungeon-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 800px) {
  .gm-detail-tab {
    background-attachment: scroll;
  }

  .gm-expedition-row {
    grid-template-columns: 1fr 1fr;
  }

  .gm-expedition-meta {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .gm-quest-shell {
    border-radius: 8px;
  }

  .gm-detail-header,
  .gm-card-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
