/* Onboarding Flow — "Do you have a cabinet?" popup */

@keyframes ob-flow-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ob-flow-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 16px;
}

.ob-flow-popup {
  position: relative;
  background: #fff;
  max-width: 568px;
  width: 100%;
  padding: 32px 28px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  animation: ob-flow-slide-up 0.25s ease-out both;
}

.ob-flow-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 0 0 6px;
}

.ob-flow-subtitle {
  font-size: 15px;
  color: #64748b;
  text-align: center;
  margin: 0 0 24px;
}

/* Cards list */

.ob-flow-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ob-flow-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  text-align: left;
  width: 100%;
}

.ob-flow-card:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.12);
  background: #fafafe;
}

.ob-flow-card--primary {
  border-color: #6366f1;
  background: #f8f7ff;
}

/* Euro Cabinet card — most prominent */

.ob-flow-card--euro {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%) border-box;
  position: relative;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.18);
}

.ob-flow-card--euro:hover {
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.30);
  background: linear-gradient(#fafaff, #fafaff) padding-box,
              linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%) border-box;
}

/* Card icon */

.ob-flow-card-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.ob-flow-card-icon--yes {
  background: #ecfdf5;
  color: #10b981;
}

.ob-flow-card-icon--no {
  background: #eff6ff;
  color: #3b82f6;
}

.ob-flow-card-icon--euro {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  font-size: 18px;
}

.ob-flow-card-icon--self {
  background: #f0fdf4;
  color: #16a34a;
}

.ob-flow-card-icon--adsly {
  background: #fef3c7;
  color: #f59e0b;
}

/* Card text */

.ob-flow-card-text {
  flex: 1;
}

.ob-flow-card-label {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 2px;
}

.ob-flow-card-hint {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

/* Badge */

.ob-flow-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.ob-flow-card-badge--free {
  background: #ecfdf5;
  color: #059669;
}

.ob-flow-card-badge--instant {
  background: #fef3c7;
  color: #d97706;
}

.ob-flow-card-badge--recommended {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Arrow */

.ob-flow-card-arrow {
  color: #cbd5e1;
  font-size: 18px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Back button */

.ob-flow-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #6366f1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 16px;
}

.ob-flow-back:hover {
  text-decoration: underline;
}

/* Return / CTA button */

.ob-flow-return-btn {
  display: none;
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.ob-flow-return-btn:hover {
  background: #4f46e5;
}

.ob-flow-return-btn.visible {
  display: block;
}

/* Connect method icons */

.ob-flow-card-icon--extension {
  background: #eef2ff;
  color: #6366f1;
  font-size: 18px;
}

.ob-flow-card-icon--phone {
  background: #e0f2fe;
  color: #0ea5e9;
  font-size: 18px;
}

/* Embedded form styles */

.ob-flow-form-group {
  margin-bottom: 16px;
}

.ob-flow-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.ob-flow-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  box-sizing: border-box;
}

.ob-flow-form-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ob-flow-form-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
}

.ob-flow-form-help {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Pricing display */

.ob-flow-pricing {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
}

.ob-flow-pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}

.ob-flow-pricing-label {
  color: #64748b;
}

.ob-flow-pricing-value {
  font-weight: 600;
  color: #1e293b;
}

.ob-flow-pricing-total {
  border-top: 2px solid #cbd5e1;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 700;
}

.ob-flow-pricing-highlight {
  color: #6366f1;
}

/* Primary action button */

.ob-flow-btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.ob-flow-btn-primary:hover {
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.ob-flow-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Error message */

.ob-flow-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

/* Phone Auth Screen */

.ob-flow-phone-input {
  font-size: 16px; /* prevents zoom on iOS */
  letter-spacing: 0.5px;
}

/* Waiting state */
.ob-flow-waiting {
  text-align: center;
  padding: 20px 0;
}

.ob-flow-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: ob-flow-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.ob-flow-waiting-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px;
}

.ob-flow-waiting-text {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 16px;
}

.ob-flow-status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 12px;
}

.ob-flow-notice {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  line-height: 1.5;
}

/* Extension Screen */

.ob-flow-extension-state {
  text-align: center;
  padding: 16px 0;
}

.ob-flow-extension-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ob-flow-extension-icon--missing {
  background: #fef3c7;
  color: #f59e0b;
}

.ob-flow-extension-icon--success {
  background: #ecfdf5;
  color: #10b981;
}

/* Cabinet List */

.ob-flow-cabinet-list {
  max-height: 240px;
  overflow-y: auto;
  margin: 12px 0;
}

.ob-flow-cabinet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 8px;
}

.ob-flow-cabinet-item:hover {
  border-color: #6366f1;
  background: #fafafe;
}

.ob-flow-cabinet-item:last-child {
  margin-bottom: 0;
}

.ob-flow-cabinet-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #6366f1;
  flex-shrink: 0;
}

.ob-flow-cabinet-info {
  flex: 1;
  min-width: 0;
}

.ob-flow-cabinet-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ob-flow-cabinet-meta {
  font-size: 12px;
  color: #94a3b8;
}

/* Payment / QR Screen */

.ob-flow-qr-container {
  text-align: center;
  padding: 16px 0;
}

.ob-flow-qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  padding: 8px;
  background: #fff;
}

.ob-flow-qr-code img {
  width: 100%;
  height: 100%;
  display: block;
}

.ob-flow-wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f1f5f9;
  border-radius: 8px;
  margin-bottom: 12px;
}

.ob-flow-wallet-address {
  flex: 1;
  font-family: monospace;
  font-size: 12px;
  color: #475569;
  word-break: break-all;
}

.ob-flow-wallet-copy {
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #6366f1;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.ob-flow-wallet-copy:hover {
  background: #f8f7ff;
}

.ob-flow-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 12px;
}

.ob-flow-timer--expired {
  color: #ef4444;
}

.ob-flow-payment-steps {
  text-align: left;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin: 12px 0;
}

.ob-flow-payment-steps-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 8px;
}

.ob-flow-payment-steps ol {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
}

.ob-flow-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* Button variants */

.ob-flow-btn-secondary {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.ob-flow-btn-secondary:hover {
  background: #e2e8f0;
}

.ob-flow-btn-ghost {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: transparent;
  color: #6366f1;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.ob-flow-skip-link {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}
.ob-flow-skip-link:hover {
  color: #64748b;
  text-decoration: underline;
}

/* Success state */

.ob-flow-success {
  text-align: center;
  padding: 16px 0;
}

.ob-flow-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Mobile */

@media (max-width: 480px) {
  .ob-flow-popup {
    padding: 24px 16px;
  }

  .ob-flow-title {
    font-size: 20px;
  }
}

/* Close button (add-account mode) */

.ob-flow-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 20px;
  line-height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.ob-flow-close:hover {
  color: #1e293b;
  background: #f1f5f9;
}

/* Expandable details (manual token instructions) */

.ob-flow-details {
  margin: 12px 0;
  font-size: 13px;
  color: #64748b;
}

.ob-flow-details summary {
  cursor: pointer;
  font-weight: 500;
  color: #475569;
}

.ob-flow-steps-list {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}
