/* 역할: 미디어 편집 도구 스타일.
 * 화면 표현용 스타일입니다. 권한·요금제 판단은 서버에서 수행합니다.
 * 전체 구조: docs/CODE_GUIDE.md
 */
.creative-dialog {
  width: min(900px, 94vw);
  max-height: 88vh;
  padding: 28px;
  border: 1px solid #e4e5ec;
  border-radius: 20px;
  background: #fff;
  color: #242634;
  box-shadow: 0 30px 100px #161a3840;
  overflow: auto;
}
.creative-dialog::backdrop {
  background: #141a32a6;
  backdrop-filter: blur(5px);
}
.creative-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.creative-dialog header h2 {
  margin: 6px 0;
  font-size: 26px;
}
.creative-dialog header small {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #6868a6;
}
.creative-dialog header button {
  border: 0;
  background: #f4f4f8;
  font-size: 25px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
}
.creative-dialog label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.creative-dialog input,
.creative-dialog select,
.creative-dialog textarea {
  width: 100%;
  border: 1px solid #dddfe9;
  border-radius: 9px;
  padding: 11px;
  background: white;
  color: #242634;
}
.creative-dialog form#stock-search {
  display: grid;
  grid-template-columns: 100px 170px minmax(0,1fr) 80px;
  gap: 10px;
}
.stock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stock-grid article {
  border: 1px solid #e5e6ee;
  border-radius: 12px;
  overflow: hidden;
}
.stock-grid img,
.stock-grid video {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #edf0f5;
}
.stock-grid article > div {
  padding: 12px;
}
.stock-grid strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.6;
  height: 42px;
}
.stock-grid small {
  display: block;
  font-size: 11px;
  color: #767a8c;
  margin: 6px 0;
}
.stock-links {
  display: flex;
  gap: 12px;
  font-size: 11px;
  margin: 8px 0;
}
.stock-grid button {
  width: 100%;
  font-size: 12px;
}
.creative-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.creative-buttons button {
  padding: 11px 6px;
  font-size: 12px;
  border-radius: 9px;
}
.font-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.font-option {
  background: #f7f7fa;
  border: 1px solid #e2e2ea;
  border-radius: 12px;
  text-align: left;
  padding: 18px;
}
.font-option.chosen {
  border: 2px solid #6658dd;
  background: #f4f2ff;
}
.font-option small {
  display: block;
  color: #75768b;
  margin-bottom: 12px;
}
.font-option span {
  font-size: 25px;
  line-height: 1.6;
}
.media-attribution {
  font-size: 10px;
  color: #717783;
  padding: 16px 5%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.media-attribution a {
  color: inherit;
}
.ai-disclaimer {
  font-size: 10px;
  color: #74788b;
  margin: 10px 4px 7px;
  line-height: 1.6;
}
.rainbow-composer {
  border: 2px solid transparent !important;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(
        110deg,
        #ed5b8c,
        #e8ac53,
        #7fc896,
        #62b5f3,
        #9471eb,
        #ed5b8c
      )
      border-box !important;
  background-size:
    100% 100%,
    300% 300% !important;
  animation: rainbow-shift 9s ease infinite;
  box-shadow: 0 7px 25px #8564d51a;
}
.rainbow-composer textarea {
  background: transparent !important;
}
@keyframes rainbow-shift {
  0%,
  100% {
    background-position:
      0 0,
      0% 50%;
  }
  50% {
    background-position:
      0 0,
      100% 50%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rainbow-composer {
    animation: none;
  }
}
@media (max-width: 600px) {
  .creative-dialog {
    padding: 18px;
  }
  .stock-grid {
    grid-template-columns: 1fr 1fr;
  }
  .font-options {
    grid-template-columns: 1fr;
  }
  .creative-dialog form#stock-search {
    grid-template-columns: 90px 1fr;
  }
  .creative-dialog form#stock-search input {grid-column:1/-1}
  .creative-dialog form#stock-search button {
    grid-column: 1/-1;
  }
}
.powered-by {
  display: block;
  width: 100%;
  text-align: center;
  border-top: 1px solid #8882;
  padding: 20px 16px;
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 0.025em;
}
.powered-by a {
  color: inherit;
  text-decoration: none;
}
.powered-by strong {
  font-weight: 700;
}
.site-footer {
  flex-wrap: wrap;
}
.seo-preview {
  border: 1px solid #e3e5ed;
  background: #fafbfe;
  padding: 20px;
  border-radius: 12px;
}
.seo-preview b {
  color: #26358a;
  font-size: 20px;
}
.seo-preview p {
  color: #6a6e7d;
  margin-bottom: 0;
}
.editor-settings-group {
  border: 1px solid #e3e5ed;
  border-radius: 10px;
  margin-top: 18px;
  padding: 12px;
}
.editor-settings-group summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.editor-settings-group .visual-controls {
  border: 0;
  padding: 10px 0;
  margin: 0;
}
