 /* ================================
   Theme variables
================================ */
:root{
  --bg: #0b0b10;
  --card: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);

  --primary: #ff4fd8;
  --primary-2: #7c4dff;

  --radius: 22px;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
}

/* ================================
   Reset / base
================================ */
*{ box-sizing:border-box; }

html, body{

min-height:100%;
scroll-behavior: smooth;
}

body{
  margin:0;
  color:var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";

  font-size: clamp(15px, 1.6vw, 16.5px);
  line-height: 1.6;

  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,79,216,0.25), transparent 60%),
    radial-gradient(1000px 600px at 80% 0%, rgba(124,77,255,0.22), transparent 55%);
  background-repeat: no-repeat;
}

/* ================================
   Page layout
================================ */
.page{
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.card{
  width: min(580px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(10px);
}

/* ================================
   Header / hero
================================ */
.header{
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 12px;
}

.avatar{
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.title{
  margin: 6px 0 0;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tagline{
  margin: 0;
  color: var(--muted);
  font-size: 0.98em;
  max-width: 42ch;
}

/* ================================
   Shared sections
================================ */
.section{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.section-title{
  margin: 0 0 12px;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.section-title::after{
  content:"";
  display:block;
  width: 42px;
  height: 3px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.section-body{ margin-top: 10px; }

/* Rich text */
.richtext{
  color: var(--text);
  opacity: 0.95;
  line-height: 1.65;
}

.richtext p{ margin: 0 0 10px; }
.richtext p:last-child{ margin-bottom: 0; }

/* ================================
   Links / buttons
================================ */
.links{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.btn{
  display:flex;
  align-items:center;
  gap: 0;

  text-decoration:none;
  color: var(--text);

  padding: 14px 16px;
  border-radius: 14px;

  border: 1px solid rgba(255,79,216,0.35);
  background: linear-gradient(135deg, rgba(255,79,216,0.30), rgba(124,77,255,0.22));

  overflow:hidden;

  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.btn:active{ transform: translateY(0); }

.btn:focus-visible{
  outline: 3px solid rgba(255,79,216,0.45);
  outline-offset: 2px;
}

/* Left icon slot */
.icon-slot{
  width: 72px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}

/* Right slot (keeps label centered) */
.right-slot{
  width: 72px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
}

.icon{
  max-height: 32px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display:block;
}

/* Centered label */
.label{
  flex: 1;
  text-align:center;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding-right: 72px; /* matches icon-slot width */
}

/* If there is a right-slot on the button, keep label centered by removing padding-right */
.btn .right-slot + .label{ padding-right: 0; } /* safety */
.btn .label{ padding-right: 72px; } /* default */
.btn.btn-live .label{ padding-right: 0; } /* live uses right-slot */

/* ================================
   Live section (red theme)
================================ */
.section-live .section-title::after{
  content:"";
  display:block;
  width: 42px;
  height: 3px;
  margin-top: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.live-row{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.live-row.offline{ opacity: 0.8; }

.live-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,90,90,1);
  box-shadow: 0 0 0 5px rgba(255,90,90,0.16);
}

.live-dot.offline{
  background: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 5px rgba(255,255,255,0.10);
}

/* Live buttons */
.btn.btn-live{
  border: 1px solid rgba(255,90,90,0.48);
  background: linear-gradient(135deg, rgba(255,90,90,0.32), rgba(255,155,90,0.20));
}

.btn.btn-live:focus-visible{
  outline: 3px solid rgba(255,90,90,0.45);
  outline-offset: 2px;
}

/* "LIVE NOW" pill */
.live-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,90,90,0.55);
  background: rgba(255,90,90,0.20);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
}

/* ================================
   Footer
================================ */
.footer{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align:center;
}

.footer p{ margin: 0 0 6px; }
.footer p:last-child{ margin-bottom: 0; }

.muted{ color: var(--muted); }


/* ================================
   Live button: "Live now" badge inline (no overlay)
================================ */

.btn.btn-live{
  position: relative;
  border: 1px solid rgba(255,90,90,0.48);
  background: linear-gradient(
    135deg,
    rgba(255,90,90,0.32),
    rgba(255,155,90,0.20)
  );

  /* viktigt: ge lite luft så allt syns */
  gap: 12px;
  padding-top: 14px; /* tillbaka till normal padding */
}

/* Badge ska ligga i flödet (inte overlay) */
.live-badge{
  position: static;           /* <-- viktigast */
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);

  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;

  flex: 0 0 auto;
  white-space: nowrap;
}

.live-badge-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,90,90,1);
  box-shadow: 0 0 0 5px rgba(255,90,90,0.16);
}

/* Live-label ska inte vara centrerad/paddad som vanliga knappar */
.btn.btn-live .label{
  flex: 1;
  text-align: left;
  padding-right: 0;
} /* <-- saknades i ditt klipp, jag stänger regeln här */


/* =========================================================
   OVERRIDE: Live badge röd + liten rund lysande cirkel
   (läggs sist så den vinner över tidigare .live-badge)
========================================================= */

.btn.btn-live .live-badge{
  background: rgba(255, 40, 40, 0.16);
  border: 1px solid rgba(255, 40, 40, 0.55);
  color: rgba(255,255,255,0.95);

  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Skapa den röda lysande pricken utan att ändra HTML */
.btn.btn-live .live-badge::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;

  background: rgb(255, 40, 40);
  box-shadow:
    0 0 0 5px rgba(255, 40, 40, 0.18),
    0 0 14px rgba(255, 40, 40, 0.70);

  animation: livePulse 1.1s ease-in-out infinite;
}

@keyframes livePulse{
  0%, 100%{
    transform: scale(1);
    box-shadow:
      0 0 0 5px rgba(255, 40, 40, 0.18),
      0 0 14px rgba(255, 40, 40, 0.70);
  }
  50%{
    transform: scale(1.08);
    box-shadow:
      0 0 0 8px rgba(255, 40, 40, 0.12),
      0 0 22px rgba(255, 40, 40, 0.95);
  }
}

@media (prefers-reduced-motion: reduce){
  .btn.btn-live .live-badge::before{ animation: none; }
}

.section-contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.section-contact a:hover {
  text-decoration: underline;
}

/* ==============================================
   PROMOTIONS SECTION
   ============================================== */

/* Promotion button styling - Orange/Gold theme (different from Live and Links) */
.btn-promo {
  position: relative;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-promo:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

/* Promotion description - shown under button */
.promo-description {
  margin-top: 12px;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 2px;
  padding-bottom: 2px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #ffffff;
}

/* Dark backgrounds */
@media (prefers-color-scheme: dark) {
  .promo-description {
    background: rgba(245, 158, 11, 0.15);
    color: #ffffff;
  }
}

/* Shimmer effect for promotions (optional) */
.btn-promo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Promotion item wrapper (button + description) */
.promo-item {
  margin-bottom: 16px;
}

.promo-item:last-child {
  margin-bottom: 0;
}

.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

.btn.btn-small{
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1;
  border: 1px solid rgba(255,79,216,0.35);
  background: linear-gradient(135deg, rgba(255,79,216,0.30), rgba(124,77,255,0.22));
}

.gallery-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-item{
  display:block;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  aspect-ratio: 1 / 1;
  position: relative;
}

.gallery-item img,
.gallery-item video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.gallery-video-thumb{
  width:100%;
  height:100%;
  position:relative;
}

.play-badge{
  position:absolute;
  inset:auto 10px 10px auto;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


   =========================
   Gallery (public)
   ========================= */

.gallery-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 720px){
  .gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px){
  .gallery-grid{
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.gallery-item{
  display:block;
}

.gallery-item a{
  display:block;
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  background: rgba(255,255,255,0.04);
  text-decoration:none;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Konsistent thumbnail-höjd */
.gallery-item img{
  display:block;
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Title under thumbnail */
.gallery-title{
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.92);
}

/* Buy badge */
.gallery-badge{
  position:absolute;
  left: 10px;
  bottom: 10px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.70);
  color: #fff;
  backdrop-filter: blur(6px);
}

/* Optional type label if you still render it */
.gallery-type{
  position:absolute;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  backdrop-filter: blur(6px);
}

/* Placeholder when thumb_url is empty */
.gallery-thumb-placeholder{
  width:100%;
  aspect-ratio: 1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,0.65);
}

/* =====================================================
   MENU
   ===================================================== */

.section-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.menu-btn {
  background-color: #007bff;
  color: white;
  padding: 5px 9px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.menu-btn:hover {
  background-color: #0056b3;
}

/* =====================================================
   MODAL OVERLAY CONTAINER
   ===================================================== */
.stream-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;            /* JS öppnar med flex */
  align-items: center;
  justify-content: center;

  padding: 24px;
}

/* =====================================================
   MODAL BACKDROP
   ===================================================== */
.stream-modal-backdrop{
  position: absolute;
  inset: 0;

  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(2px);
}

/* =====================================================
   MODAL CARD
   ===================================================== */
.stream-modal-card{
  position: relative;
  z-index: 1;

  width: min(520px, 92vw);
  max-height: calc(100dvh - 48px);

  display: flex;
  flex-direction: column;

  background: #0f0f0f;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);

  overflow: hidden;
}

/* =====================================================
   BODY
   ===================================================== */
.stream-modal-body{
  padding: 16px;
  overflow: auto;

  /* Låter actions hamna längst ner i normal-läget */
  display: flex;
  flex-direction: column;
}

/* =====================================================
   IMPORTANT: remove 16:9 embed hack INSIDE the modal
   ===================================================== */
.stream-modal .video-embed{
  padding-top: 0 !important;
  height: auto !important;
}

/* =====================================================
   LAYOUT WRAPPER
   ===================================================== */
.mm-layout{
  display: block; /* normal-läge: en kolumn */
}

/* =====================================================
   MEDIA WRAPS (normal-läge)
   ===================================================== */
.stream-modal #mm-preview-wrap,
.stream-modal #mm-fullwrap{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

/* Media elements (normal-läge) */
.stream-modal #mm-preview-img,
.stream-modal #mm-video,
.stream-modal #mm-image{
  position: static !important;
  inset: auto !important;

  width: 100% !important;
  max-width: 520px;

  height: auto !important;
  max-height: 65vh;

  object-fit: contain;

  display: block;
  margin: 0 auto;
  border-radius: 16px;
}

/* =====================================================
   DETAILS (Title / Category / Price)
   ===================================================== */
.mm-details{
  margin-top: 14px;
}

.mm-row{
  display: flex;
  gap: 8px;
  margin: 4px 0;
  align-items: baseline;
}

.mm-label{
  width: 72px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

/* =====================================================
   CHECKOUT (iframe)
   ===================================================== */
#mm-iframe{
  width: 100%;
  height: 520px;
  border: 0;
  border-radius: 12px;
  margin-top: 12px;
}

/* =====================================================
   ACTIONS (normal-läge: längst ner)
   ===================================================== */
#mm-actions{
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* =====================================================
   Lock background scroll while open
   ===================================================== */
body.modal-open{
  overflow: hidden;
}

/* =====================================================
   CHECKOUT MODE (small preview left, info/checkout right)
   ===================================================== */
.stream-modal.is-checkout .mm-layout{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: start;
}

/* I checkout-läge: preview-wrap behöver inte center-flex */
.stream-modal.is-checkout #mm-preview-wrap{
  display: block;
  margin-bottom: 0;
}

/* Gör preview mindre i checkout-läge */
.stream-modal.is-checkout #mm-preview-img{
  max-width: 180px !important;
  max-height: 220px !important;
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
  border-radius: 12px;
}

/* Iframe lite mindre höjd i tvåkolumnsläget */
.stream-modal.is-checkout #mm-iframe{
  height: 420px;
}

/* Actions i checkout-läge: inte auto (för att inte trycka ner under en lång iframe) */
.stream-modal.is-checkout #mm-actions{
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

