/* Morocco Special Bonus — widget + modals */
.cr-morocco-bonus {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99990;
}

.cr-morocco-bonus__fab,
.cr-morocco-bonus-modal,
.cr-bonus-block-modal {
  pointer-events: auto;
}

/* Floating widget */
.cr-morocco-bonus__fab {
  --cr-morocco-fab-bottom: max(132px, calc(118px + env(safe-area-inset-bottom)));
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: var(--cr-morocco-fab-bottom);
  z-index: 99991;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  max-width: min(280px, calc(100vw - 24px));
  border: 1px solid rgba(193, 39, 45, 0.35);
  border-radius: 16px;
  background: linear-gradient(135deg, #0d2818 0%, #1a0a0a 45%, #0f172a 100%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 20px rgba(193, 39, 45, 0.18);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  animation: crMoroccoFabFloat 3.2s ease-in-out infinite;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.cr-morocco-bonus__fab:hover {
  animation-play-state: paused;
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 28px rgba(0, 98, 51, 0.28);
}

.cr-morocco-bonus__fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.cr-morocco-bonus__fab-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 62%
  );
  background-size: 220% 100%;
  opacity: 1;
  filter: none;
  z-index: 0;
  pointer-events: none;
  animation: crMoroccoFabShimmer 3s ease-in-out infinite;
}

.cr-morocco-bonus__fab-flag,
.cr-morocco-bonus__fab-body,
.cr-morocco-bonus__fab-ball {
  position: relative;
  z-index: 1;
}

.cr-morocco-bonus__fab-flag {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.cr-morocco-bonus__fab-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cr-morocco-bonus__fab-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fbbf24;
  text-transform: uppercase;
}

.cr-morocco-bonus__fab-amount {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  background: linear-gradient(90deg, #fff, #fde68a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cr-morocco-bonus__fab-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cr-morocco-bonus__fab-ball {
  font-size: 22px;
  animation: crMoroccoBallBounce 1.6s ease-in-out infinite;
}

@keyframes crMoroccoFabFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes crMoroccoFabShimmer {
  0%, 100% { background-position: 200% 0; opacity: 0.6; }
  50% { background-position: -200% 0; opacity: 1; }
}

@keyframes crMoroccoBallBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(12deg); }
}

/* Modals shared */
.cr-morocco-bonus-modal,
.cr-bonus-block-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cr-morocco-bonus-modal.hidden,
.cr-bonus-block-modal.hidden {
  display: none !important;
}

.cr-morocco-bonus-modal__backdrop,
.cr-bonus-block-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(8px);
}

.cr-morocco-bonus-modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  animation: crMoroccoPanelIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes crMoroccoPanelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cr-morocco-bonus-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cr-morocco-bonus-modal__banner {
  position: relative;
  padding: 28px 22px 24px;
  background: linear-gradient(145deg, #006233 0%, #0d2818 35%, #c1272d 100%);
  overflow: hidden;
}

.cr-morocco-bonus-modal__banner-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    repeating-linear-gradient(45deg, #fff 0, #fff 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(-45deg, #fff 0, #fff 1px, transparent 1px, transparent 12px);
}

.cr-morocco-bonus-modal__banner-content {
  position: relative;
  z-index: 1;
}

.cr-morocco-bonus-modal__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fde68a;
  margin-bottom: 10px;
}

.cr-morocco-bonus-modal__title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
}

