[x-cloak] { display: none !important; }
/* ShuttleBox — custom styles beyond Tailwind */

/* ── Dark mode color-scheme for native controls ──── */
.dark input, .dark select, .dark textarea {
  color-scheme: dark;
}

.focus-ring:focus-visible {
  outline: 2px solid rgb(124, 58, 237);
  outline-offset: 2px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease-in-out; }

.otp-box {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  color: #0f172a;
  caret-color: #7c3aed;
  transition: border-color 0.15s;
}
.otp-box:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
.dark .otp-box {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}
.dark .otp-box:focus {
  border-color: #7c3aed;
}

/* Prevent text selection on double-click in file rows */
.sb-file-row {
  -webkit-user-select: none;
  user-select: none;
}

/* ── Login splash animation ────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.sb-splash-icon {
  animation: scaleIn 0.5s ease-out, float 3s ease-in-out 0.5s infinite, pulse-ring 2s ease-out 0.8s infinite;
}
.sb-splash-title {
  animation: fadeInUp 0.5s ease-out 0.15s both;
}
.sb-splash-subtitle {
  animation: fadeInUp 0.5s ease-out 0.25s both;
}
.sb-splash-form {
  animation: fadeInUp 0.6s ease-out 0.35s both;
}
.sb-splash-footer {
  animation: fadeIn 0.5s ease-out 0.6s both;
}

/* ── Skeleton loading ──────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.sb-skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}
.dark .sb-skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 37%, #1e293b 63%);
  background-size: 800px 100%;
}

/* ── Connection card animations ────────────────────── */
.sb-card-enter {
  animation: fadeInUp 0.35s ease-out both;
}

/* ── Button press effect ───────────────────────────── */
.sb-press:active {
  transform: scale(0.97);
}

/* ── Toast slide-in ────────────────────────────────── */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(16px) scale(0.95); }
}
.sb-toast-in { animation: toastIn 0.3s ease-out both; }
.sb-toast-out { animation: toastOut 0.25s ease-in both; }

/* ── Mobile improvements ───────────────────────────── */

/* Safe area insets for notch phones (PWA standalone) */
@supports (padding: env(safe-area-inset-top)) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .sb-manager { height: calc(100vh - 3.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}

/* Bigger touch targets on mobile for file rows */
@media (max-width: 640px) {
  .sb-file-row { padding: 0.625rem 0.75rem; font-size: 0.875rem; gap: 0.625rem; }
  .sb-file-row i { font-size: 1rem; }
}

/* Breadcrumb scroll fade hint */
.sb-breadcrumb-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sb-breadcrumb-scroll::-webkit-scrollbar { display: none; }

/* Modal scrollable body on short screens */
.sb-modal-body {
  max-height: calc(100vh - 12rem);
  max-height: calc(100dvh - 12rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Thin scrollbar for file lists */
.thin-scroll { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent; }
.thin-scroll::-webkit-scrollbar { width: 4px; }
.thin-scroll::-webkit-scrollbar-track { background: transparent; }
.thin-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 2px; }
.dark .thin-scroll::-webkit-scrollbar-thumb { background: rgba(71,85,105,0.4); }

/* Prevent iOS zoom on input focus (16px minimum) */
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px !important; }
}

/* Touch-friendly toolbar buttons on mobile */
@media (max-width: 640px) {
  .sb-pane .px-3.py-1\.5 button { min-width: 2.25rem; min-height: 2.25rem; }
}

/* Context menu mobile: full-width bottom sheet style */
@media (max-width: 640px) {
  .sb-ctx-menu {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    border-radius: 1rem 1rem 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.2);
  }
  .sb-ctx-menu button { padding: 0.75rem 1rem; font-size: 0.9375rem; }
}
