/* /var/www/html/assets/css/qr-code.css : QR 코드 생성기 전용 스타일 (파스텔 톤) */

.qr-tool { margin-top: 8px; }

.qr-layout {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}
@media (max-width: 820px) {
  .qr-layout { grid-template-columns: 1fr; }
}

/* ---------- 입력 패널 ---------- */
.qr-panel {
  padding: 18px;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(142, 202, 230, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(200, 214, 240, 0.16), rgba(200, 214, 240, 0.06));
  border: 1px solid rgba(142, 160, 210, 0.2);
}
.qr-field { margin-bottom: 16px; }
.qr-field:last-child { margin-bottom: 0; }
.qr-label { display: block; font-weight: 800; font-size: 0.85rem; color: #fff; margin-bottom: 7px; }

.qr-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #1c1e26;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
}
.qr-textarea:focus { outline: 2px solid rgba(120, 140, 190, 0.55); outline-offset: 1px; }

/* 오류정정 세그먼트 */
.qr-ecl-btns {
  display: inline-flex;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.qr-ecl-btn {
  border: none; background: transparent;
  padding: 8px 16px; border-radius: 9px;
  font-weight: 700; font-size: 0.85rem; color: #5a6478; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.qr-ecl-btn:hover { background: rgba(0, 0, 0, 0.05); }
.qr-ecl-btn.is-active {
  background: linear-gradient(135deg, #9cd3ef, #b9b3ee); color: #2f3a4d;
  box-shadow: 0 2px 8px rgba(150, 175, 225, 0.4);
}
.qr-ecl-hint { margin: 7px 0 0; font-size: 0.78rem; color: rgba(245, 245, 242, 0.6); }

/* 색상 */
.qr-colors { display: flex; gap: 18px; flex-wrap: wrap; }
.qr-color { display: flex; align-items: center; gap: 8px; }
.qr-color label { font-weight: 700; font-size: 0.85rem; color: #fff; }
.qr-color input[type="color"] {
  width: 42px; height: 34px; padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 9px; background: #fff; cursor: pointer;
}

/* ---------- 미리보기 패널 ---------- */
.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 18px;
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(142, 202, 230, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(200, 214, 240, 0.14), rgba(200, 214, 240, 0.05));
  border: 1px solid rgba(142, 160, 210, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 12px 32px rgba(150, 170, 210, 0.14);
}
.qr-canvas-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 260px;
  padding: 14px; border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
#qr-canvas {
  display: block;
  width: auto; max-width: 100%; height: auto;
  image-rendering: pixelated;
  border-radius: 4px;
}
.qr-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #8a93a8; text-align: center; font-size: 0.9rem;
}
.qr-empty-mark {
  width: 48px; height: 48px; border-radius: 12px;
  background:
    linear-gradient(#c7d0e2 0 0) 0 0 / 16px 16px no-repeat,
    linear-gradient(#c7d0e2 0 0) 100% 0 / 16px 16px no-repeat,
    linear-gradient(#c7d0e2 0 0) 0 100% / 16px 16px no-repeat,
    #eef1f7;
}
.qr-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.qr-actions .btn {
  border-radius: 999px; padding: 11px 22px; font-weight: 700;
  border: 1px solid rgba(142, 160, 210, 0.28); box-shadow: 0 2px 8px rgba(142, 160, 210, 0.18);
  transition: transform 0.08s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.qr-actions .btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(142, 160, 210, 0.28); }
.qr-actions .btn:active:not(:disabled) { transform: scale(0.97); }
.qr-actions .btn-primary {
  background-image: linear-gradient(135deg, #9cd3ef, #b9b3ee); border: none; color: #2f3a4d;
  box-shadow: 0 4px 14px rgba(150, 175, 225, 0.45);
}
.qr-actions .btn-primary:hover:not(:disabled) { filter: brightness(1.05); }

.qr-status { margin-top: 14px; font-size: 0.9rem; color: #667085; min-height: 1.4em; text-align: center; }

/* ---------- 안내 ---------- */
.qr-guide { margin-top: 34px; }
.qr-guide h2 { margin-bottom: 12px; }
.qr-guide h3 { margin: 18px 0 4px; font-size: 1rem; }
.qr-guide ol, .qr-guide ul { padding-left: 20px; line-height: 1.7; }
.qr-guide li { margin-bottom: 4px; }

/* ---------- 다크 모드 ---------- */
@media (prefers-color-scheme: dark) {
  .qr-panel { background: #1e1f24; border-color: rgba(255, 255, 255, 0.12); }
  .qr-label, .qr-color label { color: #eef1f6; }
  .qr-textarea { background: #17181c; color: #e8ebf2; border-color: rgba(255, 255, 255, 0.16); }
  .qr-ecl-btns { background: #17181c; border-color: rgba(255, 255, 255, 0.14); }
  .qr-ecl-btn { color: #c3c9d4; }
  .qr-ecl-btn:hover { background: rgba(255, 255, 255, 0.08); }
  .qr-ecl-hint { color: rgba(245, 245, 242, 0.5); }
  .qr-preview { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 32px rgba(0, 0, 0, 0.3); }
  /* 미리보기 배경은 QR 대비를 위해 항상 흰색 유지 */
  .qr-status { color: #9aa0aa; }
}