.cr-morocco-bonus-modal__subtitle {
  margin: 6px 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.cr-morocco-bonus-modal__prize {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cr-morocco-bonus-modal__prize-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
}

.cr-morocco-bonus-modal__prize-value {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.cr-morocco-bonus-modal__prize-value small {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.85;
}

.cr-morocco-bonus-modal__banner-ball {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 48px;
  opacity: 0.35;
  transform: rotate(-12deg);
}

.cr-morocco-bonus-modal__body {
  padding: 20px 22px 22px;
}

.cr-morocco-bonus-modal__perks {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-morocco-bonus-modal__perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.cr-morocco-bonus-modal__perks i {
  color: #22c55e;
  font-size: 16px;
}

.cr-morocco-bonus-modal__claim {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #0f172a;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #fde68a);
  background-size: 200% 100%;
  cursor: pointer;
  overflow: hidden;
  animation: crMoroccoClaimShimmer 2.5s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cr-morocco-bonus-modal__claim:disabled {
  opacity: 0.65;
  cursor: wait;
}

.cr-morocco-bonus-modal__claim-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: crMoroccoShine 2s ease-in-out infinite;
}

@keyframes crMoroccoClaimShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes crMoroccoShine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.cr-morocco-bonus-modal__legal {
  margin: 12px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

/* Coletando recompensa */
.cr-morocco-bonus-modal__panel--collecting {
  max-width: 340px;
  padding: 32px 24px 28px;
  text-align: center;
}

.cr-morocco-collect__orbit {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid rgba(251, 191, 36, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: crMoroccoCollectSpin 1.1s linear infinite;
  box-shadow: 0 0 24px rgba(193, 39, 45, 0.25);
}

.cr-morocco-collect__ball {
  font-size: 32px;
  animation: crMoroccoCollectBall 0.6s ease-in-out infinite alternate;
}

.cr-morocco-collect__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

.cr-morocco-collect__step {
  margin: 0 0 18px;
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  transition: opacity 0.25s ease;
}

.cr-morocco-collect__step.is-changing {
  opacity: 0.45;
}

.cr-morocco-collect__bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cr-morocco-collect__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c1272d, #006233, #fbbf24);
  background-size: 200% 100%;
  animation: crMoroccoCollectBarShine 1.2s linear infinite;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
}

.cr-morocco-collect__percent {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}

@keyframes crMoroccoCollectSpin {
  to { transform: rotate(360deg); }
}

@keyframes crMoroccoCollectBall {
  from { transform: scale(0.92) translateY(2px); }
  to { transform: scale(1.06) translateY(-3px); }
}

@keyframes crMoroccoCollectBarShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.cr-morocco-bonus-success__title {
  animation: crMoroccoCongratsPop 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes crMoroccoCongratsPop {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Success panel */
.cr-morocco-bonus-modal__panel--success {
  max-width: 360px;
  padding: 28px 24px;
  text-align: center;
}

.cr-morocco-bonus-success__icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.cr-morocco-bonus-success__title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.cr-morocco-bonus-success__label {
  margin: 6px 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.cr-morocco-bonus-success__amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.cr-morocco-bonus-success__currency {
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
}

.cr-morocco-bonus-success__value {
  font-size: 42px;
  font-weight: 900;
  color: #22c55e;
  font-variant-numeric: tabular-nums;
}

.cr-morocco-bonus-success__note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 20px;
}

.cr-morocco-bonus-success__reload {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, #006233, #059669);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Bonus block modal */
.cr-bonus-block-modal__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px 24px;
  border-radius: 18px;
  background: linear-gradient(165deg, #1e293b, #0f172a);
  border: 1px solid rgba(251, 191, 36, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: crMoroccoPanelIn 0.3s ease;
}

.cr-bonus-block-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
}

.cr-bonus-block-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fbbf24;
}

.cr-bonus-block-modal__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 8px;
}

.cr-bonus-block-modal__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.cr-bonus-block-modal__text {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.55;
  color: #94a3b8;
  text-align: left;
}

.cr-bonus-block-modal__text strong {
  color: #e2e8f0;
}

.cr-bonus-block-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-bonus-block-modal__btn {
  width: 100%;
  border-radius: 12px;
  padding: 13px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cr-bonus-block-modal__btn--primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
}

.cr-bonus-block-modal__btn--ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

@media (max-width: 480px) {
  .cr-morocco-bonus__fab {
    --cr-morocco-fab-bottom: max(138px, calc(124px + env(safe-area-inset-bottom)));
    right: 10px;
    padding: 8px 12px;
  }

  .cr-morocco-bonus__fab-amount {
    font-size: 16px;
  }
}
