/**
 * gcc-generate-card-preview-base.css
 * ─────────────────────────────────────────────────────────────────────────────
 * PHẠM VI: CHỈ KHUNG — layout, structure, slider, dots, container query,
 *          standalone view, responsive, accessibility, print.
 *
 * NGUYÊN TẮC:
 *   ✅ Khai báo ở đây:  display, position, flex/grid layout, overflow, gap,
 *                        aspect-ratio, width/height/max-width, z-index,
 *                        transition animation của slider/dots,
 *                        container-type, font-size động (cqi), CSS variables,
 *                        standalone-view structure.
 *   ❌ KHÔNG khai báo:  background, color, font-family, border-color,
 *                        box-shadow, border-radius của card/header/caption,
 *                        animation keyframes của template (heartbeat, sparkle…).
 *                        Tất cả visual → để trong file template riêng.
 *
 * LOAD ORDER (WordPress):
 *   1. gcc-generate-card-preview-base.css        ← file này
 *   2. gcc-template-{slug}.css      ← template riêng (visual + override)
 *
 * SPECIFICITY STRATEGY:
 *   - Structural rules dùng specificity thấp nhất có thể (không :is / :not dư thừa)
 *   - Template CSS scope vào .gcc-tpl-{slug} → tự thắng cascade mà không cần !important
 *   - Các rule dùng !important trong file này chỉ để đảm bảo structural integrity
 *     (dots reset all:unset, slider inset…) — KHÔNG override visual template.
 * ─────────────────────────────────────────────────────────────────────────────
 */


/* ═══════════════════════════════════════════════════════════════════════════
 * 1. FORM LAYOUT
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-fieldset {
  border: 1px solid #e5e7eb;
  padding: 12px;
  border-radius: 8px;
  margin: 12px 0;
}
.gcc-fieldset legend { font-weight: 600; padding: 0 6px; }

.gcc-inline { display: flex; gap: 8px; align-items: center; }

.gcc-caption-item { padding: 6px 0; border-bottom: 1px dashed #ddd; }
.gcc-caption-item:last-child { border-bottom: 0; }

.gcc-form .description {
  display: block;
  color: #6b7280;
  margin-top: 4px;
  font-size: 12px;
}

.gcc-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .gcc-two-col { grid-template-columns: 1fr; }
}

.gcc-counter { font-size: 12px; color: #6b7280; margin-top: 4px; text-align: right; }
.gcc-counter.is-limit { color: #b91c1c; font-weight: 600; }


/* ═══════════════════════════════════════════════════════════════════════════
 * 2. STICKY PREVIEW COLUMN
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-col--preview,
.gcc-preview-container {
  position: sticky;
  top: 80px;        /* tăng nếu có sticky admin toolbar */
  align-self: start;
  overflow: visible;
}

@media (max-width: 900px) {
  .gcc-col--preview,
  .gcc-preview-container {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 3. PREVIEW CARD — CONTAINER SHAPE (structural only)
 * Visual (background, border, shadow) → template CSS
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-preview-card {
  border-radius: 16px;      /* fallback; template có thể override */
  overflow: clip;           /* clip nội dung theo radius, không cắt chiều dọc */
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.10),
    0 1px 4px  rgba(0, 0, 0, 0.06); /* default shadow — template override tự do */
}

.gcc-col--preview .gcc-preview-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 3b. DEFAULT TEMPLATE VISUAL — THEME-AWARE (mirror Card View)
 * ─────────────────────────────────────────────────────────────────────────
 * Áp cho .gcc-tpl-default và card chưa có template, trong scope:
 *   - .gcc-col--preview  (admin Live Preview)
 *   - body.gcc-view-standalone  (Card View standalone)
 *
 * KHÔNG có background/header gradient cố định → card tự ăn theo
 * --gcc-theme-card-bg / --gcc-theme-text khi gắn .gcc-theme-switcher-wrap.
 * Template riêng (arctic-frost, love-liquid-metal…) KHÔNG bị ảnh hưởng.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* Card container — theme-aware bg + text */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--gcc-theme-card-bg, #fff);
  color: var(--gcc-theme-text, inherit);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
  overflow: visible;
  padding: 8px;
  box-sizing: border-box;
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* Header — không có nền riêng, kế thừa card → đổi theo theme */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-header,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-header {
  margin: 0 0 8px;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  display: block;
}

/* From */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-from,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-from {
  opacity: .9;
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.2;
}

/* Title */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-title,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  max-width: 100%;
  min-width: 0;
}

