/* =======================================
   QUOTE FRAME
======================================= */

.quote-frame {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 18px auto;
  padding: 28px 24px;
  transition:
    transform 0.25s cubic-bezier(.2, .6, .2, 1),
    box-shadow 0.25s cubic-bezier(.2, .6, .2, 1),
    background 0.25s cubic-bezier(.2, .6, .2, 1);
}

.quote-frame .qf-content {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.6;
  font-size: 16px;
}

.quote-frame::before,
.quote-frame::after {
  content: "\201C";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.quote-frame::before {
  top: -12px;
  background: #fff;
  padding: 0 10px;
}

.quote-frame::after {
  top: 91%;
  background: #fff;
  padding: 0 10px;
  content: "\201D";
}

@media (max-width: 480px) {
  .quote-frame {
    padding: 20px 16px;
  }

  .quote-frame .qf-content {
    font-size: 15px;
  }

  .quote-frame::before,
  .quote-frame::after {
    font-size: 32px !important;
  }
}

/* 1) Elegant Classic */
.qf-elegant {
  background: #fff;
  border: 5px solid var(--qf-accent, #ffdfb4) !important;
  color: #333;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.qf-elegant::before,
.qf-elegant::after {
  color: var(--qf-accent, #e53935);
  font-size: 58px;
  opacity: .95;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

/* 2) Modern Gradient */
.qf-gradient {
  color: #666;
  border-color: var(--qf-accent, #83d2fd) !important;
  border-top-right-radius: 40px;
  border-bottom-left-radius: 40px;
  display: block;
  background: none;
  border: 5px solid var(--qf-accent, #83d2fd) !important;
  padding: 15px 20px;
  position: relative;
  text-align: justify;
}

.qf-gradient .qf-content {
  text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

.qf-gradient::before,
.qf-gradient::after {
  color: var(--qf-accent, #83d2fd);
  font-size: 54px;
  opacity: unset;
}

/* 3) Minimalist Shadow */
.qf-minimal {
  background: #fff;
  border: 5px solid var(--qf-accent, #cfd8dd);
  color: #2e2e2e;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.qf-minimal::before,
.qf-minimal::after {
  color: var(--qf-accent, #9e9e9e);
  font-size: 70px;
  opacity: unset;
}

.quote-frame.qf-minimal::before {
  left: -21px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.qf-minimal::after {
  top: 45%;
  left: 96%;
  transform: translateY(-50%);
}

/* table wrapper (placeholders cho layout editor cũ) */
table.__MB_template_e {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

table.__MB_template_e td.__RE_PLACE_CONTENT {
  padding: 0;
  border: none;
}

td.__RE_PLACE_CONTENT .khungmau {
  background-color: var(--qf-accent, #fffaea);
  border: 2px solid var(--qf-accent, #eec1b3);
  padding: 15px;
}

td.__RE_PLACE_CONTENT .khungmau h3 {
  margin: unset;
  color: #000;
}

td.__RE_PLACE_CONTENT .khungmau p {
  margin: unset;
  padding-bottom: 10px;
  color: #000;
}

td.__RE_PLACE_CONTENT .khungmau p:last-child {
  padding-bottom: 0;
}

/* quote khungmau */
.quote-frame.qf-gradient.khungmau {
  border-radius: unset;
  border: 3px solid #eec1b3 !important;
}

.quote-frame.qf-gradient.khungmau::before {
  content: "";
  display: none;
}

.quote-frame.qf-gradient.khungmau::after {
  content: "";
  display: none;
}

/* =======================================
   MP3 PLAYER
======================================= */

.mp3-player {
  width: 100%;
  max-width: 500px;
  margin: 15px auto;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.mp3-player audio {
  width: 100%;
  outline: none;
}

.mp3-player .mp3-title {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.mp3-player .mp3-info {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

table.__MP3_template {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

table.__MP3_template td.__MP3_CONTENT {
  padding: 0;
  border: none;
}

/* =======================================
   IMAGE SLIDER
======================================= */

.image-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.image-slider .slider-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-slider .slider-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform .4s ease;
}

.image-slider .slider-item {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.image-slider .slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-slider .slider-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  font-size: 14px;
}

.image-slider .slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}

.image-slider .slider-prev {
  left: 10px;
}

.image-slider .slider-next {
  right: 10px;
}

.image-slider .slider-nav:hover {
  background: #fff;
}

/* =======================================
   IMAGE FRAME + GRID PRESET
======================================= */

.image-frame {
  margin: 18px auto;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  position: relative;
}

.image-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.img-slot {
  position: relative;
  min-height: 140px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #fff;
}

.img-slot figure {
  margin: 0;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-empty {
  color: #9ca3af;
  font-size: 14px;
  padding: 12px;
}

.slot-tools {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  background: rgba(17, 24, 39, .88);
  color: #fff;
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  user-select: none;
}

.slot-tools button {
  background: transparent;
  border: 0;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.slot-tools button:hover {
  background: rgba(255, 255, 255, .12);
}

.img-slot[draggable="true"] {
  cursor: grab;
}

.img-slot.dragging {
  opacity: .6;
}

.img-slot.drop-target {
  outline: 2px dashed #3b82f6;
}

.preset-caption {
  position: absolute;
  top: -14px;
  right: 10px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  opacity: .9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preset-caption .remove-layout {
  background: #ef4444;
  border: 0;
  color: #fff;
  font-size: 11px;
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
}

.preset-caption .remove-layout:hover {
  background: #dc2626;
}

/* GRID PRESET WRAP + CARDS */

.gp-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  max-height: 360px;
  overflow: auto;
}

.gp-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  transition:
    box-shadow .2s,
    transform .05s;
}

.gp-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}

.gp-card.active {
  outline: 2px solid #2563eb;
}

.gp-title {
  font-size: 12px;
  color: #111827;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-preview {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 8px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gp-row {
  display: flex;
  gap: 6px;
  flex: 1;
}

.gp-cell {
  flex: 1;
  background: linear-gradient(0deg, #e5e7eb, #e5e7eb);
  border-radius: 6px;
}

/* Variations */
.gp-preview.two-col {
  display: flex;
  flex-direction: row;
}

.gp-preview.two-col .gp-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gp-preview .gp-col.big {
  flex: 2;
}

.gp-preview .gp-col.wide {
  flex: 2;
}

.gp-preview .gp-col.narrow {
  flex: 1;
}

.gp-preview.three-col {
  display: flex;
  gap: 6px;
}

.gp-preview.three-col .gp-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gp-preview.masonry .tall {
  height: 66%;
}

.gp-preview.masonry .huge {
  height: 100%;
}

.gp-preview.masonry .short {
  height: 34%;
}

.gp-preview .wide {
  height: 100%;
}

div#explus-editor .clm {
    padding: unset;
}

div#explus-editor .img-slot {
    border: none;
}

div#explus-editor .image-frame img {
    border-radius: unset;
}

div#explus-editor .slot-tools {
    display: none;
}

div#explus-editor .preset-caption {
    display: none;
}
