/* Play Editor Styles */
.play-editor {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 1rem;
}

.play-editor-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
}

.play-editor svg {
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Player selection highlighting */
.player.selected circle {
  stroke: #ffffff !important;
  stroke-width: 4 !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* Highlight selected immovable players (rectangles) */
.player.selected rect {
  stroke: #ffffff !important;
  stroke-width: 4 !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

/* Highlight selected text items, footballs, and icons */
.player.selected text {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 0.5;
  paint-order: stroke fill;
}

.player:hover circle {
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

/* Hover effect for rectangles (immovable players) */
.player:hover rect {
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

/* Hover effect for text elements */
.player:hover text {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

/* Player Control Bar Styles */
.player-control-bar {
  animation: fadeInUp 0.3s ease-out;
  background: #23272f;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-control-bar input[type="text"],
.player-control-bar input[type="color"] {
  transition: all 0.2s ease;
}

.player-control-bar input[type="text"]:focus,
.player-control-bar input[type="color"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.player-control-bar input[type="color"] {
  height: 2rem;
  cursor: pointer;
}

/* Player path styles */
.player-path {
  pointer-events: none;
}

.player-paths-container {
  /* Container for all player paths to ensure proper layering */
  z-index: 10;
}

.player-path line,
.player-path path,
.player-path circle {
  opacity: 0.9;
  /* Ensure paths render above end zones */
  z-index: 15;
}

.player-path line:hover,
.player-path path:hover {
  opacity: 1;
  stroke-width: 4 !important;
}

/* End zones should have lower z-index than paths */
.end-zones {
  z-index: 1;
}

.end-zones rect {
  z-index: 1;
}

/* Players should be above paths */
.player {
  z-index: 20;
}

/* Immovable checkbox styles */
.immovable-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #ffffff;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
}

.immovable-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: #3b82f6;
}

.immovable-checkbox:hover {
  color: #e5e7eb;
}

/* Field grid styles */
.field .grid {
  opacity: 0.1;
}

.field .yard-lines {
  opacity: 0.4;
}

/* Emoji Button Styles - Following UI Guidelines */
.emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4em;
  height: 2.4em;
  font-size: 1.2em;
  background: #f3f4f6;
  border: none !important;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  color: #2c3e50;
  text-decoration: none;
  outline: none;
  box-shadow: none;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  padding: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

.emoji-btn:hover,
.emoji-btn:focus {
  background: #e0e7ef;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.4) !important;
  outline: none;
}

.emoji-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f3f4f6;
  box-shadow: none !important;
}

.emoji-btn:disabled:hover {
  background: #f3f4f6;
  box-shadow: none !important;
}

/* Active state for emoji buttons */
.emoji-btn.active {
  background: #3b82f6 !important;
  color: white !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4) !important;
}

html.dark-mode .emoji-btn.active,
body.dark-mode .emoji-btn.active {
  background: #3b82f6 !important;
  color: white !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4) !important;
}

/* Dark mode support for emoji buttons */
html.dark-mode .emoji-btn,
body.dark-mode .emoji-btn {
  background: #23272f;
  color: #f3f4f6;
}

html.dark-mode .emoji-btn:hover,
html.dark-mode .emoji-btn:focus,
body.dark-mode .emoji-btn:hover,
body.dark-mode .emoji-btn:focus {
  background: #323846;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.4) !important;
}

html.dark-mode .emoji-btn:disabled,
body.dark-mode .emoji-btn:disabled {
  background: #23272f;
  box-shadow: none !important;
}

html.dark-mode .emoji-btn:disabled:hover,
body.dark-mode .emoji-btn:disabled:hover {
  background: #23272f;
  box-shadow: none !important;
}

/* Control button groups */
.control-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.control-group .emoji-btn {
  flex-shrink: 0;
}

/* Form styling for play editor */
.play-form {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
}

.play-form h2 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.play-form .form-group {
  margin-bottom: 1rem;
}

.play-form label {
  display: block;
  color: #d1d5db;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.play-form input,
.play-form select,
.play-form textarea {
  width: 100%;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 6px;
  padding: 0.75rem;
  color: #ffffff;
  font-size: 0.875rem;
}

.play-form input:focus,
.play-form select:focus,
.play-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Instructions styling */
.editor-instructions {
  border-top: 1px solid #4b5563;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.editor-instructions p {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.editor-instructions ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.editor-instructions li {
  color: #6b7280;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

/* Responsive layout */
@media (max-width: 1024px) {
  .play-editor-layout {
    grid-template-columns: 1fr;
  }
  
  .play-editor svg {
    max-width: 100%;
    height: auto;
  }
}

/* Dark mode specific overrides */
body.dark .play-form {
  background: #111827;
  border-color: #1f2937;
}

body.dark .play-form input,
body.dark .play-form select,
body.dark .play-form textarea {
  background: #1f2937;
  border-color: #374151;
}

/* Player list styling */
.player-list {
  max-height: 400px;
  overflow-y: auto;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #374151;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.player-symbol {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
}

.player-name {
  color: #ffffff;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.player-details {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Form actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #374151;
  margin-top: 1.5rem;
}

.form-actions button,
.form-actions a {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

/* Override form-actions styles for emoji buttons */
.form-actions .emoji-btn {
  padding: 0 !important;
  width: 2.4em !important;
  height: 2.4em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.form-actions .btn-cancel {
  background: #6b7280;
  color: #ffffff;
  border: none;
}

.form-actions .btn-cancel:hover {
  background: #4b5563;
}

.form-actions .btn-submit {
  background: #3b82f6;
  color: #ffffff;
  border: none;
}

.form-actions .btn-submit:hover {
  background: #2563eb;
}

/* Play Editor 2-Column Layout */
.play-editor-container,
.formation-editor-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.play-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.play-editor-header h1 {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

/* Light mode styles for play editor sections */
.play-editor-left {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #d1d5db;
  color: #374151;
}

.play-editor-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.play-details-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #d1d5db;
  color: #374151;
}

.play-editor-controls {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #d1d5db;
  color: #374151;
}

/* Dark mode overrides for play editor sections */
html.dark-mode .play-editor-left,
html.dark-mode .play-editor-right,
html.dark-mode .play-details-section,
html.dark-mode .play-editor-controls,
body.dark-mode .play-editor-left,
body.dark-mode .play-editor-right,
body.dark-mode .play-details-section,
body.dark-mode .play-editor-controls {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #f3f4f6 !important;
}

.play-editor-layout {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr;
  gap: 2rem;
  align-items: start;
  margin: 0 auto;
  max-width: 1600px;
}

/* Removed - replaced with light/dark mode responsive styles above */

.play-editor-controls h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f3f4f6;
}

.control-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.control-btn {
  background: #374151;
  border: none;
  border-radius: 6px;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f3f4f6;
}

.control-btn:hover {
  background: #4b5563;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.control-btn:disabled:hover {
  background: #374151;
  box-shadow: none;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f3f4f6;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.form-input, .form-select {
  width: calc(100% - 1rem);
  margin-left: 0;
  margin-right: 1rem;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.75rem;
  color: #374151;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-display {
  width: calc(100% - 1rem);
  margin-left: 0;
  margin-right: 1rem;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.75rem;
  color: #374151;
  font-size: 0.875rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.btn-primary {
  background: #3b82f6;
  color: #ffffff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #6b7280;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #4b5563;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.error-message::before {
  content: "⚠️ ";
  margin-right: 0.25rem;
}

.help-text {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Responsive design */
@media (max-width: 1024px) {
  .play-editor-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .play-editor-container {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .play-editor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .control-buttons {
    justify-content: center;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  /* Match add-item-toolbar button size with mobile emoji-btn size */
  .add-item-toolbar button {
    padding: 0;
    font-size: 1.3rem;
    min-width: 2rem;
    width: 2rem;
    height: 2rem;
    line-height: 1;
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Centered Control Strip */
.control-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(55, 65, 81, 0.5);
  border-radius: 8px;
  border: 1px solid #4b5563;
}

/* Player Settings Panel */
.player-settings-panel {
  padding: 1rem;
  margin-top: 1rem;
  background: rgba(55, 65, 81, 0.3);
  border-radius: 8px;
  border-top: 1px solid #4b5563;
}

.settings-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

/* Square Input Controls */
.square-input {
  width: 3rem;
  height: 3rem;
  border: 1px solid #4b5563;
  border-radius: 6px;
  background: #374151;
  transition: all 0.2s ease;
}

.square-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.symbol-input {
  color: #ffffff;
  text-align: center;
  font-weight: bold;
  font-size: 1.125rem;
  font-family: 'Arial', sans-serif;
}

.color-input {
  cursor: pointer;
  padding: 0;
}

/* Rich Color Picker Widget */
.color-picker-widget {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 8px;
  padding: 0.75rem;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
}

.color-picker-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.color-picker-header {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
}

.color-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.color-picker-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.current-color-display {
  width: 2rem;
  height: 2rem;
  border: 2px solid #4b5563;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.current-color-display:hover {
  border-color: #3b82f6;
}

.basic-color-option {
  width: 2rem;
  height: 2rem;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.basic-color-option:hover {
  border-color: #ffffff;
  transform: scale(1.05);
}

.basic-color-option.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.custom-color-button {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(90deg, 
    #ff0000 0%, #ffff00 16.67%, #00ff00 33.33%, 
    #00ffff 50%, #0000ff 66.67%, #ff00ff 83.33%, #ff0000 100%);
  border: 2px solid #4b5563;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.875rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
  padding: 0;
}

.custom-color-button:hover {
  border-color: #3b82f6;
}

.color-picker-cancel {
  width: 2rem;
  height: 2rem;
  background: #6b7280;
  color: #ffffff;
  border: 2px solid #4b5563;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  z-index: 1001;
}

.color-picker-cancel:hover {
  background: #4b5563;
  border-color: #3b82f6;
}

/* Dark mode support for color picker */
html.dark-mode .color-picker-widget,
body.dark-mode .color-picker-widget {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
}

/* Symbol Picker Widget */
.symbol-picker-widget {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 8px;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  margin-bottom: 0.5rem;
}

.symbol-picker-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.symbol-input-row {
  display: flex;
  justify-content: center;
}

.symbol-text-input {
  padding: 0.5rem;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 4px;
  color: #f3f4f6;
  font-size: 1rem;
  text-align: center;
  width: 4rem;
  text-transform: uppercase;
}

.symbol-text-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.symbol-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.symbol-option {
  padding: 0.5rem;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 4px;
  color: #f3f4f6;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symbol-option:hover {
  background: #4b5563;
  border-color: #6b7280;
}

.symbol-option.selected {
  background: #3b82f6;
  border-color: #2563eb;
  color: white;
}

.symbol-picker-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.symbol-picker-ok,
.symbol-picker-cancel {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.symbol-picker-ok {
  background: #10b981;
  color: white;
}

.symbol-picker-ok:hover {
  background: #059669;
}

.symbol-picker-cancel {
  background: #6b7280;
  color: white;
}

.symbol-picker-cancel:hover {
  background: #4b5563;
}

/* Dark mode support for symbol picker */
html.dark-mode .symbol-picker-widget,
body.dark-mode .symbol-picker-widget {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
}

/* Duplicate removed - dark mode styles are now defined above with light mode styles */

html.dark-mode .form-label,
html.dark-mode .form-group label,
body.dark-mode .form-label,
body.dark-mode .form-group label {
  color: #d1d5db !important;
}

html.dark-mode .form-input,
html.dark-mode .form-select,
html.dark-mode .form-textarea,
body.dark-mode .form-input,
body.dark-mode .form-select,
body.dark-mode .form-textarea {
  background: #374151 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

html.dark-mode .form-display,
body.dark-mode .form-display {
  background: #2d3748 !important;
  border-color: #4b5563 !important;
  color: #f3f4f6 !important;
}

html.dark-mode .form-input:focus,
html.dark-mode .form-select:focus,
html.dark-mode .form-textarea:focus,
body.dark-mode .form-input:focus,
body.dark-mode .form-select:focus,
body.dark-mode .form-textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

html.dark-mode .help-text,
body.dark-mode .help-text {
  color: #9ca3af !important;
}

html.dark-mode .error-message,
body.dark-mode .error-message {
  color: #f87171 !important;
}

html.dark-mode .control-strip,
body.dark-mode .control-strip {
  background: rgba(55, 65, 81, 0.5) !important;
  border-color: #4b5563 !important;
}

html.dark-mode .player-settings-panel,
body.dark-mode .player-settings-panel {
  background: rgba(55, 65, 81, 0.3) !important;
  border-color: #4b5563 !important;
}

html.dark-mode .square-input,
body.dark-mode .square-input {
  background: #374151 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important;
}

/* Print Configuration Styles */
.print-config-form {
  max-width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #1f2937;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.settings-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.settings-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.checkbox-group .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.checkbox-text {
  font-weight: 500;
  color: #374151;
}

.form-checkbox {
  width: auto !important;
  margin: 0;
}

.form-help {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
  font-style: italic;
}

.primary-btn {
  background: #3b82f6 !important;
  color: white !important;
}

.primary-btn:hover {
  background: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Dark mode styles for print config */
html.dark-mode .section-header,
body.dark-mode .section-header {
  border-bottom-color: #374151;
}

html.dark-mode .section-title,
body.dark-mode .section-title {
  color: #f9fafb;
}

html.dark-mode .section-subtitle,
body.dark-mode .section-subtitle {
  color: #9ca3af;
}

html.dark-mode .settings-section,
body.dark-mode .settings-section {
  background: #1f2937;
  border-color: #374151;
}

html.dark-mode .settings-title,
body.dark-mode .settings-title {
  color: #f3f4f6;
}

html.dark-mode .checkbox-text,
body.dark-mode .checkbox-text {
  color: #f3f4f6;
}

html.dark-mode .form-help,
body.dark-mode .form-help {
  color: #9ca3af;
}

/* Zone Dialog Widget */
.zone-dialog-widget {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 8px;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 280px;
  margin-bottom: 0.5rem;
}

.zone-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.zone-size-row {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

#zone-diameter {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #374151;
  outline: none;
  cursor: pointer;
}

#zone-diameter::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
}

#zone-diameter::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
}

#zone-diameter:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.zone-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.zone-dialog-ok,
.zone-dialog-cancel {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zone-dialog-ok {
  background: #10b981;
  color: white;
}

.zone-dialog-ok:hover {
  background: #059669;
}

.zone-dialog-cancel {
  background: #6b7280;
  color: white;
}

.zone-dialog-cancel:hover {
  background: #4b5563;
}

/* Default formation indicator styles */
.emoji-btn.default-offense-btn {
  background-color: #3b82f6 !important; /* Blue for offense */
  color: white !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4) !important;
}

.emoji-btn.default-defense-btn {
  background-color: #dc2626 !important; /* Red for defense */
  color: white !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4) !important;
}

/* Dark mode support for default formation buttons */
html.dark-mode .emoji-btn.default-offense-btn,
body.dark-mode .emoji-btn.default-offense-btn {
  background-color: #3b82f6 !important;
  color: white !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.6) !important;
}

html.dark-mode .emoji-btn.default-defense-btn,
body.dark-mode .emoji-btn.default-defense-btn {
  background-color: #dc2626 !important;
  color: white !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.6) !important;
}

/* Hover states for default buttons */
.emoji-btn.default-offense-btn:hover,
.emoji-btn.default-offense-btn:focus {
  background-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.6) !important;
}

.emoji-btn.default-defense-btn:hover,
.emoji-btn.default-defense-btn:focus {
  background-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.6) !important;
}

html.dark-mode .emoji-btn.default-offense-btn:hover,
html.dark-mode .emoji-btn.default-offense-btn:focus,
body.dark-mode .emoji-btn.default-offense-btn:hover,
body.dark-mode .emoji-btn.default-offense-btn:focus {
  background-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.7) !important;
}

html.dark-mode .emoji-btn.default-defense-btn:hover,
html.dark-mode .emoji-btn.default-defense-btn:focus,
body.dark-mode .emoji-btn.default-defense-btn:hover,
body.dark-mode .emoji-btn.default-defense-btn:focus {
  background-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.7) !important;
}

/* Segment Editor Widget */
.segment-editor-widget {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  border: 1px solid #4b5563;
  border-radius: 8px;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 320px;
  max-width: 400px;
  margin-bottom: 0.5rem;
}

.segment-editor-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.segment-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.segment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: #374151;
  border-radius: 6px;
  border: 1px solid #4b5563;
}

.segment-label {
  color: #f3f4f6;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 80px;
}

.segment-controls {
  display: flex;
  gap: 0.25rem;
}

.segment-style-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid #4b5563;
  border-radius: 4px;
  background: #374151;
  color: #f3f4f6;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.segment-style-btn:hover {
  background: #4b5563;
  border-color: #6b7280;
}

.segment-style-btn.active {
  background: #3b82f6;
  border-color: #2563eb;
  color: white;
}

/* Dark mode support for segment editor */
html.dark-mode .segment-editor-widget,
body.dark-mode .segment-editor-widget {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
}

html.dark-mode .segment-item,
body.dark-mode .segment-item {
  background: #374151 !important;
  border-color: #4b5563 !important;
}

html.dark-mode .segment-label,
body.dark-mode .segment-label {
  color: #f3f4f6 !important;
}

html.dark-mode .segment-style-btn,
body.dark-mode .segment-style-btn {
  background: #374151 !important;
  border-color: #4b5563 !important;
  color: #f3f4f6 !important;
}

html.dark-mode .segment-style-btn:hover,
body.dark-mode .segment-style-btn:hover {
  background: #4b5563 !important;
  border-color: #6b7280 !important;
}

html.dark-mode .segment-style-btn.active,
body.dark-mode .segment-style-btn.active {
  background: #3b82f6 !important;
  border-color: #2563eb !important;
  color: white !important;
}

/* Add Item Toolbar */
.add-item-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #23272f;
  border: 1px solid #374151;
  border-radius: 8px;
  justify-content: center;
}

.add-item-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25em;
  height: 2.25em;
  font-size: 1.1em;
  background: var(--btn-secondary-bg, #374151);
  border: 1px solid var(--border-color, #4b5563);
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--btn-secondary-text, #f3f4f6);
  text-decoration: none;
  outline: none;
  font-family: system-ui, -apple-system, sans-serif;
  padding: 0;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.add-item-toolbar button:hover {
  background: var(--btn-secondary-hover, #4b5563);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--border-focus, #60a5fa);
}

html.dark-mode .add-item-toolbar,
body.dark-mode .add-item-toolbar {
  background: #1f2937;
  border-color: #374151;
}

/* Text Editor Input */
.text-editor-input {
  padding: 0.5rem;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #1f2937;
  color: #f3f4f6;
  font-family: Arial, sans-serif;
  font-size: 14px;
  min-width: 150px;
}

.text-editor-input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

html.dark-mode .text-editor-input,
body.dark-mode .text-editor-input {
  background: #23272f;
  border-color: #4b5563;
  color: #f3f4f6;
}

html.dark-mode .text-editor-input:focus,
body.dark-mode .text-editor-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}
