/* Checkout Links Styles */

/* Animations */
@keyframes checkout-link-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes checkout-link-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Full screen overlays - Cover everything with maximum z-index */
.checkout-link-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2147483647 !important; /* Maximum possible z-index */
  box-sizing: border-box;
}

/* Theme editor preview */
.checkout-link-preview {
  background: #f9fafb;
  padding: 40px;
  text-align: center;
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  margin: 20px 0;
}

.checkout-link-preview__title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.checkout-link-preview__description {
  color: #6b7280;
  margin-top: 8px;
  font-size: 14px;
}

/* Passcode screen */
.checkout-link-passcode {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 32px;
  max-width: 400px;
  width: 100%;
}

.checkout-link-passcode__header {
  text-align: center;
  margin-bottom: 32px;
}

.checkout-link-passcode__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: #dbeafe;
  border-radius: 50%;
  margin-bottom: 16px;
}

.checkout-link-passcode__icon svg {
  width: 32px;
  height: 32px;
  color: #2563eb;
}

.checkout-link-passcode__title {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}

.checkout-link-passcode__subtitle {
  color: #6b7280;
}

/* Passcode dots */
.checkout-link-passcode__dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.checkout-link-passcode__dots--shake {
  animation: checkout-link-shake 0.5s;
}

.checkout-link-passcode__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d1d5db;
  transition: all 0.2s;
  display: block !important; /* Override Shopify's empty element hiding */
}

.checkout-link-passcode__dot--filled {
  background: #111827;
  transform: scale(1.1);
}

/* Error message */
.checkout-link-passcode__error {
  text-align: center;
  color: #ef4444;
  margin-bottom: 16px;
  font-size: 14px;
  height: 20px;
}

/* Number pad */
.checkout-link-passcode__pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.checkout-link-passcode__pad--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.checkout-link-button {
  height: 64px;
  font-size: 24px;
  font-weight: 500;
  color: #111827;
  background: #f3f4f6;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.checkout-link-button--secondary {
  font-size: 18px;
  color: #6b7280;
}

.checkout-link-button:hover {
  background: #e5e7eb;
}

/* Loading spinner - Maximum z-index */
.checkout-link-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647 !important; /* Maximum possible z-index */
  box-sizing: border-box;
}

.checkout-link-loader__spinner {
  width: 50px;
}

.checkout-link-loader__spinner svg {
  animation: checkout-link-spin 1s linear infinite;
}