/* ========================================
   Mobile Swipe – DwellX brand card stack
   ======================================== */

.mobile-swipe-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--primary-black, #000);
  padding: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  font-family: var(--font-secondary, "Kiona", sans-serif);
}

/* Header – DwellX brand */
.mobile-swipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 16px;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.mobile-swipe-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cream-white, #faf9f7);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.mobile-swipe-back:hover {
  color: var(--accent-peach, #EFB68F);
}

.mobile-swipe-back svg {
  flex-shrink: 0;
}

.mobile-swipe-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-swipe-desktop-link {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-swipe-desktop-link:hover {
  color: var(--accent-orange, #FF9D00);
  background: rgba(255, 157, 0, 0.15);
}

/* Card stack area */
.mobile-swipe-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  padding: 0 16px;
}

.swipe-card-stack {
  position: relative;
  width: 100%;
  min-height: 520px;
  flex: 1;
}

/* Card – brand-aligned */
.swipe-card {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background: #1a1a1a;
  border-radius: 24px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-card.swiping {
  transition: none;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.swipe-card.removing {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  pointer-events: none;
}

.swipe-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.swipe-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #252525;
  overflow: hidden;
}

.swipe-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.swipe-card-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.swipe-card-no-image svg {
  opacity: 0.5;
}

.swipe-card-price-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--primary-red, #E31C20);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 8px 14px;
  border-radius: 12px;
  line-height: 1.2;
  font-family: var(--font-primary, "Montserrat", sans-serif);
}

.swipe-card-price-badge span {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin-left: 2px;
}

.swipe-card-body {
  padding: 20px;
}

.swipe-card-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-transform: capitalize;
  font-family: var(--font-primary, "Montserrat", sans-serif);
}

.swipe-card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

.swipe-card-location svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.swipe-card-available {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* Swipe overlays: left swipe → Nope (top right), right swipe → Like (top left) */
.swipe-overlay {
  position: absolute;
  top: 24px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.2s ease;
  pointer-events: none;
  border: 4px solid currentColor;
  z-index: 5;
  font-family: var(--font-primary, "Montserrat", sans-serif);
}

.swipe-overlay--nope {
  right: 20px;
  left: auto;
  color: #fff;
  border-color: var(--primary-red);
  background: rgba(227, 28, 32, 0.25);
  box-shadow: 0 4px 20px rgba(227, 28, 32, 0.35);
  transform: rotate(12deg);
}

.swipe-overlay--like {
  left: 20px;
  right: auto;
  color: var(--primary-black);
  border-color: var(--accent-orange);
  background: rgba(255, 157, 0, 0.25);
  box-shadow: 0 4px 20px rgba(255, 157, 0, 0.3);
  transform: rotate(-12deg);
}

.swipe-overlay-label {
  display: block;
}

/* Swipe hint */
.swipe-hint {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Action buttons – DwellX brand */
.swipe-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 0 0 32px;
}

.swipe-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  background: #252525;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.swipe-btn:hover:not(:disabled) {
  transform: scale(1.08);
}

.swipe-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.swipe-btn--nope {
  color: var(--primary-red, #E31C20);
}

.swipe-btn--nope:hover:not(:disabled) {
  background: rgba(227, 28, 32, 0.2);
  box-shadow: 0 4px 24px rgba(227, 28, 32, 0.35);
}

.swipe-btn--like {
  width: 72px;
  height: 72px;
  color: var(--accent-orange, #FF9D00);
}

.swipe-btn--like:hover:not(:disabled) {
  background: rgba(255, 157, 0, 0.2);
  box-shadow: 0 4px 24px rgba(255, 157, 0, 0.35);
}

.swipe-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Empty state – only visible when all cards are seen; hidden otherwise so it never shows behind cards */
.swipe-empty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  z-index: 0;
}

.swipe-empty[hidden] {
  display: none !important;
}

.swipe-empty-icon {
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 20px;
}

.swipe-empty-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  font-family: var(--font-primary, "Montserrat", sans-serif);
}

.swipe-empty-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 280px;
}

.swipe-empty-cta {
  display: inline-block;
  padding: 14px 28px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.15s ease;
  font-family: var(--font-primary, "Montserrat", sans-serif);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.swipe-empty-cta--primary {
  background: var(--primary-red, #E31C20);
  box-shadow: 0 4px 16px rgba(227, 28, 32, 0.4);
}

.swipe-empty-cta--primary:hover {
  background: var(--hover-red, #c7181b);
  transform: translateY(-1px);
}

.swipe-empty-cta--secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.swipe-empty-cta--secondary:hover {
  border-color: var(--accent-orange, #FF9D00);
  color: var(--accent-orange, #FF9D00);
  transform: translateY(-1px);
}

/* Show overlay when opacity set by controller */
.swipe-overlay[style*="opacity: 1"],
.swipe-overlay[style*="opacity: 0.9"],
.swipe-overlay[style*="opacity: 0.8"] {
  /* visible */
}

@media (max-width: 380px) {
  .swipe-card-stack {
    min-height: 460px;
  }

  .swipe-card-body {
    padding: 16px;
  }

  .swipe-card-title {
    font-size: 20px;
  }

  .swipe-btn {
    width: 56px;
    height: 56px;
  }

  .swipe-btn--like {
    width: 64px;
    height: 64px;
  }

  .swipe-btn--like svg {
    width: 28px;
    height: 28px;
  }
}
