/* 팝업: 사이트 신청·수정 요청·약관·의견 */

/* 신청하기 */
.submit-cta {
  margin-top: 56px;
  padding: 36px 20px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  text-align: center;
}

.submit-cta p { margin: 0 0 14px; color: var(--muted); }

.submit-open,
.submit-send {
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s ease;
}

.submit-open:hover,
.submit-send:hover { filter: brightness(1.08); }
.submit-send:disabled { opacity: .6; cursor: wait; }

.submit-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}

.submit-dialog::backdrop {
  background: rgba(15, 14, 13, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.submit-form,
.submit-done {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.submit-form[hidden],
.submit-done[hidden] { display: none; }

.submit-form header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.submit-dialog h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }

.submit-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--thumb);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.submit-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.submit-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
}

.submit-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.at-input { position: relative; display: block; }
.at-input span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 400; }
.at-input input { padding-left: 28px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.submit-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.submit-errors {
  margin: 0;
  padding-left: 18px;
  color: #c0392b;
  font-size: 13px;
}

.submit-done { text-align: center; justify-items: center; padding: 36px 24px 28px; }
.submit-done p { margin: 0; color: var(--muted); }

.done-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent) !important;
  font-size: 24px;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .submit-open, .submit-send { color: #1c1208; }
}

/* 등록 팝업 언어 탭 */
.submit-i18n {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.submit-i18n-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.submit-i18n-label { font-size: 14px; font-weight: 600; }

.submit-tabs { display: flex; gap: 4px; flex-wrap: wrap; }

.submit-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.submit-tabs button.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.submit-tabs .dot { display: none; font-size: 7px; color: #2f9e5b; }
.submit-tabs .filled .dot { display: inline; }

.submit-panel { display: grid; gap: 12px; }
.submit-panel[hidden] { display: none; }
.submit-form label small { font-weight: 400; color: var(--muted); }

.submit-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  resize: vertical;
}

.submit-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.submit-i18n-hint { margin: 0; font-size: 12px; color: var(--muted); }

.submit-dialog { max-height: calc(100dvh - 32px); overflow: auto; }

/* 수정/삭제 요청 */
.site-foot-request {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.submit-form select {
  width: 100%;
  padding: 11px 36px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  appearance: none;
}

.submit-form select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.change-kind { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.change-kind legend { width: 100%; margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 600; }
.change-kind label { display: block; }
.change-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.change-kind span {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.change-kind input:checked + span { background: var(--text); border-color: var(--text); color: var(--bg); }
.change-kind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.field-hint { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.5; }

/* 이용약관·개인정보처리방침 */
.site-foot-legal { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 4px; }
.site-foot-legal a { color: inherit; text-decoration: none; }
.site-foot-legal a:hover { text-decoration: underline; }

.legal-dialog { width: min(720px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: hidden; }
.legal-dialog[open] { display: flex; flex-direction: column; }
.legal-dialog > header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
}
.legal-body { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 24px 28px; font-size: 14px; line-height: 1.75; }
.legal-body h3 { margin: 24px 0 6px; font-size: 15px; }
.legal-body p, .legal-body ul, .legal-body ol { margin: 0 0 8px; }
.legal-body ul, .legal-body ol { padding-left: 20px; }
.legal-body a { color: inherit; text-decoration: underline; }
.legal-date { color: var(--muted); font-size: 13px; }
.legal-contact { margin-top: 24px !important; color: var(--muted); }
.legal-table { max-width: 100%; overflow-x: auto; margin: 8px 0 4px; }
.legal-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
.legal-table th, .legal-table td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { background: var(--thumb); font-weight: 600; white-space: nowrap; }

@media (max-width: 600px) {
  .legal-table table { min-width: 0; }
  .legal-table thead { display: none; }
  .legal-table tr { display: block; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .legal-table td { display: grid; grid-template-columns: 72px 1fr; gap: 8px; border: 0; border-top: 1px solid var(--line); }
  .legal-table td:first-child { border-top: 0; background: var(--thumb); font-weight: 600; }
  .legal-table td::before { content: attr(data-label); color: var(--muted); font-weight: 400; }
}

/* 메인 의견 팝업 */
.comment-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 32px)); }
.comment-dialog[open] { display: flex; flex-direction: column; }
.comment-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 12px; }
.comment-dialog-head h2 { margin: 2px 0 0; font-size: 20px; }
.comment-dialog-site { margin: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }
.comment-dialog-body { flex: 1; min-height: 140px; overflow: auto; padding: 4px 22px 8px; }
.comment-dialog-body.loading { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--line) 50%, transparent), transparent) 0 0 / 200% 100%; animation: cd-load 1s linear infinite; }
@keyframes cd-load { to { background-position: -200% 0; } }
.comment-dialog-page { align-self: flex-end; margin: 0 22px 18px; color: var(--muted); font-size: 13px; font-weight: 600; }
.comment-dialog-page:hover { color: var(--accent); }

/* 등록 팝업: 제목·소개 칸 아래 안내 (비우면 사이트 정보로 채움) */
.submit-form label .submit-field-hint { font-size: 12px; line-height: 1.45; }
