/**
 * PeThoria Match — mobile-first, social / Tinder-style UI
 */

:root {
  --pethoria-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #6366f1 100%);
  --pethoria-nav-h: 4.25rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.pethoria-app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--pethoria-nav-h) + var(--safe-bottom) + 0.5rem);
  overflow-x: hidden;
}

/* Bottom tab bar (Instagram / Tinder style) */
.pethoria-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .pethoria-bottom-nav {
  background: rgba(26, 22, 37, 0.96);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.pethoria-bottom-nav-inner {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--pethoria-nav-h);
  padding: 0 0.5rem;
}

.pethoria-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 3.5rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.pethoria-nav-item i {
  font-size: 1.25rem;
}

.pethoria-nav-item.active,
.pethoria-nav-item:hover {
  color: #db2777;
}

.pethoria-nav-item.active i {
  transform: scale(1.08);
}

/* App shell — centered mobile column */
.pethoria-app-shell {
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

/* Tinder-style swipe action buttons */
.tinder-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
}

.tinder-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.tinder-btn:active {
  transform: scale(0.92);
}

.tinder-btn-pass {
  background: #fff;
  color: #ef4444;
  border: 2px solid #fecaca;
}

.tinder-btn-super {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff;
  width: 3rem;
  height: 3rem;
  font-size: 1.1rem;
}

.tinder-btn-like {
  background: linear-gradient(135deg, #f472b6, #ec4899);
  color: #fff;
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
}

/* Social story rings */
.story-ring {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 9999px;
  padding: 3px;
  background: var(--pethoria-gradient);
  flex-shrink: 0;
}

.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #fff;
}

/* Cards */
.social-card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-card:active {
  transform: scale(0.98);
}

[data-theme="dark"] .social-card {
  background: var(--bg-secondary, #2d1b3d);
}

/* Touch-friendly inputs */
.pethoria-input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  font-size: 16px !important; /* prevents iOS zoom on focus */
}

/* Match inbox layout */
.inbox-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--pethoria-nav-h));
  max-width: 28rem;
  margin: 0 auto;
}

.inbox-tabs {
  position: sticky;
  top: 3.5rem;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

/* Chat bubbles (Messenger style) */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #f0f2f5;
  -webkit-overflow-scrolling: touch;
}

.message-bubble.sent {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.message-bubble.received {
  background: #fff;
  color: #111;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Hide duplicate/orphan chat fragments */
.pethoria-orphan-chat {
  display: none !important;
}

/* Auth pages mobile */
.pethoria-auth-wrap {
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .pethoria-auth-wrap {
    max-width: 28rem;
    padding: 2rem;
  }
}

/* Utility */
.pb-nav {
  padding-bottom: calc(var(--pethoria-nav-h) + var(--safe-bottom) + 1rem) !important;
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
