/* Scoot Loyalty Public Styles */

.scoot-loyalty-wrapper {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    sans-serif;
}

/* Page-level trigger button */
.scoot-loyalty-trigger {
  background: #ffc50a;
  border-radius: 0;
  border: none;
  color: black;
  border-bottom: 5px solid #ef843d;
  padding: 8px 16px 8px 12px;
  cursor: pointer;

  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s;
}

.scoot-loyalty-trigger:hover {
  background: #ffb800;
}

/* Modal */
.scoot-loyalty-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.scoot-loyalty-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.scoot-loyalty-modal-panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #2d1d5b;
  border: 2px solid #7f3f98;
  padding: 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: scootModalIn 0.25s ease-out;
}

@keyframes scootModalIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form */
.scoot-loyalty-form-container {
  width: 100%;
  text-align: center;
}

.scoot-loyalty-title {
  display: block;
  color: #ffc50a;
  font-size: 32px;
  line-height: 1.6;
  margin: 0 0 48px;
}

.scoot-loyalty-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scoot-loyalty-input-group input {
  width: 100%;
  height: 48px;
  margin-bottom: 24px;
  padding: 0 16px;
  font-size: 16px;
  color: #d455a0;
  background: #2c172c;
  border: 3px solid #f0047f;
  border-radius: 0;
  text-align: center;
  outline: none;
  box-sizing: border-box;
}

.scoot-loyalty-input-group input::placeholder {
  color: #d455a0;
  opacity: 0.7;
}

.scoot-loyalty-input-group button {
  background: #ffc50a;
  border-radius: 0;
  border: none;
  color: black;
  border-bottom: 5px solid #ef843d;
  padding: 10px 28px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.2s;
}

.scoot-loyalty-input-group button:hover {
  background: #ffb800;
}

.scoot-loyalty-input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.scoot-loyalty-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: scoot-spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes scoot-spin {
  to {
    transform: rotate(360deg);
  }
}

.scoot-loyalty-error {
  color: #ff8b8b;
  font-size: 14px;
  margin-top: 16px;
  text-align: center;
}

.scoot-loyalty-fb-link,
.scoot-loyalty-fb-link:hover,
.scoot-loyalty-fb-link:focus {
  color: inherit;
  text-decoration: none;
}

/* Card */
.scoot-loyalty-card-container {
  perspective: 1000px;
  margin-top: 24px;
  margin-bottom: 20px;
}

.scoot-loyalty-card {
  border-radius: 16px;
  padding: 32px;
  color: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.scoot-loyalty-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Tier gradients */
.scoot-loyalty-card.tier-gold {
  background: linear-gradient(135deg, #d4a843 0%, #b8860b 50%, #daa520 100%);
}

.scoot-loyalty-card.tier-silver {
  background: linear-gradient(135deg, #a8a9ad 0%, #808080 50%, #c0c0c0 100%);
}

.scoot-loyalty-card.tier-bronze {
  background: linear-gradient(135deg, #cd7f32 0%, #a0522d 50%, #d2691e 100%);
}

.scoot-loyalty-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.scoot-loyalty-card-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.scoot-loyalty-card-tier {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.scoot-loyalty-card-points {
  margin-bottom: 24px;
}

.scoot-loyalty-card-points-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.scoot-loyalty-card-points-value {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.scoot-loyalty-card-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.scoot-loyalty-card-field label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 2px;
}

.scoot-loyalty-card-field span {
  font-size: 14px;
  font-weight: 600;
}

/* Wallet Buttons */
.scoot-loyalty-wallet-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.scoot-loyalty-wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 8px;
  height: 48px;
  padding: 0 24px;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
  max-width: 280px;
  width: 100%;
}

.scoot-loyalty-wallet-btn:hover {
  opacity: 0.85;
}

.scoot-loyalty-wallet-btn-apple {
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
}

.scoot-loyalty-wallet-btn-apple svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.scoot-loyalty-wallet-btn-google {
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #dadce0;
  gap: 8px;
}

.scoot-loyalty-wallet-btn-google svg {
  width: 24px;
  height: 24px;
}

/* Consent step */
.scoot-loyalty-consent {
  margin-top: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.scoot-loyalty-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.4;
}

.scoot-loyalty-consent-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.scoot-loyalty-consent-row a {
  color: #ffc50a;
  text-decoration: underline;
}

.scoot-loyalty-required {
  color: #ffc50a;
  margin-left: 2px;
}

.scoot-loyalty-consent-submit {
  width: 100%;
  margin-top: 8px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  background: #ffc50a;
  color: black;
  border: none;
  border-bottom: 5px solid #ef843d;
  font-weight: 700;
}

.scoot-loyalty-consent-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Animation */
.scoot-loyalty-card-container.scoot-fade-in {
  animation: scootFadeIn 0.4s ease-out;
}

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

/* Responsive */
@media (max-width: 520px) {
  .scoot-loyalty-modal-panel {
    padding: 32px 20px 24px;
  }

  .scoot-loyalty-title {
    font-size: 26px;
  }

  .scoot-loyalty-card {
    padding: 24px;
  }

  .scoot-loyalty-card-points-value {
    font-size: 32px;
  }

  .scoot-loyalty-card-details {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
