/*
 * AdBlock live preview styles
 * Ported from smartcat-ui Tailwind classes.
 * Colors are visual spec — do NOT change: #AC7524 / #E7C034 / #FFE664
 */

.adpv-root {
  --ad-gold-dark: #AC7524;
  --ad-gold: #E7C034;
  --ad-gold-light: #FFE664;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

/* ======== Title banner (title.png + overlaid text) ======== */
.adpv-title-wrap {
  position: relative;
  width: 100%;
  margin-bottom: -40px; /* overlap gold frame like the real widget */
  z-index: 2;
  pointer-events: none;
}
.adpv-title-img {
  width: 100%;
  height: auto;
  display: block;
}
.adpv-title-text {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  width: 75%;
  text-align: center;
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1.2;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.4);
  word-break: break-word;
}

/* ======== Outer gold gradient frame ======== */
.adpv-frame {
  width: 100%;
  border-radius: 16px;
  padding: 4px;
  background: linear-gradient(
    180deg,
    #E7C034 0%,
    #FFE664 21.15%,
    #AC7524 42.31%,
    #FFE664 62.5%,
    #AC7524 95.67%
  );
}

.adpv-frame-inner {
  position: relative;
  width: 100%;
  border-radius: 14px;
  background: #000;
  padding: 8px;
}

/* ======== Brown gradient content area ======== */
.adpv-content {
  position: relative;
  width: 100%;
  border-radius: 6px;
  padding: 60px 12px 20px;
  background: linear-gradient(
    180deg,
    rgba(172, 117, 36, 0.6) 0%,
    rgba(172, 117, 36, 0.3) 100%
  );
  min-height: 420px;
}

.adpv-sections {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ======== Banner image ======== */
.adpv-banner {
  width: 90%;
  padding-top: 16px;
}
.adpv-banner-inner {
  width: 100%;
  aspect-ratio: 163 / 161;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.adpv-banner-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.adpv-banner-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

/* ======== Block section (block1 / block2 / games) ======== */
.adpv-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.adpv-block[hidden] {
  display: none;
}

/* gold pill title */
.adpv-block-title {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 8px;
  background: var(--ad-gold-dark);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25rem;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.2);
  text-shadow: 0 5px 5px rgba(0, 0, 0, 0.5);
  max-width: 90%;
  text-align: center;
  word-break: break-word;
}

.adpv-block-content {
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  padding: 0 8px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ======== Games carousel ======== */
.adpv-games-scroll {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.adpv-games-scroll::-webkit-scrollbar {
  height: 4px;
}
.adpv-games-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.adpv-games-row {
  display: flex;
  gap: 8px;
  min-width: min-content;
  justify-content: center;
  padding: 0 4px;
}

.adpv-game-card {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.adpv-game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.adpv-game-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.4);
}

/* ======== Empty state placeholder ======== */
.adpv-placeholder {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  font-style: italic;
  text-align: center;
}

/* ======== Sticky container wrapper for form side ======== */
.adpv-sticky {
  position: sticky;
  top: 20px;
}
.adpv-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: 500;
}
.adpv-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E7C034;
  box-shadow: 0 0 6px rgba(231, 192, 52, 0.8);
  animation: adpv-pulse 2s ease-in-out infinite;
}
@keyframes adpv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.adpv-footnote {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #6c757d;
  line-height: 1.5;
}

/* ======== FAB side menu preview ======== */
.adpv-fab-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 8px;
  border: 1px dashed #dee2e6;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%);
}

.adpv-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* gold arrow toggle button (FabArrowContainer) */
.adpv-fab-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #E7C034;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow:
    0 5px 5px 0 rgba(0, 0, 0, 0.4),
    inset 0 5px 5px 0 rgba(255, 255, 255, 0.3);
}
.adpv-fab-arrow::before {
  content: "";
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid #FFE664;
}

/* black pill container holding menu items */
.adpv-fab-menu {
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 7px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* round logo icon inside the menu */
.adpv-fab-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(231, 192, 52, 0.6);
}
.adpv-fab-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.adpv-fab-item-empty {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.45);
}

/* callout arrow pointing from FAB to modal */
.adpv-fab-callout {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4px;
  color: #495057;
  font-size: 0.75rem;
  line-height: 1.5;
}
.adpv-fab-callout strong {
  color: #0d6efd;
  font-size: 0.8rem;
}
.adpv-fab-callout-arrow {
  font-size: 1.3rem;
  color: #adb5bd;
  margin-top: 2px;
}
