/* UX Reframe - Design System */
/* Hop'n Go V5 — Modern UX Design System Overlay */
/* Works alongside existing styles — no conflicts */

/* ===== DESIGN SYSTEM TOKENS ===== */
:root {
  --ux-primary: #e8631a;
  --ux-primary-light: #fdf0e9;
  --ux-primary-dark: #c94e0f;
  --ux-success: #10b981;
  --ux-warning: #f59e0b;
  --ux-error: #ef4444;
  --ux-info: #3b82f6;
  --ux-bg: #f8fafc;
  --ux-surface: #ffffff;
  --ux-text: #1e293b;
  --ux-text-muted: #64748b;
  --ux-border: #e2e8f0;
  --ux-radius: 12px;
  --ux-radius-sm: 8px;
  --ux-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --ux-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --ux-font: 'Outfit', sans-serif;
  --ux-transition: all 0.2s ease;
}


/* ===== TOAST NOTIFICATION SYSTEM ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-container .toast-ux {
  pointer-events: auto;
}

.toast-ux {
  padding: 16px 20px;
  border-radius: var(--ux-radius-sm);
  background: white;
  box-shadow: var(--ux-shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 480px;
  animation: toastSlideIn 0.3s ease;
  border-left: 4px solid;
  font-family: var(--ux-font);
}

.toast-ux.toast-success {
  border-color: var(--ux-success);
}

.toast-ux.toast-error {
  border-color: var(--ux-error);
}

.toast-ux.toast-warning {
  border-color: var(--ux-warning);
}

.toast-ux.toast-info {
  border-color: var(--ux-info);
}

.toast-ux .toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.toast-ux .toast-content {
  flex: 1;
  min-width: 0;
}

.toast-ux .toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ux-text);
}

.toast-ux .toast-message {
  font-size: 0.85rem;
  color: var(--ux-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.toast-ux .toast-close {
  cursor: pointer;
  opacity: 0.5;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
  background: none;
  border: none;
  padding: 2px;
  color: var(--ux-text);
}

.toast-ux .toast-close:hover {
  opacity: 1;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}


/* ===== INLINE FORM VALIDATION ===== */
.form-group-ux {
  position: relative;
  margin-bottom: 20px;
}

.form-group-ux label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ux-text);
  margin-bottom: 6px;
}

.form-group-ux .field-required::after {
  content: ' *';
  color: var(--ux-error);
}

.form-input-ux {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--ux-border);
  border-radius: var(--ux-radius-sm);
  font-size: 0.95rem;
  transition: var(--ux-transition);
  background: var(--ux-surface);
  font-family: var(--ux-font);
  color: var(--ux-text);
  outline: none;
  box-sizing: border-box;
}

.form-input-ux:focus {
  outline: none;
  border-color: var(--ux-primary);
  box-shadow: 0 0 0 3px var(--ux-primary-light);
}

