/*
 * BOOM TRAINER OS
 * EGG HATCH UI V1
 */


.egg-hatch-action {
  display: flex;
  width: 100%;

  margin-top: 16px;

  justify-content: center;
}


.egg-hatch-button {
  position: relative;

  width: min(
    100%,
    260px
  );

  min-height: 46px;

  padding:
    0 18px;

  border:
    1px solid
    rgba(66, 238, 194, .72);

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      rgba(32, 219, 170, .18),
      rgba(20, 94, 88, .14)
    );

  color: #66f0c9;

  font: inherit;

  font-size: .72rem;
  font-weight: 1000;
  letter-spacing: .08em;

  cursor: pointer;

  box-shadow:
    inset 0 0 0 1px
      rgba(76, 237, 197, .06),
    0 0 24px
      rgba(38, 220, 171, .09);

  transition:
    transform .16s ease,
    background .16s ease,
    box-shadow .16s ease;
}


.egg-hatch-button:hover:not(:disabled) {
  transform:
    translateY(-2px);

  background:
    linear-gradient(
      135deg,
      rgba(37, 235, 181, .27),
      rgba(22, 117, 103, .2)
    );

  box-shadow:
    inset 0 0 0 1px
      rgba(76, 237, 197, .1),
    0 0 30px
      rgba(38, 220, 171, .16);
}


.egg-hatch-button:disabled {
  cursor: wait;
  opacity: .75;
}


.egg-record.is-hatching {
  border-color:
    rgba(87, 237, 198, .85) !important;

  box-shadow:
    0 0 35px
    rgba(45, 224, 177, .13);
}


.egg-record.is-hatching
.egg-orbit {
  animation:
    boomEggHatchPulse
    .72s ease-in-out
    infinite alternate;
}


@keyframes boomEggHatchPulse {

  from {
    transform:
      scale(1);
    filter:
      brightness(1);
  }

  to {
    transform:
      scale(1.08);
    filter:
      brightness(1.28);
  }
}


.egg-record.is-hatched {
  border-color:
    rgba(255, 216, 87, .72) !important;

  background:
    radial-gradient(
      circle at 50% 44%,
      rgba(255, 215, 82, .08),
      transparent 46%
    ),
    rgba(4, 16, 24, .94);
}


.egg-hatch-result {
  display: flex;

  width: min(
    100%,
    310px
  );

  margin:
    14px auto 0;

  padding:
    10px 12px;

  align-items: center;
  justify-content: center;

  gap: 12px;

  border:
    1px solid
    rgba(255, 214, 76, .26);

  border-radius: 12px;

  background:
    rgba(255, 205, 53, .055);
}


.egg-hatch-result img {
  width: 64px;
  height: 64px;

  object-fit: contain;

  filter:
    drop-shadow(
      0 7px 10px
      rgba(0,0,0,.38)
    );
}


.egg-hatch-result div {
  display: flex;

  flex-direction: column;

  align-items: flex-start;
}


.egg-hatch-result small {
  color: #72e7ca;

  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .09em;
}


.egg-hatch-result strong {
  margin-top: 4px;

  color: #f3fafb;

  font-size: .95rem;
}


.egg-hatch-result span {
  margin-top: 3px;

  color: #ffd75b;

  font-size: .58rem;
  font-weight: 1000;
}


/* Toast */

.boom-egg-hatch-toast {
  position: fixed;

  z-index: 999999;

  left: 50%;
  bottom: 34px;

  width:
    min(
      calc(100vw - 30px),
      430px
    );

  padding:
    13px 18px;

  transform:
    translate(
      -50%,
      20px
    );

  border:
    1px solid
    rgba(84, 231, 198, .35);

  border-radius: 12px;

  background:
    rgba(4, 17, 24, .96);

  color: #dffbf5;

  font-size: .78rem;
  font-weight: 800;

  text-align: center;

  opacity: 0;

  pointer-events: none;

  box-shadow:
    0 14px 45px
    rgba(0,0,0,.45);

  transition:
    opacity .2s ease,
    transform .2s ease;
}


.boom-egg-hatch-toast.is-visible {
  opacity: 1;

  transform:
    translate(
      -50%,
      0
    );
}


.boom-egg-hatch-toast.is-success {
  border-color:
    rgba(71, 233, 192, .58);
}


.boom-egg-hatch-toast.is-error {
  border-color:
    rgba(255, 104, 119, .55);

  color: #ffd9dd;
}


@media (max-width: 620px) {

  .egg-hatch-button {
    width: 100%;
  }

  .boom-egg-hatch-toast {
    bottom: 20px;
  }
}
