/* ============================================================================
   이전 행사정보 불러오기 — 폼 위의 버튼 바와 모달 (두 얼굴 공유 · sgax_recall.js)
   색은 core 의 --primary 계열을 쓴다. 모달은 프로필 게이트와 같은 층(1100)에 선다.
   ============================================================================ */

.sgax-recall-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 12px;
}
.sgax-recall-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--primary, #ff5000);
  border-radius: 10px;
  background: #fff;
  color: var(--primary, #ff5000);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.sgax-recall-btn:hover { background: rgba(var(--primary-rgb, 255, 80, 0), 0.06); }
.sgax-recall-btn:focus-visible { outline: 2px solid var(--primary, #ff5000); outline-offset: 2px; }
.sgax-recall-icon { flex: 0 0 auto; }
.sgax-recall-note {
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(var(--primary-rgb, 255, 80, 0), 0.08);
  color: var(--text-primary, #1f2937);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* 모달 */
body.sgax-recall-open { overflow: hidden; }
.sgax-recall-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}
.sgax-recall-modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 20px 22px;
  box-sizing: border-box;
}
.sgax-recall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sgax-recall-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
}
.sgax-recall-title .sgax-recall-icon { width: 22px; height: 22px; color: var(--primary, #ff5000); }
.sgax-recall-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  padding: 2px 6px;
}
.sgax-recall-desc {
  margin: 6px 0 12px;
  font-size: 14px;
  color: var(--text-secondary, #6b7280);
}
.sgax-recall-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  font-size: 14px;
  background: #fafafa;
}
.sgax-recall-search-input:focus { outline: none; border-color: var(--primary, #ff5000); background: #fff; }
.sgax-recall-list {
  margin-top: 12px;
  overflow-y: auto;
  min-height: 96px;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sgax-recall-empty {
  margin: 24px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary, #6b7280);
}
.sgax-recall-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
}
.sgax-recall-item.selected {
  border-color: var(--primary, #ff5000);
  background: rgba(var(--primary-rgb, 255, 80, 0), 0.06);
}
.sgax-recall-item input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.sgax-recall-radio {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #c7cad1;
  border-radius: 50%;
  box-sizing: border-box;
  position: relative;
}
.sgax-recall-item.selected .sgax-recall-radio { border-color: var(--primary, #ff5000); }
.sgax-recall-item.selected .sgax-recall-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary, #ff5000);
}
.sgax-recall-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.sgax-recall-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sgax-recall-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
  word-break: break-all;
}
.sgax-recall-svc {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text-secondary, #6b7280);
}
.sgax-recall-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb, 255, 80, 0), 0.12);
  color: var(--primary-dark, #e64800);
  white-space: nowrap;
}
.sgax-recall-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sgax-recall-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
}
.sgax-recall-hint {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--primary-dark, #e64800);
}
.sgax-recall-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.sgax-recall-cancel, .sgax-recall-apply {
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.sgax-recall-cancel { border: 1px solid var(--border-color, #e5e7eb); background: #fff; color: var(--text-primary, #1f2937); }
.sgax-recall-apply { border: 0; background: var(--primary, #ff5000); color: #fff; }
.sgax-recall-apply:hover:not(:disabled) { background: var(--primary-dark, #e64800); }
.sgax-recall-apply:disabled { background: #cbd5e1; cursor: not-allowed; }

@media (max-width: 480px) {
  .sgax-recall-modal { padding: 16px; border-radius: 12px; }
  .sgax-recall-actions { flex-direction: column-reverse; }
  .sgax-recall-cancel, .sgax-recall-apply { width: 100%; }
  .sgax-recall-btn { font-size: 13px; padding: 7px 12px; }
}
