/**
 * Gmingo performance and auth presentation.
 * Progressive images, compact mobile auth, reduced motion.
 */

.gm-img {
  position: relative;
  background-color: #e8eef6;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.db-cases__media.gm-img .gm-img__photo,
.db-media-card__visual.gm-img .gm-img__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gm-img__photo {
  opacity: 0;
  transition: opacity 280ms ease;
}

.gm-img__photo.is-ready,
.gm-img.is-ready .gm-img__photo {
  opacity: 1;
}

.gm-img__fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-align: center;
  background: #e8eef6;
}

.gm-img.is-error .gm-img__photo,
.gm-img__photo.is-error {
  opacity: 0;
}

.gm-img.is-error .gm-img__fallback {
  display: flex;
}

.rt-tcard-avatar__img {
  z-index: 1;
  object-fit: cover;
  object-position: center center;
  background: #fff;
}

.db-cases__card,
.db-media-card {
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.db-auth-mobile-kicker {
  display: none;
  margin: 0 0 0.35rem;
  color: #2f80ed;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.db-auth-form__subtitle--mobile {
  display: none;
}

.db-auth-form__submit.is-loading {
  pointer-events: none;
  cursor: progress;
}

.db-auth-form__submit.is-loading span {
  opacity: 0.85;
}

@media (max-width: 1023px) {
  .db-auth__visual {
    display: none;
  }

  .db-auth__panel {
    align-items: center;
    justify-content: flex-start;
    min-height: 100svh;
    padding: 1.35rem 1rem 2rem;
    background:
      radial-gradient(ellipse 80% 28% at 50% 0%, rgba(47, 128, 237, 0.1), transparent 70%),
      #eef3f8;
  }

  .db-auth__card {
    width: min(100%, 26.5rem);
    margin: 0 auto;
    padding: 1.55rem 1.15rem 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.55rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  }

  .db-auth-form__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.2rem;
  }

  .db-auth-form__logo--panel {
    display: flex !important;
    justify-content: center;
    width: 100%;
    margin: 0 0 1rem;
  }

  .db-auth-form__logo--panel .db-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0.45rem 0.9rem;
    border-radius: 1.05rem;
    background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
    border: 1px solid rgba(47, 128, 237, 0.12);
    box-shadow: 0 10px 24px rgba(47, 128, 237, 0.12);
  }

  .db-auth-form__logo--panel .db-brand-logo__img,
  .db-auth-form__logo--panel .db-brand-logo--auth .db-brand-logo__img {
    display: block;
    height: 2.65rem;
    width: auto;
    max-width: 9.25rem;
    object-fit: contain;
  }

  .db-auth-mobile-kicker {
    display: block;
    width: 100%;
    margin: 0 0 0.35rem;
    text-align: center;
  }

  .db-auth-form__title,
  .db-auth__card .db-auth-form__title {
    width: 100%;
    font-size: 1.7rem !important;
    text-align: center !important;
  }

  .db-auth-form__subtitle,
  .db-auth-form__subtitle--mobile {
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .db-auth-form__subtitle--desk {
    display: none;
  }

  .db-auth-form__subtitle--mobile {
    display: block;
  }

  .db-auth__panel .db-label {
    text-align: left;
  }

  .db-auth__panel .db-input,
  .db-auth__panel .db-input-group .db-input,
  .db-auth__panel select.db-input {
    min-height: 3.05rem;
    border-radius: 0.95rem;
    background: #f4f7fb;
    border-color: #e4ebf3;
  }

  .db-auth__panel .db-btn.db-auth-form__submit,
  .db-auth__panel .db-auth-form__submit {
    width: 100%;
    min-height: 3.2rem;
    border-radius: 0.95rem;
    justify-content: center;
    background: linear-gradient(180deg, #3b8ef0 0%, #1d6fe0 100%);
    box-shadow: 0 12px 24px -14px rgba(29, 111, 224, 0.9);
  }

  .db-auth__panel .db-auth-form__submit i {
    display: none;
  }

  .db-auth-form__row {
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .db-auth-form__footer,
  .db-auth-form__trust {
    text-align: center;
  }

  .db-auth-reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .db-cases__summary,
  .db-media-card__body > p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gm-img__photo,
  .db-cases__card,
  .db-media-card,
  .db-auth-reveal,
  .db-auth__glow,
  .db-auth__node {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }

  .gm-img.is-error .gm-img__photo,
  .gm-img__photo.is-error {
    opacity: 0;
  }
}

@media (min-width: 1024px) {
  .db-auth__glow,
  .db-auth__node {
    animation: none;
  }
}