.form-input-ux.error {
  border-color: var(--ux-error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-input-ux.success {
  border-color: var(--ux-success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.form-input-ux::placeholder {
  color: var(--ux-text-muted);
  opacity: 0.6;
}

textarea.form-input-ux {
  min-height: 100px;
  resize: vertical;
}

select.form-input-ux {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

select.form-input-ux::-ms-expand {
  display: none;
}

.field-error-ux {
  font-size: 0.8rem;
  color: var(--ux-error);
  margin-top: 4px;
  display: none;
  align-items: center;
  gap: 4px;
}

.field-error-ux.visible {
  display: flex;
}

.field-error-ux i {
  flex-shrink: 0;
}

.form-help-ux {
  font-size: 0.78rem;
  color: var(--ux-text-muted);
  margin-top: 4px;
}

.form-checkbox-ux {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.form-checkbox-ux input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--ux-primary);
  flex-shrink: 0;
}

.form-checkbox-ux label {
  font-size: 0.85rem;
  color: var(--ux-text);
  line-height: 1.5;
}

.form-checkbox-ux label a {
  color: var(--ux-primary);
  text-decoration: underline;
}


/* ===== LOADING STATES ===== */
.spinner-ux {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ux-border);
  border-top-color: var(--ux-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  box-sizing: border-box;
}

.spinner-ux.lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.spinner-ux.sm {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

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

.btn-ux.loading {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
}

.btn-ux.loading .btn-text {
  visibility: hidden;
}

.btn-ux.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  top: 50%;
  left: 50%;
  margin: -9px 0 0 -9px;
  box-sizing: border-box;
}

/* Skeleton loading */
.skeleton-ux {
  background: linear-gradient(90deg, var(--ux-bg) 25%, #e2e8f0 50%, var(--ux-bg) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease infinite;
  border-radius: var(--ux-radius-sm);
}

.skeleton-ux.text {
  height: 14px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-ux.title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-ux.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-ux.thumbnail {
  width: 100%;
  height: 200px;
  border-radius: var(--ux-radius);
}

@keyframes skeletonPulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}


/* ===== BUTTONS REFRAME ===== */
.btn-ux {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--ux-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ux-transition);
  font-family: var(--ux-font);
  text-decoration: none;
  position: relative;
  line-height: 1.2;
}

.btn-ux:active {
  transform: translateY(0) !important;
}

.btn-ux-primary {
  background: var(--ux-primary);
  color: white;
}

.btn-ux-primary:hover {
  background: var(--ux-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,99,26,0.3);
}

.btn-ux-secondary {
  background: var(--ux-bg);
  color: var(--ux-text);
  border: 1px solid var(--ux-border);
}

.btn-ux-secondary:hover {
  background: #f1f5f9;
}

.btn-ux-success {
  background: var(--ux-success);
  color: white;
}

.btn-ux-success:hover {
  background: #059669;
}

.btn-ux-danger {
  background: var(--ux-error);
  color: white;
}

.btn-ux-danger:hover {
  background: #dc2626;
}

.btn-ux-ghost {
  background: transparent;
  color: var(--ux-text);
}

.btn-ux-ghost:hover {
  background: var(--ux-bg);
}

.btn-ux-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-ux-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-ux-block {
  width: 100%;
}

.btn-ux-outline {
  background: transparent;
  border: 2px solid var(--ux-primary);
  color: var(--ux-primary);
}

.btn-ux-outline:hover {
  background: var(--ux-primary);
  color: white;
}

.btn-ux i {
  font-size: 1.05em;
}


/* ===== CARD SYSTEM ===== */
.card-ux {
  background: var(--ux-surface);
  border-radius: var(--ux-radius);
  box-shadow: var(--ux-shadow);
  padding: 24px;
  transition: var(--ux-transition);
}

.card-ux:hover {
  box-shadow: var(--ux-shadow-lg);
}

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

.card-ux-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ux-text);
}

.card-ux-body {
  color: var(--ux-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-ux-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ux-border);
}

.card-ux-clickable {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-ux-clickable:hover {
  transform: translateY(-2px);
}

.card-ux-flat {
  box-shadow: none;
  border: 1px solid var(--ux-border);
}

.card-ux-flat:hover {
  box-shadow: var(--ux-shadow);
  border-color: transparent;
}


/* ===== STEP PROGRESS / WIZARD ===== */
.step-progress-ux {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.step-ux {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number-ux {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid var(--ux-border);
  color: var(--ux-text-muted);
  background: white;
  transition: var(--ux-transition);
  flex-shrink: 0;
}

.step-ux.active .step-number-ux {
  border-color: var(--ux-primary);
  background: var(--ux-primary);
  color: white;
}

.step-ux.completed .step-number-ux {
  border-color: var(--ux-success);
  background: var(--ux-success);
  color: white;
}

.step-label-ux {
  font-size: 0.8rem;
  color: var(--ux-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.step-ux.active .step-label-ux {
  color: var(--ux-primary);
}

.step-ux.completed .step-label-ux {
  color: var(--ux-success);
}

.step-connector-ux {
  width: 60px;
  height: 2px;
  background: var(--ux-border);
  margin: 0 8px;
  flex-shrink: 0;
}

.step-connector-ux.completed {
  background: var(--ux-success);
}

.step-panel-ux {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-panel-ux.active {
  display: block;
}

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

.step-counter-ux {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ux-text-muted);
  margin-top: 16px;
}


/* ===== TRUST BADGES ===== */
.trust-bar-ux {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 20px 0;
}

.trust-item-ux {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ux-text-muted);
}

.trust-item-ux i {
  font-size: 1.2rem;
  color: var(--ux-primary);
}

.trust-item-ux strong {
  color: var(--ux-text);
}


/* ===== PAGE SECTION SPACING ===== */
.section-ux {
  padding: 60px 5%;
  max-width: 100%;
  margin: 0 auto;
}

.section-ux-wide {
  padding: 60px 20px;
}

.section-title-ux {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ux-text);
  margin-bottom: 8px;
  line-height: 1.2;
}

.section-subtitle-ux {
  font-size: 1.05rem;
  color: var(--ux-text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.5;
}

.section-ux-centered {
  text-align: center;
}

.section-ux-centered .section-subtitle-ux {
  margin-left: auto;
  margin-right: auto;
}


/* ===== BADGES & TAGS ===== */
.badge-ux {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-ux-primary {
  background: var(--ux-primary-light);
  color: var(--ux-primary);
}

.badge-ux-success {
  background: #d1fae5;
  color: var(--ux-success);
}

.badge-ux-warning {
  background: #fef3c7;
  color: #b45309;
}

.badge-ux-error {
  background: #fee2e2;
  color: var(--ux-error);
}

.badge-ux-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.tag-ux {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--ux-bg);
  border-radius: var(--ux-radius-sm);
  font-size: 0.8rem;
  color: var(--ux-text-muted);
  border: 1px solid var(--ux-border);
}

.tag-ux i {
  color: var(--ux-primary);
}


/* ===== MODAL / OVERLAY ===== */
.modal-overlay-ux {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99990;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay-ux.active {
  display: flex;
}

.modal-ux {
  background: var(--ux-surface);
  border-radius: var(--ux-radius);
  box-shadow: var(--ux-shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

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

.modal-ux-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ux-text);
}

.modal-ux-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ux-text-muted);
  padding: 4px;
  transition: color 0.15s ease;
}

.modal-ux-close:hover {
  color: var(--ux-text);
}

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

.modal-ux-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--ux-border);
}


/* ===== TOOLTIP ===== */
.tooltip-ux {
  position: relative;
  display: inline-flex;
}

.tooltip-ux .tooltip-text-ux {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ux-text);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 100;
  transition: all 0.2s ease;
  pointer-events: none;
}

.tooltip-ux .tooltip-text-ux::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: var(--ux-text) transparent transparent transparent;
}

.tooltip-ux:hover .tooltip-text-ux {
  visibility: visible;
  opacity: 1;
}


/* ===== DIVIDER ===== */
.divider-ux {
  border: none;
  border-top: 1px solid var(--ux-border);
  margin: 24px 0;
}

.divider-ux-label {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ux-text-muted);
  font-size: 0.85rem;
}

