/**
 * Seller blog — layout with profile shell (`profile-page`, `item-detail-content`, `profile-card`).
 * /blog/manage: flat `.seller-blog-manage` panels (not nested `settings-form` / `settings-section`).
 */

.seller-blog-page__alert {
  margin-bottom: 1rem;
}

.seller-blog-page__main {
  padding-top: 0;
}

.seller-blog-page__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 1rem;
  font-size: 14px;
  margin-top: 16px;
}

.seller-blog-page__bc-icon {
  font-size: 18px !important;
  color: #9ca3af;
}

.seller-blog-page__hint {
  margin: 0 0 0.5rem;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
}

/** /blog/manage: lead line under panel title. */
.seller-blog-manage__lead {
  margin: 0 0 1rem;
}

.seller-blog-page__sidebar-actions {
  margin-top: 12px;
}

.seller-blog-page__sidebar-actions--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/**
 * /blog/manage — flat stack of panels (no settings-form ⊂ settings-section nesting).
 * Material 3: tonal surface, single outline per block.
 */
.seller-blog-manage {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seller-blog-manage__panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px 20px 22px;
  margin-top: 32px;
}

.seller-blog-manage__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7e5ef;
}

.seller-blog-manage__head .material-icons {
  font-size: 22px;
  color: #6750a4;
}

.seller-blog-manage__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
}

.seller-blog-manage__fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.seller-blog-manage__panel .seller-blog-manage__field {
  margin-bottom: 1.35rem;
}

.seller-blog-manage__thread-form .seller-blog-page__btn-row {
  margin-top: 1.25rem;
}

.seller-blog-manage__photos .form-help {
  display: block;
  margin-top: 0.35rem;
}

.seller-blog-manage__photo-actions {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.seller-blog-manage__preview {
  margin-top: 0.5rem;
}

.seller-blog-manage__fieldset:disabled .form-input,
.seller-blog-manage__fieldset:disabled .seller-blog-page__select,
.seller-blog-manage__fieldset:disabled .seller-blog-page__textarea {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #9ca3af;
  box-shadow: none;
}

.seller-blog-manage__fieldset:disabled .form-file {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 1023px) {
  .seller-blog-manage__panel {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(15, 23, 42, 0.06);
    border-color: #eceff1;
  }
}

.seller-blog-page__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.seller-blog-page__textarea {
  min-height: 120px;
  resize: vertical;
}

.seller-blog-page__btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.seller-blog-page__btn-row .btn .material-icons,
.seller-blog-page__topic-list-actions .btn .material-icons {
  font-size: 18px;
}

.seller-blog-page__btn-row .btn,
.seller-blog-page__topic-list-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seller-blog-page__btn--danger {
  border-color: #fecaca !important;
  color: #b91c1c !important;
  background: #fef2f2 !important;
}

.seller-blog-page__btn--danger:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

.seller-blog-page__btn--sm {
  padding: 4px 10px;
  font-size: 13px;
  height: auto;
  min-height: 32px;
}

.seller-blog-page__topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.seller-blog-page__topic-list-item {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid #e5e7eb;
}

.seller-blog-page__topic-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.seller-blog-page__topic-list-title {
  font-weight: 600;
  font-size: 16px;
  color: #111827;
  line-height: 1.35;
}

.seller-blog-page__topic-list-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.seller-blog-page__topic-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.seller-blog-page__inline-form {
  margin: 0;
  display: inline-block;
}

.seller-blog-page__list-head {
  margin-bottom: 12px;
}

.seller-blog-page__topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.seller-blog-page__topic-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.seller-blog-page__topic-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.seller-blog-page__topic-card-media {
  height: 140px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.seller-blog-page__topic-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-blog-page__topic-card-ph {
  font-size: 48px;
  color: #d1d5db;
}

.seller-blog-page__topic-card-body {
  padding: 14px 16px 16px;
}

.seller-blog-page__topic-card-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  color: #111827;
}

.seller-blog-page__topic-card-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
}

.seller-blog-page__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e8def8;
  color: #4f378b;
  margin-bottom: 6px;
}

.seller-blog-page__pagination {
  margin-top: 1.5rem;
}

.seller-blog-page__empty {
  text-align: center;
  padding: 32px 16px;
  border: 1px dashed #e5e7eb;
  border-radius: 18px;
  background: #fafafa;
}

.seller-blog-page__empty-icon {
  font-size: 40px !important;
  color: #c4b5fd;
  display: block;
  margin: 0 auto 8px;
}

.seller-blog-page__ad-card {
  text-align: center;
}

.seller-blog-page__ad-thumb-wrap {
  margin-bottom: 10px;
}

.seller-blog-page__ad-thumb {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: block;
}

.seller-blog-page__ad-thumb--ph {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #9ca3af;
}

.seller-blog-page__ad-thumb-caption {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  line-height: 1.4;
  margin: 0 0 4px;
}

.seller-blog-page__inline-link {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.seller-blog-page__inline-link:hover {
  text-decoration: underline;
}

.seller-blog-page__thread-title {
  margin-bottom: 12px !important;
  align-items: flex-start !important;
  line-height: 1.3;
}

.seller-blog-page__thread-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.seller-blog-page__thread-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.6;
  color: #1f2937;
}

.seller-blog-page__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.seller-blog-page__gallery-link img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  display: block;
}

/* --- Blog video: preview (no iframe) + fullscreen modal on click --- */
.seller-blog-video--preview {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.seller-blog-video__trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  max-width: 100%;
  font: inherit;
  color: inherit;
}

.seller-blog-video__trigger:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 3px;
  border-radius: 14px;
}

.seller-blog-video__shell {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #0f172a;
  box-sizing: border-box;
}

.seller-blog-video--landscape .seller-blog-video__shell {
  aspect-ratio: 16 / 9;
  width: min(100%, min(440px, 92vw));
}

.seller-blog-video--portrait .seller-blog-video__shell {
  aspect-ratio: 9 / 16;
  width: min(200px, 40vw);
}

.seller-blog-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.seller-blog-video__poster--ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.seller-blog-video__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.seller-blog-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.seller-blog-video__play .material-icons {
  font-size: 64px;
  color: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.seller-blog-video__caption {
  font-size: 13px;
  color: #6b7280;
}

.seller-blog-video-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: stretch;
  justify-content: center;
}

.seller-blog-video-modal.is-open {
  display: flex;
}

.seller-blog-video-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.seller-blog-video-modal__panel {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.seller-blog-video-modal__toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  background: #0f172a;
  border-bottom: 1px solid #334155;
}

.seller-blog-video-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
}

.seller-blog-video-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.seller-blog-video-modal__external {
  margin-right: auto;
}

.seller-blog-video-modal__frame {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.seller-blog-video-modal__iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  display: block;
}

.seller-blog-page__thread-actions {
  margin-top: 14px;
}

.seller-blog-page__comments {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.seller-blog-page__comments-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #111827;
}

.seller-blog-page__comment {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.seller-blog-page__comment:last-of-type {
  border-bottom: none;
}

.seller-blog-page__comment-head {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.seller-blog-page__comment-body {
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.seller-blog-page__comment-form {
  margin-top: 12px;
}

@media (max-width: 1023px) {
  .seller-blog-page__topic-grid {
    grid-template-columns: 1fr;
  }

  .seller-blog-page__topic-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .seller-blog-page__topic-list-actions {
    justify-content: flex-start;
  }

  .seller-blog-page__topic-list-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }
}
