/* ============================================
   DIGIBOOTH – FREE PHOTO BOOTH
   JoinMyMoment
   ============================================ */

/* ============================================
   PAGE TITLE
   ============================================ */
.digibooth-title {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  background: linear-gradient(135deg, #b721ff, #21d4fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 125px 24px 8px;
  margin: 0;
}

.digibooth-description {
  text-align: center;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

/* ============================================
   SECTION WRAPPERS
   ============================================ */
#allowCameraSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  min-height: 460px;
  padding: 32px 24px 64px;
  background: linear-gradient(
    160deg,
    rgba(183, 33, 255, 0.06) 0%,
    rgba(33, 212, 253, 0.04) 100%
  );
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

#captureSectionWrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 32px 24px;
}

#resultSectionWrapper {
  width: 100%;
  padding: 24px 24px 8px;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.controls,
.video-container {
  max-width: 650px;
  width: 100%;
}

/* ============================================
   VIDEO / CAMERA VIEW
   ============================================ */
.video-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1c0535 0%, #0d1a30 55%, #061a28 100%);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg, 20px);
  margin-block: 4px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(183, 33, 255, 0.15);
}

.video-container > .center {
  width: 100%;
  height: 100%;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(1);
}

/* ============================================
   "ALLOW CAMERA" BUTTON (fills video container)
   ============================================ */
.video-container > .center.btn-main {
  border-radius: var(--radius-lg, 20px);
  background: transparent;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  padding: 0;
  box-shadow: none;
  border: none;
  transition: background 0.25s ease;
}

.video-container > .center.btn-main:hover {
  background: rgba(183, 33, 255, 0.08);
  transform: none;
  box-shadow: none;
}

/* ============================================
   COUNTDOWN & FLASH OVERLAYS
   ============================================ */
#countdown {
  display: none;
  position: absolute;
  font-size: 5em;
  font-weight: 800;
  color: #fff;
  text-shadow:
    0 0 24px rgba(183, 33, 255, 0.9),
    0 2px 12px rgba(0, 0, 0, 0.7);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  line-height: 1;
}

#flash {
  position: absolute;
  background: #fff;
  opacity: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* ============================================
   HIDDEN CANVASES
   ============================================ */
canvas {
  display: none;
}

/* ============================================
   PRIMARY BUTTON  (btn-main)
   ============================================ */
.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #b721ff, #21d4fd);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 24px rgba(183, 33, 255, 0.3);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(183, 33, 255, 0.45);
}

.btn-main:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(183, 33, 255, 0.3);
}

/* ============================================
   SECONDARY BUTTON  (btn-second)
   ============================================ */
