/* Lykkehjul – Frontend Styles */

:root {
  --lh-primary:   #e74c3c;
  --lh-secondary: #f39c12;
  --lh-success:   #27ae60;
  --lh-overlay:   rgba(0, 0, 0, 0.72);
  --lh-popup-bg:  #1a1a2e;
  --lh-radius:    18px;
  --lh-shadow:    0 24px 60px rgba(0, 0, 0, 0.5);
  --lh-text:      #ffffff;
  --lh-text-muted:#c8c8e0;
  --lh-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Overlay ── */
.lykkehjul-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--lh-overlay);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: var(--lh-font);
}

.lykkehjul-overlay.is-open {
  display: flex;
  animation: lh-fade-in 0.25s ease forwards;
}

.lykkehjul-shortcode {
  position: relative;
  display: flex;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
}

.lykkehjul-shortcode.is-open {
  animation: none;
}

@keyframes lh-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Popup Card ── */
.lykkehjul-popup {
  position: relative;
  background: var(--lh-popup-bg);
  background-size: cover;
  background-position: center;
  border-radius: var(--lh-radius);
  box-shadow: var(--lh-shadow);
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: lh-slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  color: var(--lh-text);
  text-align: center;
}

.lykkehjul-popup::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 35, 0.75);
  border-radius: var(--lh-radius);
  pointer-events: none;
}

.lykkehjul-content {
  position: relative;
  z-index: 1;
}

@keyframes lh-slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Close Button ── */
.lykkehjul-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.lykkehjul-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.1);
}

/* ── Typography ── */
.lykkehjul-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.lykkehjul-subtitle {
  font-size: 1rem;
  color: var(--lh-text-muted);
  margin: 0 0 28px;
  line-height: 1.5;
}

/* ── Wheel ── */
.lykkehjul-wheel-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 28px;
}

.lykkehjul-wheel {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
  transition: none;
  will-change: transform;
}

.lykkehjul-wheel svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  overflow: hidden;
}

.lykkehjul-wheel.is-spinning {
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

/* Pointer arrow above wheel */
.lykkehjul-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #fff;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
  z-index: 2;
}

/* ── Spin Button ── */
.lykkehjul-spin-btn {
  display: inline-block;
  padding: 16px 48px;
  background: linear-gradient(135deg, var(--lh-primary) 0%, #c0392b 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  margin-bottom: 20px;
}

.lykkehjul-spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(231, 76, 60, 0.6);
}

.lykkehjul-spin-btn:active:not(:disabled) {
  transform: translateY(0);
}

.lykkehjul-spin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Message ── */
.lykkehjul-message {
  min-height: 48px;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0 8px;
  transition: opacity 0.3s ease;
}

.lykkehjul-message:empty {
  opacity: 0;
}

.lykkehjul-message.is-won {
  color: #2ecc71;
  font-weight: 700;
  font-size: 1.15rem;
  animation: lh-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lykkehjul-message.is-lost {
  color: var(--lh-text-muted);
}

.lykkehjul-message.is-blocked {
  color: var(--lh-secondary);
}

.lykkehjul-message.is-error {
  color: #e74c3c;
}

/* ── Win instruction ── */
.lykkehjul-win-instruction {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: 8px;
  color: #2ecc71;
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  animation: lh-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lh-pop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Reward badge in cart ── */
.lykkehjul-reward-badge {
  display: inline-block;
  background: var(--lh-success);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ── Inactive placeholder ── */
.lykkehjul-inactive {
  text-align: center;
  color: #999;
  font-size: 0.9rem;
  padding: 16px;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .lykkehjul-popup {
    padding: 44px 24px 32px;
    border-radius: 14px;
  }

  .lykkehjul-wheel {
    width: 210px;
    height: 210px;
  }

  .lykkehjul-spin-btn {
    padding: 14px 36px;
    font-size: 1rem;
  }
}

/* ── Checkout removal notice ── */
.lykkehjul-checkout-notice {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.lykkehjul-checkout-notice--error {
  background: #fdf2f2;
  border: 1px solid #e74c3c;
  color: #922b21;
}
