/* Combat Tracker Styles */

/* Session Management - Two boxes side by side */
.combat-session-management {
  max-width: 1000px;
  margin: var(--space-xl) auto;
}

.session-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.session-control-box {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  min-height: 250px;
}

.session-control-box h3 {
  margin: 0 0 var(--space-xs) 0;
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.session-role-label {
  margin: 0 0 var(--space-md) 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.session-join-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
}

.session-control-box > .combat-button {
  margin-top: auto;
}

/* Combat Tracker */
.combat-tracker {
  margin-top: 0;
}

/* Make container wider for combat tracker page */
.container:has(#combat-tracker) {
  max-width: 1600px;
}

/* Two-Column Layout for Combat Session */
.combat-content-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-lg);
  min-height: 600px;
}

/* Left Sidebar */
.combat-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  height: fit-content;
  position: sticky;
  top: var(--space-md);
}

.combat-sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-bottom: 0;
}

.combat-sidebar-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.combat-sidebar-section-compact {
  gap: 0;
}

.combat-sidebar-section-no-border {
  border-bottom: none;
  padding-bottom: 0;
}

/* Session Code Display */
.session-code-display {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.session-code-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.session-code-value {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.session-code-text {
  color: var(--accent-secondary);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
}

/* Session Info Labels (Spieler, Phase) */
.session-info-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Player List in Sidebar */
.player-list-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Phase Progress (Traffic Light Style) */
.phase-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.phase-progress-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  line-height: 1.2;
}

.phase-progress-icon {
  width: 16px;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.phase-progress-name {
  flex: 1;
}

/* Completed phase - strikethrough with checkmark */
.phase-progress-completed .phase-progress-name {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}

.phase-progress-completed .phase-progress-icon {
  color: var(--text-muted);
}

/* Current phase - bold */
.phase-progress-current .phase-progress-name {
  font-weight: 700;
  color: var(--accent-secondary);
}

/* Upcoming phase - grayed out */
.phase-progress-upcoming .phase-progress-name {
  color: var(--text-muted);
  opacity: 0.5;
}

/* GM Notes Textarea */
.gm-notes-textarea {
  width: 100%;
  padding: var(--space-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  resize: vertical;
  min-height: 120px;
  transition: border-color var(--transition-fast);
}

.gm-notes-textarea:focus {
  outline: none;
  border-color: var(--accent-secondary);
}

.gm-notes-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Bottom Buttons */
.combat-sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.combat-button-full {
  width: 100%;
}

.combat-button-with-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

/* Right Table Area */
.combat-table-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
  position: relative;
  min-height: 600px;
}

/* Waiting Overlay (for players in setup phase) */
.waiting-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.waiting-overlay-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--accent-secondary);
  border-radius: var(--radius-lg);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.waiting-spinner {
  font-size: var(--text-xl);
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Initiative Dialog */
.initiative-modal {
  max-width: 500px;
  width: 95%;
  padding-bottom: var(--space-md);
}

.initiative-formula {
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: left;
}

/* Initiative List - Full Width */
.initiative-list-full {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  max-height: 400px;
  overflow-y: auto;
}

.initiative-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.initiative-list-row-own {
  border-color: #ff8c42;
  border-width: 2px;
}

.initiative-list-row label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.initiative-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.initiative-list-row input[type="number"] {
  width: 80px;
  text-align: center;
}

.initiative-checkmark {
  color: #ff8c42;
  font-weight: bold;
  font-size: var(--text-lg);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.initiative-checkmark.visible {
  opacity: 1;
}

.initiative-waiting-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  min-width: 80px;
  text-align: center;
}

.initiative-value-text {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 600;
  min-width: 80px;
  text-align: center;
}

/* Remove number input arrows */
.initiative-list-row input[type="number"]::-webkit-inner-spin-button,
.initiative-list-row input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.initiative-list-row input[type="number"] {
  -moz-appearance: textfield;
}

.initiative-check-button {
  background: transparent;
  border: 2px solid #ff8c42;
  color: #ff8c42;
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.initiative-check-button:hover:not(:disabled) {
  background: #ff8c42;
  color: white;
  transform: scale(1.1);
}

.initiative-check-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.initiative-check-button.submitted {
  background: #ff8c42;
  color: white;
  border-color: #ff8c42;
}

/* Initiative list */
.initiative-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-height: 400px;
  overflow-y: auto;
}

.initiative-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.initiative-list-item.submitted {
  border-color: #ff8c42;
}

.initiative-list-item-name {
  font-weight: 600;
}

.initiative-list-item-status {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.initiative-list-item-status.submitted {
  color: #ff8c42;
}

/* Initiative GM Controls */
.initiative-gm-controls {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Session Header Bar */
.combat-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.session-header-left {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  flex-wrap: wrap;
  flex: 1;
}

.session-header-right {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

/* Code Section */
.session-code-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.session-code-value {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Players Section */
.session-players-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
}

.session-header-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.session-header-value {
  color: var(--accent-secondary);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

/* Player List Grid */
.player-list-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-start;
  max-height: 100px;
  overflow-y: auto;
  flex-wrap: wrap;
}

/* Player Status */
.player-status-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--text-primary);
  white-space: nowrap;
}

.player-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Add Row Form */
.combat-add-row {
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.combat-add-row h3 {
  margin: 0 0 var(--space-md) 0;
  font-size: var(--text-base);
  color: var(--text-primary);
}

.combat-form-grid-new {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: var(--space-sm);
  align-items: center;
}

.combat-form-grid-new input:nth-child(1),
.combat-form-grid-new input:nth-child(2),
.combat-form-grid-new input:nth-child(3) {
  grid-column: span 1;
}

.combat-form-grid-new input:nth-child(4),
.combat-form-grid-new input:nth-child(5),
.combat-form-grid-new input:nth-child(6),
.combat-form-grid-new input:nth-child(7) {
  grid-column: span 1;
}

.combat-form-grid-new button {
  grid-column: span 1;
}

/* Inputs */
.combat-input {
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
  width: 100%;
}

.combat-input:focus {
  outline: none;
  border-color: var(--accent-secondary);
}

.combat-input::placeholder {
  color: var(--text-muted);
}

/* Buttons */
.combat-button {
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-secondary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  width: 100%;
}

.combat-button:hover:not(:disabled) {
  background: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.combat-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.combat-button-primary {
  background: var(--accent-primary);
}

.combat-button-primary:hover:not(:disabled) {
  background: var(--accent-secondary);
}

.combat-button-orange {
  background: #ff8c42;
  color: white;
}

.combat-button-orange:hover:not(:disabled) {
  background: #ff7a2e;
}

.combat-button-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.combat-button-secondary:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--accent-secondary);
}

.combat-button-danger {
  background: var(--accent-danger);
  color: white;
}

.combat-button-danger:hover:not(:disabled) {
  background: #b71c1c;
}

.combat-button-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 var(--space-xs);
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.combat-button-icon .material-icon {
  font-size: 18px;
}

.combat-button-icon:hover {
  transform: scale(1.1);
  color: var(--accent-secondary);
}

/* Icon Text Buttons (Material Icons) */
.combat-button-icon-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.combat-button-icon-text:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-secondary);
  transform: translateY(-2px);
}

.combat-button-icon-text.combat-button-danger {
  background: var(--accent-danger);
  color: white;
  border-color: var(--accent-danger);
}

.combat-button-icon-text.combat-button-danger:hover {
  background: #b71c1c;
  border-color: #b71c1c;
}

.material-icon {
  font-family: 'Material Icons';
  font-size: 18px;
  line-height: 1;
}

/* Combat Table */
.combat-table-container {
  position: relative;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.combat-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px 0;
  background: var(--bg-secondary);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.combat-table thead,
.combat-table tbody,
.combat-table tfoot {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.combat-table tbody {
  display: block;
  overflow-y: auto;
  flex: 1;
}

.combat-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.combat-table tfoot {
  display: block;
}

.combat-table tfoot tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.combat-table thead {
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.combat-table th {
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  border-right: 1px solid var(--border-color);
}

.combat-table th:last-child {
  border-right: none;
}

.combat-table td {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.combat-table td:last-child {
  border-right: none;
}

.combat-table tbody tr:last-child td {
  border-bottom: none;
}

.combat-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.combat-table tbody tr.active-row {
  background: rgba(255, 140, 66, 0.15);
  border-left: 3px solid #ff8c42;
}

.combat-table tbody tr.active-row:hover {
  background: rgba(255, 140, 66, 0.25);
}

.combat-table td.active-cell {
  background: rgba(255, 140, 66, 0.25) !important;
  outline: 2px solid #ff8c42 !important;
  outline-offset: -2px;
  position: relative;
  border-radius: var(--radius-sm);
}

.combat-table td.active-cell:hover {
  background: rgba(255, 140, 66, 0.35) !important;
}

.combat-table td:nth-child(2) {
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
  font-size: var(--text-base);
}

.combat-table td[contenteditable="true"] {
  cursor: text;
  position: relative;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), outline var(--transition-fast);
}

/* Active cells with confirm button need extra padding */
.combat-table td[contenteditable="true"].active-cell {
  padding-right: 44px;
}

[data-theme="dark"] .combat-table td[contenteditable="true"] {
  background: rgba(255, 255, 255, 0.03);
}

.combat-table td[contenteditable="true"]:hover {
  background: var(--bg-primary);
  outline: 1px solid var(--accent-secondary);
  outline-offset: -1px;
}

.combat-table td[contenteditable="true"]:focus {
  background: var(--bg-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: -2px;
}

/* Confirm button inside editable cells (actions phase) */
.combat-table td[contenteditable="true"] .combat-button-icon.combat-button-confirm {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}

.combat-table td[contenteditable="true"] .combat-button-icon.combat-button-confirm:hover {
  transform: translateY(-50%) scale(1.05);
}

/* Table Footer - Add Row Button */
.combat-table tfoot {
  background: var(--bg-secondary);
}

.add-row-cell {
  text-align: right;
  padding: var(--space-sm) var(--space-md) !important;
  border-top: 1px solid var(--border-color);
}

.combat-button-add-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.combat-button-add-row:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-secondary);
  transform: translateY(-1px);
}

.combat-button-add-row .material-icon {
  font-size: 16px;
}

/* Action cell with buttons */
.action-cell {
  text-align: right;
  padding: var(--space-xs) !important;
  vertical-align: middle;
}

.action-cell-buttons {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.combat-button-delete {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  transition: transform var(--transition-fast);
  color: var(--text-muted);
  opacity: 0.8;
}

.combat-button-delete .material-icon {
  font-size: 18px;
}

.combat-button-delete:hover {
  transform: scale(1.2);
  opacity: 1;
  color: var(--accent-danger);
}

/* Icon Buttons - shown side by side */
.combat-button-icon {
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.combat-button-icon .material-icon {
  font-size: 18px;
}

.combat-button-icon.combat-button-confirm {
  background: var(--accent-secondary);
  color: var(--bg-primary);
}

.combat-button-icon.combat-button-confirm:hover {
  background: var(--accent-primary);
  transform: scale(1.05);
}

.combat-button-icon.combat-button-delete {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.combat-button-icon.combat-button-delete:hover {
  background: var(--accent-danger);
  color: white;
  transform: scale(1.05);
}

/* Notices */
.combat-notice {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-weight: 600;
  text-align: center;
}

.combat-notice-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

[data-theme="light"] .combat-notice-warning {
  background: #fff3cd;
  color: #856404;
}

/* Phase Transition Toast */
.phase-toast {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.3);
  animation: phaseToastBackdropFadeIn 0.3s ease-out;
}

.phase-toast-content {
  background: var(--accent-secondary);
  color: var(--bg-primary);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-lg);
  font-weight: 700;
  animation: phaseToastContentFadeIn 0.3s ease-out;
}

.phase-toast-icon {
  font-size: var(--text-2xl);
}

@keyframes phaseToastBackdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes phaseToastContentFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal Dialog */
.combat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.combat-modal-content {
  background: var(--bg-secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 90%;
  box-shadow: var(--shadow-lg);
}

/* Only apply max-width to non-initiative modals */
.combat-modal-content:not(.initiative-modal) {
  max-width: 500px;
}

.combat-modal-content h2 {
  margin-top: 0;
  margin-bottom: var(--space-md);
  font-size: var(--text-xl);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: var(--space-sm);
}

.combat-modal-content p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.combat-modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.combat-modal-form label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

.combat-modal-form label:first-child {
  margin-top: 0;
}

.combat-modal-content .combat-input {
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-base);
}

.combat-modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: space-between;
}

.combat-modal-actions button {
  flex: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .combat-form-grid-new {
    grid-template-columns: repeat(3, 1fr);
  }

  .combat-form-grid-new input:nth-child(1),
  .combat-form-grid-new input:nth-child(2) {
    grid-column: span 1;
  }

  .combat-form-grid-new input:nth-child(3) {
    grid-column: span 1;
  }

  .combat-form-grid-new input:nth-child(4),
  .combat-form-grid-new input:nth-child(5),
  .combat-form-grid-new input:nth-child(6),
  .combat-form-grid-new input:nth-child(7) {
    grid-column: span 1;
  }

  .combat-form-grid-new button {
    grid-column: span 3;
  }
}

@media (max-width: 768px) {
  .session-controls-grid {
    grid-template-columns: 1fr;
  }

  /* Stack sidebar on top of table on mobile */
  .combat-content-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .combat-sidebar {
    position: relative;
    top: 0;
  }

  .combat-session-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-header-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-header-right {
    width: 100%;
    justify-content: flex-end;
  }

  .combat-form-grid-new {
    grid-template-columns: 1fr;
  }

  .combat-form-grid-new input,
  .combat-form-grid-new button {
    grid-column: 1;
  }

  .combat-table {
    font-size: var(--text-xs);
  }

  .combat-table th,
  .combat-table td {
    padding: var(--space-xs) var(--space-sm);
  }

  /* Two-column initiative dialog on mobile */
  .initiative-grid {
    grid-template-columns: 1fr;
  }

  .initiative-divider {
    width: 100%;
    height: 2px;
    margin: var(--space-md) 0;
  }
}

@media (max-width: 480px) {
  .combat-modal-content {
    padding: var(--space-lg);
  }

  .session-join-form {
    width: 100%;
  }
}