.btn-second {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--color-bg, #fff);
  color: var(--color-text, #1a1a1a);
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.btn-second:hover {
  border-color: #b721ff;
  color: #b721ff;
  background: rgba(183, 33, 255, 0.05);
}

.btn-second.active {
  background: linear-gradient(135deg, #b721ff, #21d4fd);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(183, 33, 255, 0.3);
}

select.btn-second {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  padding: 10px 14px;
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  font-size: 0.875rem;
  background: var(--color-bg, #fff);
  color: var(--color-text, #1a1a1a);
  cursor: pointer;
}

select.btn-second:focus {
  outline: none;
  border-color: #b721ff;
  box-shadow: 0 0 0 3px rgba(183, 33, 255, 0.12);
}

/* ============================================
   CONTROLS LAYOUT
   ============================================ */
#cameraSelect {
  width: 100%;
  margin-bottom: 6px;
}

.option-btns-wrapper {
  margin-top: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}

.option-btns-wrapper > * {
  font-size: 0.875rem;
}

.action-btns-wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ============================================
   PHOTO STRIP
   ============================================ */
.photo-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 650px;
  width: 100%;
}

.photo-strip img,
.photo-strip video {
  height: 80px;
  border-radius: var(--radius-sm, 8px);
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-strip img:hover,
.photo-strip video:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* ============================================
   RESULT SECTION LAYOUT
   ============================================ */
#resultSectionWrapper .controls,
#resultSectionWrapper .editor,
#resultSectionWrapper .results {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   EDITOR CARD
   ============================================ */
.editor,
.results {
  margin-block: 12px;
}

.editor {
  width: 100%;
  max-width: 650px;
  background: var(--color-bg-soft, #fafafa);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-lg, 20px);
  padding: 20px;
}

#captureSectionWrapper label,
#resultSectionWrapper label {
  display: block;
  margin-top: 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted, #6b7280);
  text-align: left;
}

/* ============================================
   COLOR PICKER
   ============================================ */
.color-picker {
  display: block;
  width: 100%;
  height: 44px;
  background-color: transparent;
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  cursor: pointer;
  padding: 4px;
  margin-top: 8px;
  transition: border-color 0.2s ease;
}

.color-picker:hover {
  border-color: #b721ff;
}

/* ============================================
   TEXTAREA
   ============================================ */
.textarea {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  background-color: var(--color-bg, #fff);
  border: 1.5px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  padding: 10px 12px;
  resize: none;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  color: var(--color-text, #1a1a1a);
  line-height: 1.55;
  margin-top: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea:focus {
  outline: none;
  border-color: #b721ff;
  box-shadow: 0 0 0 3px rgba(183, 33, 255, 0.1);
}

.textarea::placeholder {
  color: var(--color-text-light, #9ca3af);
}

/* ============================================
   RESULTS / PHOTOBOOTH CARD
   ============================================ */
.results {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 650px;
}

.photobooth-result {
  position: relative;
  padding: 20px 20px 100px;
  background: #fff;
  display: inline-block;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.06);
  max-width: 250px;
  border-radius: var(--radius-md, 12px);
}

.photobooth-result img,
.photobooth-result video {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 10px;
}

.watermark {
  color: #b721ff;
  font-style: italic;
  font-size: 0.8rem;
  font-weight: 500;
}

.date-text {
  position: absolute;
  bottom: 10px;
  width: 100%;
  left: 0;
  opacity: 0.8;
  font-size: 0.8rem;
  text-align: center;
}

/* ============================================
   JMM CTA BLOCK
   ============================================ */
.digibooth-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  width: calc(100% - 48px);
  margin: 40px auto 32px;
  padding: 36px 32px;
  background: linear-gradient(
    135deg,
    rgba(183, 33, 255, 0.07) 0%,
    rgba(33, 212, 253, 0.05) 100%
  );
  border: 1px solid rgba(183, 33, 255, 0.18);
  border-radius: var(--radius-xl, 28px);
  text-align: center;
}

.digibooth-cta .btn-main {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 8px 28px rgba(183, 33, 255, 0.35);
}

.digibooth-cta .btn-main:hover {
  box-shadow: 0 12px 40px rgba(183, 33, 255, 0.5);
}

.digibooth-cta small {
  color: #b721ff;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
  text-align: center;
}

/* ============================================
   REMOVE ADS BUTTON
   ============================================ */
#removeAds {
  display: block;
  margin: 8px auto;
  font-size: 0.8rem;
}

/* ============================================
   RESPONSIVE – TABLET / MOBILE
   ============================================ */
@media (max-width: 700px) {
  .digibooth-title {
    padding-top: 115px;
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .digibooth-description {
    font-size: clamp(0.8rem, 1vw, 1rem);
  }

  #allowCameraSection {
    padding: 24px 16px 48px;
    min-height: 380px;
  }

  #captureSectionWrapper {
    padding: 20px 14px;
    gap: 10px;
  }

  #resultSectionWrapper {
    padding: 16px 14px 8px;
  }

  .btn-main {
    padding: 11px 18px;
    font-size: 0.9375rem;
  }

  .btn-second {
    padding: 9px 13px;
    font-size: 0.8125rem;
  }

  .editor {
    padding: 16px;
    border-radius: var(--radius-md, 12px);
  }

  .action-btns-wrapper {
    gap: 6px;
  }

  .option-btns-wrapper {
    gap: 5px;
  }

  .digibooth-cta {
    width: calc(100% - 32px);
    padding: 28px 20px;
    margin: 28px auto 24px;
  }
}

@media (max-width: 400px) {
  .digibooth-title {
    padding-top: 110px;
    font-size: 1.75rem;
  }

  .digibooth-description {
    font-size: 0.9rem;
  }

  .photo-strip img,
  .photo-strip video {
    height: 64px;
  }

  .action-btns-wrapper {
    gap: 4px;
  }

  .btn-main,
  .btn-second {
    padding: 10px 12px;
    font-size: 0.8125rem;
  }
}
