.selection-card-trigger {
  position: fixed;
  z-index: 2000;
  border: 1px solid #2f6feb;
  background: #2f6feb;
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(29, 56, 112, 0.24);
  transform: translateX(-50%);
  transition: opacity 0.12s ease;
}

.selection-card-trigger[hidden] {
  display: none;
}

.selection-card-trigger:hover {
  background: #245fca;
}

.card-generator-overlay {
  position: fixed;
  z-index: 2200;
  inset: 0;
  background: rgba(12, 18, 30, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.card-generator-overlay[hidden] {
  display: none;
}

.card-generator-modal {
  width: min(780px, 100%);
  max-height: 96vh;
  overflow-y: auto;
  border-radius: 16px;
  background: #f7f9fd;
  border: 1px solid #d0d9ea;
  box-shadow: 0 24px 64px rgba(12, 23, 48, 0.28);
  box-sizing: border-box;
  padding: 20px;
}

.card-generator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-generator-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2a3d;
}

.card-generator-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.card-generator-label {
  color: #46536d;
  font-size: 14px;
  font-family: sans-serif;
}

.card-generator-select {
  min-width: 160px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #c4cfe4;
  background: #fff;
  color: #25324b;
  font-size: 14px;
  padding: 0 10px;
}

.card-generator-preview {
  background: #edf2fb;
  border: 1px dashed #bcc8df;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: center;
}

#card-preview-canvas {
  width: min(420px, 100%);
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 39, 70, 0.18);
}

.card-generator-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.card-action-button {
  min-width: 94px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #c0ccdf;
  font-size: 14px;
  cursor: pointer;
}

.card-action-cancel {
  background: #f5f7fb;
  color: #2b3a54;
}

.card-action-cancel:hover {
  background: #ecf1f9;
}

.card-action-generate {
  border-color: #2f6feb;
  background: #2f6feb;
  color: #fff;
}

.card-action-generate:hover {
  background: #245fca;
}

@media screen and (max-width: 600px) {
  .selection-card-trigger {
    font-size: 13px;
    padding: 7px 14px;
  }

  .card-generator-overlay {
    padding: 12px;
  }

  .card-generator-modal {
    padding: 14px;
    border-radius: 12px;
  }

  .card-generator-title {
    font-size: 18px;
  }

  .card-generator-select {
    min-width: 130px;
    font-size: 13px;
  }

  .card-action-button {
    flex: 1;
  }
}