.divider-ux-label::before,
.divider-ux-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ux-border);
}


/* ===== EMPTY STATE ===== */
.empty-state-ux {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-ux i {
  font-size: 3rem;
  color: var(--ux-border);
  margin-bottom: 16px;
}

.empty-state-ux h3 {
  font-size: 1.2rem;
  color: var(--ux-text);
  margin-bottom: 8px;
}

.empty-state-ux p {
  font-size: 0.9rem;
  color: var(--ux-text-muted);
  max-width: 360px;
  margin: 0 auto 20px;
}


/* ===== ALERTS ===== */
.alert-ux {
  padding: 14px 18px;
  border-radius: var(--ux-radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-ux i {
  font-size: 1.1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.alert-ux-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid var(--ux-success);
}

.alert-ux-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid var(--ux-error);
}

.alert-ux-warning {
  background: #fef3c7;
  color: #92400e;
  border-left: 4px solid var(--ux-warning);
}

.alert-ux-info {
  background: #dbeafe;
  color: #1e40af;
  border-left: 4px solid var(--ux-info);
}


/* ===== AVATAR ===== */
.avatar-ux {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ux-primary-light);
  color: var(--ux-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.avatar-ux img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-ux-sm {
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
}

.avatar-ux-lg {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
}


/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
  .trust-bar-ux {
    gap: 12px;
  }

  .trust-item-ux {
    font-size: 0.75rem;
  }

  .step-progress-ux {
    flex-wrap: wrap;
    gap: 4px;
  }

  .step-connector-ux {
    width: 30px;
  }

  .toast-ux {
    min-width: auto;
    max-width: calc(100vw - 40px);
  }

  .card-ux {
    padding: 16px;
  }

  .section-ux {
    padding: 40px 16px;
  }

  .section-title-ux {
    font-size: 1.5rem;
  }

  .section-subtitle-ux {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }

  .btn-ux-lg {
    padding: 14px 24px;
    font-size: 1rem;
  }

  .modal-ux {
    margin: 10px;
  }

  .empty-state-ux {
    padding: 40px 16px;
  }

  .step-label-ux {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .trust-bar-ux {
    gap: 8px;
  }

  .trust-item-ux {
    font-size: 0.7rem;
    gap: 4px;
  }

  .trust-item-ux i {
    font-size: 1rem;
  }

  .toast-ux {
    min-width: auto;
    max-width: calc(100vw - 24px);
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .step-connector-ux {
    width: 16px;
    margin: 0 4px;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-ux-primary { color: var(--ux-primary); }
.text-ux-success { color: var(--ux-success); }
.text-ux-error { color: var(--ux-error); }
.text-ux-warning { color: var(--ux-warning); }
.text-ux-muted { color: var(--ux-text-muted); }

.bg-ux-primary { background: var(--ux-primary-light); }
.bg-ux-surface { background: var(--ux-surface); }

.gap-ux-xs { gap: 4px; }
.gap-ux-sm { gap: 8px; }
.gap-ux-md { gap: 16px; }
.gap-ux-lg { gap: 24px; }

.flex-ux { display: flex; }
.flex-ux-center { display: flex; align-items: center; justify-content: center; }
.flex-ux-between { display: flex; align-items: center; justify-content: space-between; }
.flex-ux-col { display: flex; flex-direction: column; }

.mt-ux-sm { margin-top: 8px; }
.mt-ux-md { margin-top: 16px; }
.mt-ux-lg { margin-top: 24px; }
.mb-ux-sm { margin-bottom: 8px; }
.mb-ux-md { margin-bottom: 16px; }
.mb-ux-lg { margin-bottom: 24px; }

.truncate-ux {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only-ux {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden-ux { display: none !important; }
/* UX Reframe - End */