/* Media block — margin/border-radius like Card View */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-media,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-media {
  margin: 8px 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

/* Slider clip */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-slider,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-slider {
  border-radius: 12px;
  overflow: hidden;
}

/* Caption — theme-aware, không border xám */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-caption,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-caption {
  padding: 12px;
  border-top: none;
  min-height: 0;
  font-size: 14px;
  line-height: 1.65;
  color: inherit;
}

/* Video / Audio — same */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-video,
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-audio,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-video,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-audio {
  padding: 12px;
  border-top: none;
}
.gcc-col--preview .gcc-preview-card .gcc-preview-audio audio {
  width: 100%;
  height: 46px;
}

/* Models */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-models,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-models {
  padding: 8px 12px;
  border-top: none;
  font-size: 12px;
  opacity: .7;
}

/* Built-in template header colors (noel / tet) — giữ gradient
 * Default: KHÔNG áp gradient, để theme switcher tự ăn */
.gcc-preview-card.gcc-tpl-noel .gcc-preview-header { background: linear-gradient(45deg, #0bab64, #3bb78f); color: #fff; }
.gcc-preview-card.gcc-tpl-tet  .gcc-preview-header { background: linear-gradient(45deg, #d4145a, #fbb03b); color: #fff; }

/* Mobile responsive — mirror Card View mobile */
@media (max-width: 767px) {
  .gcc-col--preview .gcc-preview-card.gcc-tpl-default,
  .gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) {
    padding: 8px;
    border-radius: 12px;
  }
  .gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-header,
  .gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-header {
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 8px;
  }
  .gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-title,
  .gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-title {
    font-size: 22px;
    line-height: 1.3;
  }
  .gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-from,
  .gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-from {
    font-size: 13px;
    margin-bottom: 6px;
  }
  .gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-preview-caption,
  .gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-preview-caption {
    padding: 10px;
    font-size: 14px;
    min-height: 0;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 4. MEDIA AREA — STRUCTURAL
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-preview-media {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #f8fafc;      /* neutral fallback — template override tự do */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gcc-slider {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.gcc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1em;
  box-sizing: border-box;
}
.gcc-slide.is-active { opacity: 1; }

/* Media display — CONTAIN (default cho mọi template) */
.gcc-slide img,
.gcc-slide video,
.gcc-slide canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Media display — COVER cho Live Preview default (mirror Card View)
 * Chỉ áp cho card có template default hoặc chưa có template,
 * trong scope .gcc-col--preview (admin form) hoặc body.gcc-view-standalone.
 * Các template khác giữ contain mặc định. */
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-slide img,
.gcc-col--preview .gcc-preview-card.gcc-tpl-default .gcc-slide video,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-slide img,
.gcc-col--preview .gcc-preview-card:not([class*="gcc-tpl-"]) .gcc-slide video,
body.gcc-view-standalone .gcc-preview-card.gcc-tpl-default .gcc-slide img,
body.gcc-view-standalone .gcc-preview-card.gcc-tpl-default .gcc-slide video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 5. 3D MODEL VIEWER
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-slide model-viewer {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
}

/* Placeholder khi model chưa lazy-mount */
.gcc-model-card {
  display: grid;
  place-items: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  box-sizing: border-box;
}
.gcc-model-card__icon  { font-size: 38px; line-height: 1; }
.gcc-model-card__title { font-weight: 700; font-size: 16px; }
.gcc-model-card__name  {
  max-width: 90%;
  font-size: 13px;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gcc-model-card__hint { font-size: 12px; color: rgba(255,255,255,.8); }


/* ═══════════════════════════════════════════════════════════════════════════
 * 6. SLIDER CONTROLS & DOTS
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-slider-controls {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
  pointer-events: auto;
}

/* Ẩn prev/next button — chỉ dots */
.gcc-slider-controls > .button { display: none !important; }

.gcc-dots {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Base dot — reset toàn bộ browser style */
.gcc-dots button,
.gcc-preview-card .gcc-dots button,
.gcc-slider-controls .gcc-dots button {
  all: unset !important;
  display: inline-block !important;
  width: 8px !important;  height: 8px !important;
  min-width: 8px !important; min-height: 8px !important;
  max-width: 8px !important; max-height: 8px !important;
  padding: 0 !important; margin: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  background: #d1d5db !important;
  opacity: 0.9 !important;
  cursor: pointer !important;
  transition: transform .2s ease, opacity .2s ease, background .2s ease !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  flex: none !important;
}

.gcc-dots button.is-active {
  background: #111 !important;
  opacity: 1 !important;
  transform: scale(1.2) !important;
}
.gcc-dots button:hover {
  background: #9ca3af !important;
  opacity: 1 !important;
  transform: scale(1.1) !important;
}
.gcc-dots button:focus {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 7. CONTAINER QUERY + 9:16 FRAME (custom templates)
 * ─────────────────────────────────────────────────────────────────────────
 * Áp cho card có class gcc-tpl-* TRỪ built-in (default/noel/tet).
 * Dùng :where() để specificity = 0, template CSS dễ override.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* Parent làm container — KHÔNG đặt lên chính card (dependency loop) */
#gccLivePreview,
body.gcc-view-standalone {
  container-type: inline-size;
}

/* 9:16 frame + font-size động + CSS variables */
.gcc-preview-card[class*="gcc-tpl-"]:where(
  :not(.gcc-tpl-default):not(.gcc-tpl-noel):not(.gcc-tpl-tet)
),
.gcc-preview-card[data-template]:where(
  :not([data-template="default"]):not([data-template="noel"]):not([data-template="tet"])
) {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  height: auto;
  overflow: hidden;
  min-height: 0;  /* hủy min-height cứng của template cũ */

  /*
   * Font-size động: 2.96cqi ≈ 16px khi container 540px, ≈10.6px khi 360px.
   * Template dùng em/clamp(…cqi) sẽ tự co theo khung này.
   */
  font-size: clamp(9px, 2.96cqi, 18px);

  /*
   * CSS VARIABLES CHUẨN — template mới NÊN dùng các biến này
   * thay cho giá trị px cứng. Biến tính theo em → tự co theo font-size động.
   */
  --gcc-block-gap:      1em;
  --gcc-block-pad-y:    1.1em;
  --gcc-block-pad-x:    1.6em;
  --gcc-block-margin-x: 0.9em;
  --gcc-block-margin-y: 1em;
  --gcc-block-radius:   0.7em;
  --gcc-card-radius:    1.2em;
  --gcc-title-size:     1.6em;
  --gcc-from-size:      0.78em;
  --gcc-caption-size:   0.95em;
}

/* Layout flex dọc bên trong card */
.gcc-preview-card[class*="gcc-tpl-"]:where(
  :not(.gcc-tpl-default):not(.gcc-tpl-noel):not(.gcc-tpl-tet)
),
.gcc-preview-card[data-template]:where(
  :not([data-template="default"]):not([data-template="noel"]):not([data-template="tet"])
) {
  display: flex;
  flex-direction: column;
}

/* Media co dãn lấp khoảng trống còn lại */
.gcc-preview-card[class*="gcc-tpl-"]:where(
  :not(.gcc-tpl-default):not(.gcc-tpl-noel):not(.gcc-tpl-tet)
) > .gcc-preview-media,
.gcc-preview-card[data-template]:where(
  :not([data-template="default"]):not([data-template="noel"]):not([data-template="tet"])
) > .gcc-preview-media {
  flex: 1 1 auto;
  min-height: 0;
}

/* Standalone: card lớn hơn */
body.gcc-view-standalone .gcc-preview-card[class*="gcc-tpl-"]:where(
  :not(.gcc-tpl-default):not(.gcc-tpl-noel):not(.gcc-tpl-tet)
),
body.gcc-view-standalone .gcc-preview-card[data-template]:where(
  :not([data-template="default"]):not([data-template="noel"]):not([data-template="tet"])
) {
  max-width: 420px;
}

/* Mobile: full width */
@media (max-width: 480px) {
  .gcc-preview-card[class*="gcc-tpl-"]:where(
    :not(.gcc-tpl-default):not(.gcc-tpl-noel):not(.gcc-tpl-tet)
  ),
  .gcc-preview-card[data-template]:where(
    :not([data-template="default"]):not([data-template="noel"]):not([data-template="tet"])
  ) {
    max-width: 100%;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 8. STANDALONE CARD VIEW (card-view.php)
 * Scope: body.gcc-view-standalone — người nhận mở link thiệp
 * KHÔNG ảnh hưởng admin form preview
 * ═══════════════════════════════════════════════════════════════════════════ */

body.gcc-view-standalone,
body.gcc-wedding-view {
  background: #f5f5f5;
  margin: 0; padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.gcc-view-standalone .gcc-decorations-wrap,
body.gcc-wedding-view .gcc-decorations-wrap {
  width: fit-content !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}

.gcc-view-standalone .gcc-preview-card,
.gcc-view-standalone main.gcc-preview-card {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  overflow: visible;
  padding: 8px !important;
}

/* Header layout */
.gcc-view-standalone .gcc-preview-header {
  margin: 0 0 8px;
  padding: 12px !important;
  border-radius: 12px;
}
.gcc-view-standalone .gcc-preview-title {
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.2;
}
.gcc-view-standalone .gcc-preview-from { opacity: .9; }

/* Media + caption centering */
.gcc-view-standalone .gcc-preview-media,
.gcc-view-standalone .gcc-slider-controls,
.gcc-view-standalone .gcc-preview-caption {
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
  width: clamp(320px, 96vw, 920px) !important;
}

.gcc-view-standalone .gcc-preview-media {
  position: relative !important;
  margin: 8px 0 !important;
  padding: 0 !important;
  border-radius: 12px;
  background: #f8fafc;
  overflow: visible !important;
  contain: layout style;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  width: 100% !important;
}

.gcc-view-standalone .gcc-slider {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}

.gcc-view-standalone .gcc-slide {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important; height: 100% !important;
  margin: 0 !important; border: 0 !important;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  overflow: hidden !important;
}
.gcc-view-standalone .gcc-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.gcc-view-standalone .gcc-slide img,
.gcc-view-standalone .gcc-slide video {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
  margin: 0 !important; padding: 0 !important;
  display: block !important;
  border-radius: inherit !important;
}

.gcc-view-standalone .gcc-slide model-viewer,
.gcc-view-standalone model-viewer {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important;
  max-width: 100% !important; max-height: 100% !important;
  min-width: 0 !important; min-height: 0 !important;
  display: block !important; margin: 0 !important; padding: 0 !important;
  background: #f8fafc !important;
  z-index: 1 !important; overflow: hidden !important;
  contain: layout style paint size !important;
  border-radius: inherit !important;
}
.gcc-view-standalone .gcc-slide model-viewer::part(default-poster),
.gcc-view-standalone .gcc-slide model-viewer::part(poster) {
  position: absolute !important;
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
}

.gcc-view-standalone .gcc-preview-body,
.gcc-view-standalone .gcc-preview-caption {
  line-height: 1.65;
  padding: 12px !important;
}
.gcc-view-standalone .gcc-preview-audio { padding: 12px !important; }
.gcc-view-standalone .gcc-preview-audio audio { width: 100%; height: 46px; }

/* Dots standalone */
.gcc-view-standalone .gcc-slider-controls {
  position: absolute !important;
  bottom: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 20 !important;
  margin: 0 !important;
  padding: 4px 10px !important;
  background: transparent;
  width: auto !important;
  max-width: 100% !important;
  pointer-events: auto !important;
}
.gcc-view-standalone .gcc-dots {
  position: relative;
  z-index: 11;
}

/* Ẩn toggle dropdown ở standalone */
.gcc-view-standalone .gcc-preview-toggle { display: none !important; }


/* ═══════════════════════════════════════════════════════════════════════════
 * 9. BELOW-CARD MODULES (timestamp + reply form)
 * ═══════════════════════════════════════════════════════════════════════════ */

.gcc-view-standalone .gcc-card-below-modules,
.gcc-wedding-view   .gcc-card-below-modules {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.gcc-view-standalone .gcc-preview-card.gcc-tpl-default ~ .gcc-card-below-modules,
.gcc-view-standalone .gcc-preview-card.gcc-tpl-noel    ~ .gcc-card-below-modules,
.gcc-view-standalone .gcc-preview-card.gcc-tpl-tet     ~ .gcc-card-below-modules {
  max-width: 480px;
}

.gcc-view-standalone .gcc-card-below-modules .gcc-timestamp-container,
.gcc-wedding-view   .gcc-card-below-modules .gcc-timestamp-container {
  width: 100% !important; max-width: 100% !important;
  margin: 8px 0 0 !important; box-sizing: border-box !important;
}

.gcc-view-standalone .gcc-card-below-modules .gcc-reply-form-wrap,
.gcc-wedding-view   .gcc-card-below-modules .gcc-reply-form-wrap {
  width: 100% !important; max-width: 100% !important;
  margin: 8px 0 6px !important; box-sizing: border-box !important;
}

.gcc-view-standalone .gcc-reply-form-wrap .gcc-reply-accordion,
.gcc-wedding-view   .gcc-reply-form-wrap .gcc-reply-accordion {
  max-width: 100% !important; width: 100% !important;
  margin: 0 !important; box-sizing: border-box !important;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 10. RESPONSIVE — STANDALONE
 * ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1025px) {
  body.gcc-view-standalone { padding: 20px 12px; }
  .gcc-view-standalone .gcc-preview-card       { padding: 16px !important; }
  .gcc-view-standalone .gcc-preview-header     { margin-bottom: 12px; padding: 16px !important; }
  .gcc-view-standalone .gcc-preview-title      { font-size: 32px; }
  .gcc-view-standalone .gcc-preview-from       { font-size: 14px; margin-bottom: 4px; }
  .gcc-view-standalone .gcc-preview-body,
  .gcc-view-standalone .gcc-preview-caption    { font-size: 15px; padding: 12px !important; }
  .gcc-view-standalone .gcc-preview-audio      { padding: 16px !important; }
  .gcc-view-standalone .gcc-preview-audio audio { height: 54px; }
  .gcc-view-standalone .gcc-preview-media      { aspect-ratio: 1 / 1 !important; height: auto !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body.gcc-view-standalone { padding: 16px 12px; }
  .gcc-view-standalone .gcc-preview-card       { padding: 12px !important; }
  .gcc-view-standalone .gcc-preview-header     { margin-bottom: 10px; padding: 14px !important; }
  .gcc-view-standalone .gcc-preview-title      { font-size: 26px; }
  .gcc-view-standalone .gcc-preview-from       { font-size: 13px; margin-bottom: 4px; }
  .gcc-view-standalone .gcc-preview-body,
  .gcc-view-standalone .gcc-preview-caption    { font-size: 14px; padding: 10px !important; }
  .gcc-view-standalone .gcc-preview-audio      { padding: 14px !important; }
  .gcc-view-standalone .gcc-preview-audio audio { height: 50px; }
  .gcc-view-standalone .gcc-preview-media      { aspect-ratio: 1 / 1 !important; height: auto !important; }
}

@media (max-width: 767px) {
  body.gcc-view-standalone { padding: 8px 6px; }
  body.gcc-view-standalone .gcc-decorations-wrap,
  body.gcc-wedding-view .gcc-decorations-wrap { width: 100% !important; }
  .gcc-view-standalone .gcc-preview-card       { padding: 8px !important; border-radius: 12px; }
  .gcc-view-standalone .gcc-preview-header     { margin-bottom: 8px; padding: 10px !important; border-radius: 8px; }
  .gcc-view-standalone .gcc-preview-title      { font-size: 28px; line-height: 1.3; }
  .gcc-view-standalone .gcc-preview-from       { font-size: 15px; margin-bottom: 6px; }
  .gcc-view-standalone .gcc-preview-body,
  .gcc-view-standalone .gcc-preview-caption    { font-size: 16px; padding: 10px !important; }
  .gcc-view-standalone .gcc-preview-audio      { padding: 10px !important; }
  .gcc-view-standalone .gcc-preview-media      { aspect-ratio: 1 / 1 !important; height: auto !important; }
}

/* Responsive admin */
@media (max-width: 767px) {
  .gcc-col--preview .gcc-preview-card    { width: 100%; max-width: 100%; }
  .gcc-slider-controls                   { bottom: 8px; gap: 6px; }
  .gcc-dots                              { gap: 5px !important; }
  .gcc-dots button                       {
    width: 5px !important; height: 5px !important;
    min-width: 5px !important; min-height: 5px !important;
    max-width: 5px !important; max-height: 5px !important;
  }
  .gcc-model-card       { padding: 12px; }
  .gcc-model-card__icon { font-size: 32px; }
}

@media (max-width: 480px) {
  .gcc-view-standalone .gcc-card-below-modules,
  .gcc-wedding-view   .gcc-card-below-modules {
    max-width: 100%;
    padding: 0 4px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 11. ACCESSIBILITY & PRINT
 * ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .gcc-slide,
  .gcc-dots button { transition: none !important; }

  .gcc-view-standalone *,
  .gcc-view-standalone .gcc-slide { animation: none !important; transition: none !important; }
}

@media print {
  body.gcc-view-standalone { padding: 0; background: #fff; }
  .gcc-view-standalone .gcc-preview-card   { box-shadow: none; border: 2px solid #000; page-break-inside: avoid; }
  .gcc-view-standalone .gcc-slider-controls,
  .gcc-view-standalone .gcc-preview-audio  { display: none !important; }
  .gcc-slider-controls, .gcc-dots          { display: none !important; }
}
/* ==========================================================================
   VIDEO SLIDE — custom minimal controls (card view)
   Native controls đã bỏ; gcc-view.js gắn: tap = play/pause, nút loa = sound.
   ========================================================================== */

.gcc-slide { position: relative; }
.gcc-slide video { cursor: pointer; }

/* Nút loa — icon trần (không nền/viền), nhỏ gọn, drop-shadow để nổi trên
   video sáng màu.
   LƯU Ý theme override: Flatsome áp `button{padding:0 24px}` làm content-box
   về 0 và `svg{max-width:100%}` làm icon biến mất → phải hạ neo padding,
   min/max và size icon tường minh để thắng CSS theme. */
button.gcc-vid-sound,
.gcc-vid-sound {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    min-width: 30px;
    max-width: 30px;
    padding: 0;
    margin: 0;
    line-height: 1;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: .9;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
    transition: opacity .2s ease, transform .15s ease;
}
button.gcc-vid-sound:hover,
.gcc-vid-sound:hover  { background: none; opacity: 1; }
.gcc-vid-sound:active { transform: scale(.88); }
.gcc-vid-sound svg {
    display: block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    flex: 0 0 auto;
    pointer-events: none;
}

/* Icon play giữa khung khi video pause — không chặn tap (pointer-events:none).
   Selector chung: áp cho cả slide trong card (.gcc-slide) lẫn overlay
   lightbox/fullscreen (.gcc-mfs-media). */
.gcc-vid-paused { position: relative; }
.gcc-vid-paused::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .5);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M8 5v14l11-7z'/></svg>");
    background-repeat: no-repeat;
    background-position: 55% center;
    background-size: 30px;
    pointer-events: none;
    z-index: 4;
}