html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background:
    radial-gradient(circle at 12% 18%, rgba(96, 109, 101, 0.24), transparent 44%),
    radial-gradient(circle at 74% 68%, rgba(82, 95, 89, 0.18), transparent 50%),
    radial-gradient(circle at 84% 20%, rgba(74, 86, 80, 0.2), transparent 48%),
    radial-gradient(circle at 52% 82%, rgba(66, 78, 72, 0.16), transparent 52%),
    linear-gradient(140deg, #f1f2ef 0%, #e0e4df 38%, #cdd4cf 70%, #bcc4bf 100%);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.auth-demo-wrapper {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 860px;
  border: 1px solid rgba(199, 212, 229, 0.85);
  border-radius: 1rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(243, 248, 255, 0.93) 56%,
    rgba(234, 242, 252, 0.9) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 3rem;
}



.auth-card.shadow-sm {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.provider-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top:3rem;
}

.provider-grid form {
  margin: 0;
}

.provider-card {
  width: 100%;
  border: 0;
  border-radius: 0.85rem;
  color: #1f2a37;
  background: linear-gradient(180deg, #e7ebf0 0%, #d9dee6 100%);
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2), 0 2px 6px rgba(15, 23, 42, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.provider-card:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.provider-card:not(:disabled):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.provider-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.provider-card:disabled .provider-image::before {
  animation: none;
  filter: grayscale(1);
}

.provider-name {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  font-weight: 500;
  background: linear-gradient(180deg, #e4e9ef 0%, #d5dbe4 100%);
}

.provider-image {
  flex: 3;
  display: block;
  position: relative;
  overflow: hidden;
}

.provider-image::before {
  content: '';
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.provider-google {
  background: #fff;
}

.provider-google .provider-image {
}

.provider-google .provider-image::before {
  background-image: url('/images/providers/google-bg.svg');
  animation: google-drift 6s linear infinite;
}

.provider-facebook {
  background: #fff;
}

.provider-facebook .provider-image {
}

.provider-facebook .provider-image::before {
  background-image: url('/images/providers/facebook-bg.svg');
  animation: facebook-drift 6.5s linear infinite;
}

.provider-linkedin {
  background: #fff;
}

.provider-linkedin .provider-image {
}

.provider-linkedin .provider-image::before {
  background-image: url('/images/providers/linkedin-bg.svg');
  animation: linkedin-wave 7s ease-in-out infinite;
}

@keyframes google-drift {
  0% {
    transform: translate(-7%, -5%) scale(1.08);
  }
  25% {
    transform: translate(3%, -2%) scale(1.1);
  }
  50% {
    transform: translate(8%, 4%) scale(1.09);
  }
  75% {
    transform: translate(-1%, 7%) scale(1.1);
  }
  100% {
    transform: translate(-7%, -5%) scale(1.08);
  }
}

@keyframes facebook-drift {
  0% {
    transform: translate(-6%, 3%) scale(1.1);
  }
  25% {
    transform: translate(2%, -4%) scale(1.08);
  }
  50% {
    transform: translate(7%, 1%) scale(1.11);
  }
  75% {
    transform: translate(0%, 6%) scale(1.09);
  }
  100% {
    transform: translate(-6%, 3%) scale(1.1);
  }
}

@keyframes linkedin-wave {
  0% {
    transform: translateY(0%) scale(1.06);
  }
  50% {
    transform: translateY(-5%) scale(1.1);
  }
  100% {
    transform: translateY(0%) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .provider-image::before {
    animation: none;
  }
}

.google-only-card {
  max-width: 980px;
}

.google-only-steps {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.google-only-steps li {
  margin-bottom: 0.55rem;
}

.google-only-note {
  border-left: 4px solid #9ab3d9;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.35rem;
  padding: 0.75rem 0.9rem;
}

.google-only-sidepanel {
  height: 100%;
  border: 1px solid rgba(173, 190, 216, 0.45);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.58);
  padding: 1rem;
}

.google-only-provider-card {
  min-height: 220px;
  border: 1px solid #c6d0df;
  border-left: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  cursor: pointer;
}

.google-only-provider-card .provider-name {
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(242, 247, 255, 0.62) 100%);
  border-top: 1px solid rgba(214, 224, 239, 0.9);
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 1rem 1rem 1.1rem;
}

.google-only-provider-card:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.24), 0 4px 10px rgba(15, 23, 42, 0.16);
}

.google-only-provider-card:not(:disabled):active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2), 0 2px 6px rgba(15, 23, 42, 0.14);
}

@media (min-width: 992px) {
  .google-cta-offset {
    margin-top: 4.25rem;
  }
}

.oauth-result-card {
  max-width: 1040px;
}

.result-pill {
  border: 1px solid rgba(185, 201, 222, 0.7);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 245, 255, 0.78) 100%);
  padding: 0.75rem 0.9rem;
}

.result-pill-success {
  border-color: rgba(25, 135, 84, 0.45);
  background: linear-gradient(180deg, rgba(230, 250, 240, 0.95) 0%, rgba(209, 243, 224, 0.9) 100%);
}

.result-pill-missing {
  border-color: rgba(255, 193, 7, 0.55);
  background: linear-gradient(180deg, rgba(255, 248, 225, 0.95) 0%, rgba(255, 239, 179, 0.9) 100%);
}

.result-pill-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f6f86;
}

.result-pill-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2a37;
}

.section-teach-note {
  margin-bottom: 0.65rem;
  padding: 0.25rem 0;
  border-left: 0;
  background: transparent;
  border-radius: 0;
  color: #44566f;
  font-size: 0.92rem;
  line-height: 1.5;
}

.scope-badge-requested {
  color: #2f4058;
  background: #eef3fb;
  border: 1px solid #c7d4e7;
  font-weight: 600;
}

.scope-badge-returned {
  color: #173b6f;
  background: #dbe9ff;
  border: 1px solid #b9d0fb;
  font-weight: 600;
}

.oauth-result-card .badge.bg-success,
.oauth-result-card .badge.text-bg-success {
  background-color: #198754 !important;
  color: #fff !important;
  border-color: #198754 !important;
}

.oauth-result-card .scope-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(25, 135, 84, 0.45);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  color: #0f5132;
  background: linear-gradient(180deg, rgba(230, 250, 240, 0.95) 0%, rgba(209, 243, 224, 0.9) 100%);
}

.oauth-result-card .scope-pill-missing {
  color: #664d03;
  border-color: rgba(255, 193, 7, 0.65);
  background: linear-gradient(180deg, rgba(255, 248, 225, 0.98) 0%, rgba(255, 241, 181, 0.92) 100%);
}

.oauth-result-card .result-section-panel {
  background: rgb(224, 223, 221, 0.24);
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-radius: 0.6rem;
  padding: 1rem 1rem 0.75rem;
  margin-bottom: 2.3rem !important;
}
