/**
 * GymDiet Master — Yandex ID Authentication Styles
 * Complies with Yandex ID Brand Guidelines & dark neon design system.
 */

/* ── Yandex ID Login Button ── */
.yandex-id-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #1f2733;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  width: 100%;
  box-sizing: border-box;
}

.yandex-id-btn:hover {
  background-color: #263242;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.yandex-id-btn:active {
  transform: scale(0.985);
}

/* Yandex Badge Icon */
.yandex-id-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #fc3f1d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(252, 63, 29, 0.4);
}

.yandex-id-btn-label {
  letter-spacing: -0.2px;
}

/* ── Authenticated User Profile Card ── */
.auth-profile-card {
  background: linear-gradient(145deg, #131922 0%, #17212e 100%);
  border: 1px solid rgba(0, 240, 118, 0.2);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.auth-profile-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.auth-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00f076;
}

.auth-profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f076, #00b355);
  color: #081016;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.auth-yandex-badge-mini {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #fc3f1d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #131922;
}

.auth-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.auth-profile-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-profile-email {
  font-size: 12px;
  color: #8da2b5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #00f076;
  margin-top: 2px;
}

.auth-btn-logout {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.auth-btn-logout:hover {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* ── Auth Modal Sheet ── */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-sheet {
  background-color: #131922;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 28px 24px 24px;
  max-width: 380px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  transform: translateY(12px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.auth-modal-overlay.active .auth-modal-sheet {
  transform: translateY(0) scale(1);
}

.auth-modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.2s;
}

.auth-modal-close-btn:hover {
  color: #ffffff;
}

.auth-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background-color: rgba(0, 240, 118, 0.1);
  border: 1px solid rgba(0, 240, 118, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #00f076;
  margin-bottom: 16px;
}

.auth-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.auth-modal-caption {
  font-size: 13px;
  color: #8da2b5;
  line-height: 1.45;
  margin: 0 0 24px;
}

.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn-dev-mode {
  background: none;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: #64748b;
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-btn-dev-mode:hover {
  border-color: #00f076;
  color: #00f076;
}

/* ── OTP Verification Step Styles (Dark Neon) ── */
.auth-step-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  animation: authFadeIn 0.22s ease-out;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-otp-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 240, 118, 0.08);
  border: 1px solid rgba(0, 240, 118, 0.25);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 18px;
  text-align: left;
}

.auth-otp-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 240, 118, 0.2);
  color: #00f076;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-otp-target-email {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
}

.auth-otp-target-hint {
  font-size: 11px;
  color: rgba(218, 225, 248, 0.65);
  margin-top: 1px;
}

/* 6-digit OTP Inputs Container */
.auth-otp-boxes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 18px;
}

.auth-otp-digit {
  width: 44px;
  height: 52px;
  border-radius: 12px;
  background: #080d16;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  outline: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
  -webkit-appearance: none;
}

.auth-otp-digit:focus {
  border-color: #00f076;
  background: #0d1522;
  box-shadow: 0 0 16px rgba(0, 240, 118, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.auth-otp-digit.filled {
  border-color: rgba(0, 240, 118, 0.5);
  color: #00f076;
}

.auth-otp-boxes.has-error .auth-otp-digit {
  border-color: #ff5c7a !important;
  color: #ff5c7a !important;
  animation: authOtpShake 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes authOtpShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.auth-otp-error-msg {
  color: #ff5c7a;
  font-size: 12px;
  font-weight: 700;
  min-height: 18px;
  margin: -6px 0 12px;
  text-align: center;
}

.auth-otp-demo-hint {
  background: rgba(250, 204, 21, 0.12);
  border: 1px dashed rgba(250, 204, 21, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  color: #facc15;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}

/* OTP Timer & Resend Button */
.auth-otp-timer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 16px;
  min-height: 24px;
}

.auth-otp-resend-btn {
  background: none;
  border: none;
  color: #00f076;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  transition: opacity 0.15s;
}

.auth-otp-resend-btn:disabled {
  color: #64748b;
  text-decoration: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.auth-otp-back-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.15s;
}

.auth-otp-back-btn:hover {
  color: #ffffff;
}

