/* =============================================================================
   Downtime Dashboard — Campaign GM between-session view
   ============================================================================= */

.downtime-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Summary Bar */
.downtime-summary-bar {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
}

.downtime-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 0.5rem;
}

.downtime-summary-stat.attention .downtime-summary-value {
  color: var(--warning);
}

.downtime-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.downtime-summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Sections */
.downtime-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 1.25rem;
}

.downtime-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-primary);
  padding-bottom: 0.5rem;
}

/* Party Grid */
.downtime-party-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

/* PC Card */
.downtime-pc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.downtime-pc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.downtime-pc-name {
  font-weight: 600;
  color: var(--accent-red);
  text-decoration: none;
}

.downtime-pc-name:hover {
  color: var(--accent-red-hover);
  text-decoration: underline;
}

.downtime-pc-player {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* HP Bar */
.downtime-hp-bar {
  position: relative;
  height: 18px;
  background: var(--border-primary);
  border-radius: 3px;
  overflow: hidden;
}

.downtime-hp-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.downtime-hp-bar-fill.hp-bar-high {
  background: var(--success);
}

.downtime-hp-bar-fill.hp-bar-mid {
  background: var(--warning);
}

.downtime-hp-bar-fill.hp-bar-low {
  background: var(--error);
}

.downtime-hp-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Condition Badges */
.downtime-condition-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.downtime-condition-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--warning);
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 3px;
}

/* Bulk Actions */
.downtime-bulk-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* XP Form */
.downtime-xp-form {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.downtime-xp-actions {
  display: flex;
  gap: 0.5rem;
}

/* Quick Links */
.downtime-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =============================================================================
   Mobile Responsive — Downtime
   ============================================================================= */

/* --- Tablet (768px) --- */
@media (max-width: 768px) {
  .downtime-summary-bar {
    flex-wrap: wrap;
  }

  .downtime-summary-stat {
    flex: 0 0 calc(50% - 0.5rem);
  }

  .downtime-party-grid {
    grid-template-columns: 1fr;
  }

  .downtime-bulk-actions {
    flex-direction: column;
  }

  .downtime-bulk-actions .button {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  .downtime-xp-actions {
    flex-wrap: wrap;
  }
  .downtime-xp-actions .button {
    min-height: 44px;
  }

  .downtime-quick-links .button {
    min-height: 44px;
  }
}

/* --- Phone (480px) --- */
@media (max-width: 480px) {
  .downtime-summary-bar {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .downtime-summary-stat {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
  }

  .downtime-summary-value {
    font-size: 1.2rem;
  }

  .downtime-summary-label {
    margin-top: 0;
    font-size: 0.7rem;
  }

  .downtime-section {
    padding: 0.75rem;
  }

  .downtime-pc-card {
    padding: 0.6rem;
  }

  .downtime-xp-form {
    padding: 0.75rem;
  }

  .downtime-xp-actions {
    flex-direction: column;
  }
  .downtime-xp-actions .button {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }

  .downtime-quick-links {
    flex-direction: column;
  }
  .downtime-quick-links .button {
    width: 100%;
    min-height: 44px;
    text-align: center;
  }
}
