/**
 * Campaign Manager Styles
 * Matches GMG Premium Fantasy branding
 */

.campaign-manager {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.cm-header {
  text-align: center;
  margin-bottom: 2rem;
}

.cm-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--primary-color, #40E0D0);
  margin-bottom: 0.5rem;
}

.cm-subtitle {
  color: var(--text-muted, #8899a6);
  font-size: 1rem;
}

.cm-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .cm-layout {
    grid-template-columns: 1fr;
  }
}

.cm-campaigns-panel,
.cm-detail-panel {
  background: var(--card-bg, #1a2332);
  border: 1px solid var(--border-color, #2d3748);
  border-radius: 12px;
  overflow: hidden;
}

.cm-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #2d3748);
  background: rgba(0, 0, 0, 0.2);
}

.cm-panel-header h3 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--text-color, #e8eaed);
}

.cm-campaign-list {
  padding: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.cm-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted, #8899a6);
  font-style: italic;
}

.cm-campaign-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cm-campaign-item:hover {
  background: rgba(64, 224, 208, 0.1);
  border-color: rgba(64, 224, 208, 0.3);
}

.cm-campaign-item.active {
  background: rgba(64, 224, 208, 0.15);
  border-color: var(--primary-color, #40E0D0);
}

.cm-campaign-info {
  flex: 1;
  min-width: 0;
}

.cm-campaign-name {
  font-weight: 600;
  color: var(--text-color, #e8eaed);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-campaign-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.cm-system-badge,
.cm-theme-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(64, 224, 208, 0.2);
  color: var(--primary-color, #40E0D0);
}

.cm-theme-badge {
  background: rgba(138, 43, 226, 0.2);
  color: #b388ff;
}

.cm-campaign-stats {
  font-size: 0.75rem;
  color: var(--text-muted, #8899a6);
  display: flex;
  gap: 0.75rem;
}

.cm-campaign-actions {
  margin-left: 0.5rem;
}

.cm-active-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: var(--primary-color, #40E0D0);
  color: #0a0f1a;
  border-radius: 4px;
  font-weight: 600;
}

.cm-empty-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted, #8899a6);
}

.cm-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.cm-empty-detail h3 {
  margin: 0 0 0.5rem;
  color: var(--text-color, #e8eaed);
}

.cm-detail {
  padding: 1.5rem;
}

.cm-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #2d3748);
}

.cm-detail-title h3 {
  margin: 0 0 0.25rem;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--text-color, #e8eaed);
}

.cm-active-indicator {
  font-size: 0.75rem;
  color: var(--primary-color, #40E0D0);
}

.cm-detail-actions {
  display: flex;
  gap: 0.5rem;
}

.cm-detail-info {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.cm-info-row {
  display: flex;
  margin-bottom: 0.5rem;
}

.cm-info-row:last-child {
  margin-bottom: 0;
}

.cm-info-label {
  color: var(--text-muted, #8899a6);
  width: 100px;
  flex-shrink: 0;
}

.cm-info-value {
  color: var(--text-color, #e8eaed);
}

.cm-pinned-panel,
.cm-history-panel {
  margin-bottom: 1.5rem;
}

.cm-pinned-panel h4,
.cm-history-panel h4 {
  margin: 0 0 1rem;
  font-family: 'Cinzel', serif;
  color: var(--text-color, #e8eaed);
}

.cm-empty-text {
  color: var(--text-muted, #8899a6);
  font-style: italic;
  font-size: 0.9rem;
}

.cm-pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cm-pinned-group {
  background: rgba(64, 224, 208, 0.05);
  border: 1px solid rgba(64, 224, 208, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
}

.cm-pinned-type {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-color, #40E0D0);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(64, 224, 208, 0.2);
  padding-bottom: 0.5rem;
}

.cm-pinned-item {
  padding: 0.4rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin-top: 0.3rem;
  cursor: pointer;
  transition: background 0.2s;
}

.cm-pinned-item:hover {
  background: rgba(64, 224, 208, 0.15);
}

.cm-pinned-label {
  font-size: 0.85rem;
  color: var(--text-color, #e8eaed);
}

.cm-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cm-history-filters {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.cm-history-filters select {
  background: var(--input-bg, #0a0f1a);
  border: 1px solid var(--border-color, #2d3748);
  color: var(--text-color, #e8eaed);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.cm-filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted, #8899a6);
  cursor: pointer;
}

.cm-filter-toggle input {
  cursor: pointer;
}

.cm-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cm-history-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, #2d3748);
  border-radius: 8px;
  transition: all 0.2s;
}

.cm-history-entry:hover {
  background: rgba(64, 224, 208, 0.05);
}

.cm-history-entry.pinned {
  border-color: rgba(64, 224, 208, 0.4);
  background: rgba(64, 224, 208, 0.08);
}

.cm-entry-icon {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

.cm-entry-content {
  flex: 1;
  min-width: 0;
}

.cm-entry-label {
  font-weight: 600;
  color: var(--text-color, #e8eaed);
  margin-bottom: 0.2rem;
}

.cm-entry-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted, #8899a6);
  flex-wrap: wrap;
}

.cm-entry-type {
  background: rgba(64, 224, 208, 0.15);
  color: var(--primary-color, #40E0D0);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.cm-entry-actions {
  display: flex;
  gap: 0.25rem;
}

.btn-icon {
  background: transparent;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  opacity: 0.6;
  transition: all 0.2s;
}

.btn-icon:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon.pinned {
  opacity: 1;
  background: rgba(64, 224, 208, 0.2);
}

.cm-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;
  padding: 1rem;
}

.cm-modal-content {
  background: var(--card-bg, #1a2332);
  border: 1px solid var(--border-color, #2d3748);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.cm-modal-large {
  max-width: 800px;
}

.cm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #2d3748);
  background: rgba(0, 0, 0, 0.2);
}

.cm-modal-header h3 {
  margin: 0;
  font-family: 'Cinzel', serif;
  color: var(--text-color, #e8eaed);
}

.cm-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted, #8899a6);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.cm-close-btn:hover {
  color: var(--text-color, #e8eaed);
}

#campaignForm {
  padding: 1.25rem;
}

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

.cm-form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-color, #e8eaed);
  font-size: 0.9rem;
}

.cm-form-group input,
.cm-form-group select,
.cm-form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--input-bg, #0a0f1a);
  border: 1px solid var(--border-color, #2d3748);
  border-radius: 6px;
  color: var(--text-color, #e8eaed);
  font-size: 0.95rem;
}

.cm-form-group input:focus,
.cm-form-group select:focus,
.cm-form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color, #40E0D0);
}

.cm-form-group small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted, #8899a6);
  font-size: 0.75rem;
}

.cm-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #2d3748);
}

.cm-entry-view {
  padding: 1.25rem;
}

.cm-entry-meta-full p {
  margin: 0.4rem 0;
  color: var(--text-color, #e8eaed);
}

.cm-entry-meta-full strong {
  color: var(--text-muted, #8899a6);
}

.cm-entry-result {
  margin-top: 1rem;
}

.cm-entry-result h4 {
  margin: 0 0 0.75rem;
  color: var(--primary-color, #40E0D0);
}

.cm-entry-result pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.8rem;
  color: var(--text-color, #e8eaed);
  max-height: 400px;
  overflow-y: auto;
}

.campaign-indicator {
  font-size: 0.8rem;
  color: var(--primary-color, #40E0D0);
  background: rgba(64, 224, 208, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--primary-color, #40E0D0);
  color: #0a0f1a;
  font-weight: 600;
}

.btn-primary:hover {
  background: #5ce8da;
}

.btn-secondary {
  background: var(--border-color, #2d3748);
  color: var(--text-color, #e8eaed);
}

.btn-secondary:hover {
  background: #3d4758;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

.cm-panel-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cm-welcome-banner {
  background: linear-gradient(135deg, rgba(64, 224, 208, 0.15) 0%, rgba(138, 43, 226, 0.15) 100%);
  border: 1px solid rgba(64, 224, 208, 0.3);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cm-welcome-icon {
  font-size: 4rem;
}

.cm-welcome-content h3 {
  margin: 0 0 0.5rem;
  font-family: 'Cinzel', serif;
  color: var(--primary-color, #40E0D0);
}

.cm-welcome-content p {
  color: var(--text-muted, #8899a6);
  margin: 0 0 1rem;
}

.cm-session-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, #2d3748);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cm-session-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.cm-session-campaign strong,
.cm-session-label strong {
  color: var(--text-muted, #8899a6);
  margin-right: 0.3rem;
}

.cm-session-campaign {
  color: var(--primary-color, #40E0D0);
  font-weight: 600;
}

.cm-session-label {
  color: #b388ff;
  background: rgba(138, 43, 226, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.cm-no-campaign {
  color: var(--text-muted, #8899a6);
  font-style: italic;
}

.cm-session-controls {
  display: flex;
  gap: 0.5rem;
}

.cm-quick-actions {
  background: rgba(64, 224, 208, 0.05);
  border: 1px solid rgba(64, 224, 208, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.cm-quick-actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cm-quick-actions-header h4 {
  margin: 0;
  font-family: 'Cinzel', serif;
  color: var(--primary-color, #40E0D0);
}

.cm-quick-actions-hint {
  font-size: 0.8rem;
  color: var(--text-muted, #8899a6);
}

.cm-quick-actions-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.cm-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  background: rgba(64, 224, 208, 0.1);
  border: 1px solid rgba(64, 224, 208, 0.3);
  border-radius: 8px;
  color: var(--text-color, #e8eaed);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 90px;
}

.cm-quick-btn:hover {
  background: rgba(64, 224, 208, 0.2);
  border-color: var(--primary-color, #40E0D0);
  transform: translateY(-2px);
}

.cm-quick-icon {
  font-size: 1.5rem;
}

.cm-quick-btn span:last-child {
  font-size: 0.8rem;
}

.cm-auto-pin-settings {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(64, 224, 208, 0.15);
}

.cm-auto-pin-label {
  font-size: 0.85rem;
  color: var(--text-muted, #8899a6);
}

.cm-auto-pin-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-color, #e8eaed);
  cursor: pointer;
}

.cm-auto-pin-toggle input {
  cursor: pointer;
}

.cm-entry-session {
  background: rgba(138, 43, 226, 0.15);
  color: #b388ff;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.cm-entry-has-notes {
  cursor: help;
}

.cm-gm-notes-section {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.cm-gm-notes-section h4 {
  margin: 0 0 0.75rem;
  color: #ffd700;
}

.cm-gm-notes-input {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  color: var(--text-color, #e8eaed);
  resize: vertical;
  margin-bottom: 0.75rem;
}

.cm-gm-notes-input:focus {
  outline: none;
  border-color: #ffd700;
}

.cm-entry-export-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #2d3748);
}

.wizard-step {
  padding: 1.5rem;
}

.wizard-step-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.wizard-step-number {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--primary-color, #40E0D0);
  background: rgba(64, 224, 208, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.wizard-step-header h4 {
  margin: 0 0 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: var(--text-color, #e8eaed);
}

.wizard-step-header p {
  margin: 0;
  color: var(--text-muted, #8899a6);
}

.wizard-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wizard-preset-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid var(--border-color, #2d3748);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.wizard-preset-card:hover {
  border-color: rgba(64, 224, 208, 0.5);
  background: rgba(64, 224, 208, 0.05);
}

.wizard-preset-card.selected {
  border-color: var(--primary-color, #40E0D0);
  background: rgba(64, 224, 208, 0.1);
}

.wizard-preset-label {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color, #e8eaed);
  margin-bottom: 0.5rem;
}

.wizard-preset-desc {
  font-size: 0.85rem;
  color: var(--text-muted, #8899a6);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.wizard-preset-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wizard-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.wizard-tag.system {
  background: rgba(64, 224, 208, 0.2);
  color: var(--primary-color, #40E0D0);
}

.wizard-tag.theme {
  background: rgba(138, 43, 226, 0.2);
  color: #b388ff;
}

.wizard-form {
  max-width: 500px;
  margin: 0 auto;
}

.wizard-tagpacks-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  min-height: 40px;
}

.wizard-tagpack-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(138, 43, 226, 0.2);
  color: #b388ff;
  border-radius: 4px;
}

.wizard-summary {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.wizard-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color, #2d3748);
}

.wizard-summary-item:last-child {
  border-bottom: none;
}

.wizard-summary-label {
  color: var(--text-muted, #8899a6);
}

.wizard-summary-value {
  color: var(--text-color, #e8eaed);
  font-weight: 500;
}

.wizard-what-creates {
  background: rgba(64, 224, 208, 0.08);
  border: 1px solid rgba(64, 224, 208, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.wizard-what-creates h5 {
  margin: 0 0 0.75rem;
  color: var(--primary-color, #40E0D0);
}

.wizard-what-creates ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-color, #e8eaed);
}

.wizard-what-creates li {
  margin: 0.3rem 0;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #2d3748);
}

@media (max-width: 600px) {
  .cm-welcome-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .cm-session-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cm-quick-actions-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .wizard-presets-grid {
    grid-template-columns: 1fr;
  }
}
