/* Desenvolvido por: DriveWeb | Rodrigo Soares | © DriveWeb — Todos os direitos reservados · https://driveweb.pt · contacto@driveweb.pt · WhatsApp +351 913 671 493 */

.gd,
.gd * {
  box-sizing: border-box;
}

.gd {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f2f5f3;
  background: #0b0f0c;
  color-scheme: dark;
  isolation: isolate;
  -webkit-overflow-scrolling: touch;
}

.gd[hidden] {
  display: none;
}

.gd > * {
  flex-shrink: 0;
}

.gd button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.gd button:focus-visible {
  outline: 3px solid rgba(57, 255, 20, 0.65);
  outline-offset: 3px;
}

.gd-seq {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 1px 0 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gd-seq::-webkit-scrollbar {
  display: none;
}

.gd-chip {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid #2a332e;
  border-radius: 12px;
  color: #9aa59f;
  background: #141a17;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gd-chip.on {
  border-color: #39ff14;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.25), 0 0 18px rgba(57, 255, 20, 0.45);
}

.gd-chip.done {
  color: #39ff14;
  background: #16301f;
  font-size: 0;
}

.gd-chip.done::before {
  content: "✓";
  color: #39ff14;
  font-size: 19px;
  font-weight: 800;
}

.gd-x {
  position: sticky;
  right: 0;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #2a332e;
  border-radius: 12px;
  color: #f2f5f3;
  background: #141a17;
  font-size: 22px;
  font-weight: 700;
}

.gd-media {
  position: relative;
  flex: 0 0 auto;
  width: min(92vw, 46vh, 520px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: clamp(10px, 2.5vh, 24px) auto 0;
  overflow: hidden;
  border: 2px solid #39ff14;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.25), 0 0 18px rgba(57, 255, 20, 0.45);
}

.gd-media video,
.gd-media > .ex-anim {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gd-media .ex-anim {
  position: relative;
  aspect-ratio: auto;
  max-width: none;
  margin: 0;
  border-radius: 0;
}

.gd-media .ex-anim > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gd-badge {
  position: absolute;
  right: auto;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 10px;
  color: #fff;
  background: rgba(11, 15, 12, 0.78);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.gd-name {
  width: 100%;
  max-width: 520px;
  margin: 12px 0 0;
  color: #f2f5f3;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.gd-cue {
  width: 100%;
  max-width: 520px;
  margin: 5px 0 0;
  color: #9aa59f;
  font-size: 14px;
  font-style: italic;
  line-height: 1.35;
  text-align: center;
}

.gd-count {
  min-height: 1em;
  margin: 9px 0 0;
  color: #39ff14;
  font-size: clamp(56px, 18vw, 104px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.gd-sub {
  min-height: 1.2em;
  margin: 5px 0 0;
  color: #c9d1cb;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.gd-bar {
  width: min(520px, 100%);
  height: 8px;
  margin: 10px 0 0;
  overflow: hidden;
  border-radius: 99px;
  background: #1c2420;
}

.gd-bar > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #39ff14;
  transition: width 0.05s linear;
  will-change: width;
}

.gd-rest {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(520px, 100%);
  margin: 12px 0 0;
  text-align: center;
}

.gd-rest[hidden] {
  display: none;
}

.gd-rest:not([hidden]) {
  display: flex;
}

.gd-rest > :first-child,
.gd-rest-title {
  margin: 0;
  color: #39ff14;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gd-rest-t {
  margin: 4px 0 0;
  color: #fff;
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.gd-next {
  margin: 8px 0 0;
  color: #c9d1cb;
  font-size: 14px;
  line-height: 1.3;
}

.gd-ctl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: min(520px, 100%);
  margin: 16px auto 2px;
}

.gd-ctl button {
  min-width: 48px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #2a332e;
  border-radius: 14px;
  color: #fff;
  background: #141a17;
  font-size: 14px;
  font-weight: 700;
}

.gd-ctl button[data-a="pause"] {
  min-width: 128px;
  border-color: #39ff14;
  color: #0b0f0c;
  background: #39ff14;
}

.gd-ctl button[data-a="skip"] {
  min-width: 76px;
}

.gd-ctl button[data-a="voice"] {
  padding: 0 13px;
}

.gd-ctl button[data-cad] {
  min-width: 70px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: #c9d1cb;
  font-size: 13px;
}

.gd-ctl button[data-cad].on {
  border-color: #39ff14;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.25);
}

.gd-ctl button:disabled {
  cursor: default;
  opacity: 0.5;
}

.gd-start {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 8px 0 10px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #0b0f0c;
  background: #39ff14;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.gd-start:active,
.gd-ctl button:active,
.gd-x:active,
.gd-chip:active {
  transform: translateY(1px);
}

.gd-hero {
  margin-top: 14px;
}

@media (max-height: 700px) {
  .gd-media {
    width: min(88vw, 38vh);
    margin-top: 8px;
  }

  .gd-name {
    margin-top: 8px;
  }

  .gd-count {
    font-size: clamp(44px, 14vw, 72px);
  }

  .gd-bar {
    margin-top: 7px;
  }

  .gd-ctl {
    margin-top: 10px;
  }
}

.gd-safe {
  max-width: 520px;
  margin: 6px auto;
  padding: 8px 12px;
  border: 1px solid rgba(57, 255, 20, 0.45);
  border-radius: 12px;
  color: #dff7d8;
  background: rgba(57, 255, 20, 0.1);
  font-size: 13px;
  text-align: center;
}

.gd-cad-title {
  width: 100%;
  margin-top: 4px;
  color: #9aa59f;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.gd-ctl button[data-cad] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gd-ctl button[data-cad].on::before {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #39ff14;
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.8);
}

.gd-ctl button[data-a="pause"] {
  min-width: 150px;
}
