/* Preview Page Styles - Quidkey Design System */

:root {
  --brand-primary: var(--primary, #5b21b6);
  --brand-primary-hover: var(--primary-hover, #4c1d95);
  --brand-background: var(--background, #fafafa);
  --brand-text: var(--text-primary, #1e1b4b);
}

body {
  background: var(--background);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Top Navbar - Glass effect */
.preview-navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  overflow: hidden;
}

.navbar-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.navbar-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-logo {
  height: 32px;
  max-width: 150px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s;
}

.navbar-logo:hover {
  opacity: 0.8;
}

.navbar-brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.navbar-brand-name:hover {
  opacity: 0.8;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.language-select {
  font-family: var(--font-sans);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 150px;
}

.language-select .iso2-only {
  display: none;
}

.language-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.navbar-try-another-button {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.navbar-try-another-button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.navbar-share-button {
  font-family: var(--font-display);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.navbar-share-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Loading State */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: var(--space-md);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  z-index: 9999;
}

.loading[hidden] {
  display: none;
}

.spinner-large {
  border: 4px solid var(--muted);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}

.loading p {
  font-family: var(--font-sans);
  color: var(--muted-foreground);
  font-size: 1rem;
}

/* Two Column Container - Desktop Layout */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  padding-top: calc(var(--space-lg) + 60px);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.left-panel {
  min-width: 0;
}

.order-summary-panel {
  min-width: 0;
}

/* Left Panel: Customer Form */
.customer-form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  height: fit-content;
}

/* Right Panel: Order Summary */
.order-summary-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  height: fit-content;
  box-shadow: var(--shadow-soft);
}

.order-summary-panel h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

/* Product List */
.product-list {
  margin-bottom: 10px;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.product-item {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}

.product-image {
  width: 64px;
  height: 64px;
  background: var(--secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
}

.product-quantity {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted-foreground);
}

.product-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* Order Totals */
.order-totals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted-foreground);
}

.total-row.total {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 12px;
  border-top: 2px solid var(--border);
  margin-top: 4px;
}

/* Details Form */
.details-form h2 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.details-form label {
  display: block;
  margin-bottom: 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.details-form input {
  font-family: var(--font-sans);
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  margin-top: 6px;
  transition: all 0.2s;
  background: var(--surface);
}

.details-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.details-form input:disabled,
.details-form select:disabled {
  background-color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.details-form small {
  display: block;
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 12px;
}

.continue-button {
  font-family: var(--font-display);
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  box-shadow: var(--shadow-md);
}

.continue-button:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.continue-button:active:not(:disabled) {
  transform: scale(0.98);
}

.continue-button:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Keyboard Shortcuts Bar - Fixed bottom left */
.keyboard-shortcuts-bar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  box-shadow: var(--shadow-lg);
}

.keyboard-shortcuts-bar.hidden {
  display: none;
}

.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: all 0.15s;
}

.shortcut-hint:hover {
  background: var(--muted);
}

.shortcut-hint:active {
  transform: scale(0.97);
}

.shortcut-hint kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  min-width: 24px;
  text-align: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.shortcut-hint span {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.shortcut-hint.active kbd {
  background: var(--success);
}

/* Payment Section (inside order summary) */
.payment-section {
  display: none; /* Hidden until form is submitted */
  margin-top: 32px;
  padding-top: 0;
  border-top: none;
}

.payment-section-title {
  font-family: var(--font-display);
  font-size: 1.1em;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  text-align: center;
}

/* Form Selects */
.form-select {
  font-family: var(--font-sans);
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  margin-top: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}


/* Pay Button */
.pay-button {
  font-family: var(--font-display);
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
  box-shadow: var(--shadow-md);
}

.pay-button:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.pay-button:active:not(:disabled) {
  transform: scale(0.98);
}

.pay-button:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Payment Loading State */
.payment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.payment-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.payment-loading p {
  font-family: var(--font-sans);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Quidkey Iframe Container */
:root {
  --quidkey-dynamic-height: 108px;
}

/* Stripe Payment Element - minimalist styling to match Quidkey */
.stripe-element-container {
  width: 100%;
  background: white;
  border-radius: 0;
  border: none;
  padding: 0;
  margin-top: -2px; /* Seamless connection with Quidkey element above */
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(0, 0, 0, 0.02);
}

.stripe-element-container #payment-element {
  padding: 0;
}

.stripe-message {
  color: rgb(105, 115, 134);
  font-size: 14px;
  line-height: 20px;
  padding-top: 12px;
  text-align: center;
}

.stripe-message.hidden {
  display: none;
}

.quidkey-element-container {
  position: relative;
  overflow: hidden;
  margin-bottom: -2px; /* Seamless connection with Stripe element below */
  width: 100%;
  height: var(--quidkey-dynamic-height);
  min-height: var(--quidkey-dynamic-height);
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(0, 0, 0, 0.02);
  transition: height 0.35s ease-in-out;
  border-radius: 0;
  background: white;
}

.quidkey-element-container iframe {
  border: none;
  height: 100%;
  width: 100%;
  border-radius: 0;
}

/* Trust Section with Bank Logos */
.trust-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.encrypted-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.encrypted-badge svg {
  flex-shrink: 0;
}

.encrypted-badge span {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.bank-logos {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 0.8;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.bank-logo:hover {
  opacity: 1;
}

/* Payment Message */
.payment-message {
  font-family: var(--font-sans);
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  min-height: 1.25rem;
}

/* Demo Guide Button */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow:
      0 4px 12px rgba(15, 23, 42, 0.3),
      0 0 20px rgba(15, 23, 42, 0.2);
  }
  50% {
    box-shadow:
      0 4px 16px rgba(15, 23, 42, 0.4),
      0 0 30px rgba(15, 23, 42, 0.3);
  }
}

/* Demo guide button removed - using keyboard shortcuts bar instead */

/* Demo Guide Modal */
.demo-guide-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.demo-guide-modal[hidden] {
  display: none;
}

.demo-guide-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.demo-guide-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-guide-header h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-guide-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  line-height: 1;
}

.close-guide-btn:hover {
  background: var(--muted);
  color: var(--text-primary);
}

.demo-guide-body {
  padding: 24px;
}

.demo-guide-intro {
  font-family: var(--font-sans);
  margin: 0 0 20px 0;
  color: var(--muted-foreground);
  font-size: 15px;
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shortcut-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}

.shortcut-item:hover {
  background: var(--secondary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.shortcut-item:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.shortcut-keys {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-keys kbd {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: 0 2px 0 var(--border);
}

.shortcut-keys span {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted-foreground);
  font-style: italic;
}

.shortcut-description {
  flex: 1;
}

.shortcut-description strong {
  font-family: var(--font-display);
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.shortcut-description p {
  font-family: var(--font-sans);
  margin: 0;
  font-size: 13px;
  color: var(--muted-foreground);
}

.shortcut-tap-hint {
  display: none;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--primary);
  margin-top: 4px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .shortcut-tap-hint {
    display: block;
  }
}

.demo-guide-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.demo-guide-note {
  font-family: var(--font-sans);
  margin: 0;
  font-size: 13px;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Update Amount Modal */
.update-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.update-modal[hidden] {
  display: none;
}

.update-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.update-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.update-modal-header h3 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-update-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  line-height: 1;
}

.close-update-btn:hover {
  background: var(--muted);
  color: var(--text-primary);
}

.update-modal-body {
  padding: 24px;
}

.update-modal-body label {
  display: block;
  margin-bottom: 16px;
}

.update-modal-body label span {
  font-family: var(--font-sans);
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.amount-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  background: var(--surface);
  transition: all 0.2s;
}

.amount-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.amount-input-group input {
  font-family: var(--font-sans);
  flex: 1;
  border: none;
  padding: 12px 0;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.amount-currency {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted-foreground);
  font-size: 14px;
}

.rewards-input {
  font-family: var(--font-sans);
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 16px;
  transition: all 0.2s;
}

.rewards-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.submit-update-btn {
  font-family: var(--font-display);
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}

.submit-update-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.submit-update-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.submit-update-btn:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.update-status {
  font-family: var(--font-sans);
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: none;
}

.update-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.update-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .checkout-container {
    grid-template-columns: 1fr;
    padding: var(--space-md);
  }

  .order-summary-panel {
    position: static;
    order: 1; /* Show order summary after form on mobile */
    margin-top: var(--space-md);
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .payment-section {
    margin-top: 24px;
    padding-top: 0;
  }

  .order-summary-panel h2 {
    font-size: 16px;
    margin-bottom: var(--space-sm);
  }

  .product-item {
    margin-bottom: 12px;
  }

  .product-image {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-price {
    font-size: 14px;
  }

  .order-totals {
    gap: 8px;
  }

  .total-row {
    font-size: 13px;
  }

  .total-row.total {
    font-size: 16px;
    padding-top: 8px;
    margin-top: 2px;
  }

  .customer-form-panel {
    padding: 16px;
    border-radius: 8px;
  }

  .navbar-logo {
    height: 28px;
    max-width: 120px;
  }

  .navbar-brand-name {
    font-size: 1rem;
  }

  .details-form h2 {
    font-size: 16px;
    margin-bottom: 16px;
  }


  .preview-controls {
    grid-template-columns: 1fr;
    padding: var(--space-sm) var(--space-md);
  }

  .control-select {
    font-size: 14px;
  }

  .navbar-content {
    padding: var(--space-sm) var(--space-md);
    gap: 0.5rem;
  }

  .navbar-right {
    gap: 0.375rem;
    flex-wrap: wrap;
  }

  .language-select {
    font-size: 13px;
    min-width: unset;
    width: 56px;
    padding: 0.5rem 0.375rem;
    text-align: center;
  }

  /* Hide full language names on mobile, show only ISO2 codes */
  .language-select option {
    font-size: 14px;
  }

  .navbar-try-another-button {
    padding: 0.5rem 0.625rem;
    font-size: 12px;
    white-space: nowrap;
    gap: 4px;
  }

  .navbar-share-button {
    padding: 0.5rem 0.625rem;
    font-size: 12px;
    white-space: nowrap;
    gap: 4px;
  }

  .details-form input,
  .details-form select,
  .form-select {
    font-size: 16px; /* Prevents iOS zoom */
  }

  .continue-button {
    padding: 14px;
    font-size: 15px;
  }

  .pay-button {
    padding: 14px;
    font-size: 15px;
  }

  .trust-section {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
  }

  .encrypted-badge span {
    font-size: 12px;
  }

  .bank-logos {
    gap: 8px;
  }

  .bank-logo {
    width: 24px;
    height: 24px;
  }

}

@media (max-width: 768px) {
  .navbar-content {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
  }

  .navbar-left {
    flex: 1 1 auto;
    min-width: 0;
  }

  .navbar-right {
    flex: 0 0 auto;
    gap: 0.25rem;
  }

  .navbar-logo {
    height: 24px;
    max-width: 100px;
  }

  .navbar-brand-name {
    font-size: 0.875rem;
  }

  .checkout-container {
    padding: var(--space-sm);
    padding-top: calc(var(--space-sm) + 56px); /* Account for smaller fixed navbar on mobile */
  }

  .customer-form-panel,
  .order-summary-panel {
    padding: 16px;
  }

  .demo-guide-content {
    max-width: calc(100vw - 32px);
  }

  .update-modal-content {
    max-width: calc(100vw - 32px);
  }

  /* Keyboard shortcuts bar - mobile */
  .keyboard-shortcuts-bar {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    gap: 4px;
  }

  .shortcut-hint {
    padding: 2px 4px;
    gap: 4px;
  }

  .shortcut-hint kbd {
    font-size: 10px;
    padding: 3px 6px;
    min-width: 20px;
  }

  .shortcut-hint span {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .navbar-try-another-button {
    font-size: 0;
    padding: 0.5rem;
    min-width: 36px;
  }

  .navbar-try-another-button::before {
    content: "←";
    font-size: 16px;
  }

  .navbar-share-button {
    font-size: 0;
    padding: 0.5rem;
    min-width: 36px;
  }

  .navbar-share-button::before {
    content: "🔗";
    font-size: 14px;
  }

  .language-select {
    width: 50px;
    padding: 0.5rem 0.25rem;
    font-size: 12px;
  }

  .navbar-left {
    gap: 0.5rem;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  .details-form label {
    font-size: 13px;
  }

  .continue-button,
  .pay-button {
    padding: 12px;
    font-size: 14px;
  }

  /* Keyboard shortcuts bar - very small screens */
  .keyboard-shortcuts-bar {
    left: 8px;
    bottom: 8px;
    padding: 4px 6px;
  }

  .shortcut-hint span {
    display: none; /* Hide labels on very small screens, show only keys */
  }

  .shortcut-hint {
    padding: 2px;
  }
}
