/* =========================================
   CUSTOM STYLES FOR CONTENT LOCKER
   ========================================= */

/* Content lock container */
.content-lock-container {
  position: relative;
  overflow: visible;
  max-width: 100%;
}

/* Blurred preview details */
.blurred-preview {
  filter: blur(12px);
  -webkit-filter: blur(12px);
  user-select: none;
  pointer-events: none;
  width: 100%;
  display: block;
}

/* Lock Overlay */
/* ===================================================
   CONTENT LOCK - PREMIUM DESIGN
   High-contrast, vibrant, mobile-first
   =================================================== */

/* Main overlay - MUCH darker for guaranteed contrast */
.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Align to TOP instead of center */
  z-index: 50;
  padding: 2rem 1rem; /* More top padding */
  padding-top: 10rem; /* Extra top spacing */
  text-align: center;
  /* Much lighter overlay to let the blurred image show through */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* The Card - Vibrant gradient border, dark glass interior */
.lock-card {
  background: linear-gradient(
    145deg,
    rgba(30, 30, 40, 0.9) 0%,
    rgba(15, 15, 25, 0.95) 100%
  );
  border: 2px solid transparent;
  /* Gradient border trick */
  background-clip: padding-box;
  position: relative;
  padding: 2.5rem 1.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(139, 92, 246, 0.15);
  max-width: 380px;
  width: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Gradient border effect using pseudo-element */
.lock-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 1.35rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
  z-index: -1;
  opacity: 0.8;
}

/* Lock Icon - Glowing */
.lock-icon-anim {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite,
    glow 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6));
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes glow {
  0% {
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 25px rgba(236, 72, 153, 0.7));
  }
}

/* Typography - White with strong shadow */
.lock-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.01em;
}

.lock-subtitle {
  font-size: 0.95rem;
  color: #d1d5db;
  margin-bottom: 1.75rem;
  font-weight: 400;
  opacity: 0.9;
}

/* Unlock Button - Animated Shimmer Gradient */
.unlock-button {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
  background-size: 200% 200%;
  animation: shimmer 3s linear infinite;
  color: white;
  border: none;
  padding: 0.875rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 9999px;
  box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.5),
    0 4px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.unlock-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px -5px rgba(139, 92, 246, 0.6),
    0 8px 10px rgba(0, 0, 0, 0.4);
}

.unlock-button:active {
  transform: translateY(1px) scale(0.98);
}

/* Responsive: Slightly smaller on very small screens */
@media (max-width: 400px) {
  .lock-card {
    padding: 2rem 1rem;
  }
  .lock-title {
    font-size: 1.25rem;
  }
  .unlock-button {
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
  }
  .lock-icon-anim {
    font-size: 3rem;
  }
}

/* Reader Page Containers - Layout Stability */
.reader-page-container {
  width: 100%;
  max-width: 1000px; /* Standard Bato reader width */
  margin: 0 auto;
  position: relative;
  background-color: #f3f4f6; /* Placeholder background */
  overflow: hidden;
}

/* Dark mode placeholder */
[data-theme="dark"] .reader-page-container {
  background-color: #1f2937;
}

.reader-page-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.reader-page-image.loaded {
  opacity: 1;
}

/* Ensure the lock container handles a list of images */
.content-lock-container .relative {
  height: auto; /* Allow growth */
}

/* For the blurred preview effect on the LIST of images */
.blurred-content {
  filter: blur(60px);
  -webkit-filter: blur(60px);
  pointer-events: none;
  user-select: none;
}
/* End Reader Page Styles */

/* FIX: Theme Dropdown Visibility (Authentic Styles + Fixes) */
/* Override daisyUI menu restrictions if present */
.toggleMenu-content.menu {
  display: block !important; /* Ensure visibility */
  max-height: none !important;
  overflow: visible !important;
  width: auto !important;
  min-width: 11rem !important;
  padding: 0.5rem !important;
}

/* Ensure ALL themes are visible (grid layout like original if needed, or just list) */
/* The original uses a vertical list in the HTML structure I saw. */
.toggleMenu-content li {
  display: block;
}
.toggleMenu-content li a {
  display: block;
  padding: 0.5rem 1rem !important;
  white-space: nowrap;
}

/* Scrollbar removal */
.toggleMenu-content::-webkit-scrollbar {
  display: none;
}

/* FIX: Image Container Margins on Large Screens */
/* Based on original image widths (~1116px), we limit the container width to avoid over-stretching.
   We apply this on larger screens to ensure 'margins' are visible (auto margins). */
@media (min-width: 1024px) {
  .content-lock-container {
    max-width: 1120px; /* Aligns with ~1116px image width */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

/* Ensure toggleMenu works with click-outside by being strictly positioned */
.toggleMenu {
  position: relative;
  display: inline-block;
}
.toggleMenu-content {
  /* Ensure z-index is high enough */
  z-index: 9999 !important;
}

/* ============================================
   VERIFICATION OVERLAY (Redesigned Unlock)
   Trust-inducing, OS-level verification flow
   ============================================ */

.verify-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  pointer-events: auto; /* ADD — ensures touch events aren't inherited as none */
  padding: 45vh 1rem 1rem 1rem; /* Top Right Bottom Left */
}

.verify-card {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Header */
.verify-header {
  margin-bottom: 1.5rem;
}

.reward-preview-container {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 200px;
  opacity: 1;
}

.reward-preview-container.collapsed {
  max-height: 46px; /* Slightly taller for padding */
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  margin-bottom: 14px !important;
  border-style: solid;
  border-color: #cbd5e1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-preview-container.collapsed .reward-preview-content {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Hide labels in collapsed mode */
.reward-preview-container.collapsed .reward-preview-content > div:first-child,
.reward-preview-container.collapsed .reward-preview-content > div:last-child {
  display: none !important;
}

/* Re-style the code row in collapsed mode */
.reward-preview-container.collapsed .reward-preview-content > div:nth-child(2) {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 !important;
}

.reward-preview-container.collapsed .redacted-code {
  font-size: 16px !important;
  filter: blur(3px) !important;
  letter-spacing: 2px !important;
  opacity: 0.8 !important;
}

/* Add specialized "Live" text next to code when collapsed */
.reward-preview-container.collapsed
  .reward-preview-content
  > div:nth-child(2)::before {
  content: "AWAITING CONFIRMATION:";
  font-size: 9px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
}

.reward-preview-container.collapsed
  .reward-preview-content
  > div:nth-child(2)::after {
  content: "● LOCKED";
  font-size: 8px;
  font-weight: 900;
  color: #ef4444;
  letter-spacing: 1px;
  animation: connection-blink 1.5s infinite;
}

.reward-preview-container.collapsed
  .reward-preview-content
  > div:nth-child(2)
  > div:last-child {
  padding: 2px 7px !important;
  font-size: 8px !important;
  border-radius: 6px !important;
}

@keyframes connection-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* New: Reward Preview Animations */
@keyframes badge-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.reward-preview-container div div:last-child {
  animation: badge-pulse 2s infinite;
}

.verify-icon {
  color: #6ee7b7;
  margin: 0 auto 0.75rem;
  display: block;
}

.verify-title {
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.verify-subtitle {
  color: #94a3b8;
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.4;
}

/* Slide Switch */
.slide-switch-container {
  margin-bottom: 1.5rem;
}

.slide-switch {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.switch-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  height: 56px;
  padding: 0 1rem;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.switch-icon {
  color: #64748b;
  z-index: 1;
  transition: color 0.3s ease;
}

.switch-icon-lock {
  color: #ef4444;
}

.switch-icon-unlock {
  color: #22c55e;
  opacity: 0.5;
}

.switch-knob {
  position: absolute;
  left: 6px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: grab;
  transition: left 0.15s ease, transform 0.1s ease;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.switch-knob:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.switch-knob.unlocked {
  left: calc(100% - 50px);
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.switch-hint {
  color: #64748b;
  font-size: 0.75rem;
  margin: 0.75rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Access Code Input */
.access-code-container {
  margin-bottom: 1.5rem;
}

.access-code-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.code-input {
  width: 44px;
  height: 52px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.code-input:focus {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.code-input.filled {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.code-hint {
  color: #64748b;
  font-size: 0.75rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Continue Button */
.verify-button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: not-allowed;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.verify-button:not(:disabled) {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: transparent;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.verify-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.verify-button:not(:disabled):active {
  transform: translateY(0);
}

/* Light theme adjustments */
[data-theme="light"] .verify-card {
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .verify-title {
  color: #1e293b;
}

[data-theme="light"] .verify-subtitle,
[data-theme="light"] .switch-hint,
[data-theme="light"] .code-hint {
  color: #64748b;
}

[data-theme="light"] .switch-track {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1e293b;
}

[data-theme="light"] .verify-button {
  border-color: rgba(0, 0, 0, 0.15);
  color: #64748b;
}
/* ============================================
   ADD THIS TO YOUR styles.css FILE
   ============================================ */

/* Offers Container */
.offers-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 180px; /* Shows ~2 offers, rest scrollable */
  overflow-y: auto;
  padding: 2px;
  margin-bottom: 16px;
}

.offers-container::-webkit-scrollbar {
  width: 5px;
}

.offers-container::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}

.offers-container::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.offers-container::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Offer Item (Compact AdMaven Style) */
.offer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 70px;
}

.offer-item:hover {
  border-color: #667eea;
  background: #fafbff;
  transform: translateX(2px);
}

.offer-item.offer-active {
  border-color: #10b981;
  background: #f0fdf4;
}

/* Offer Number Circle (Left) */
.offer-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #4b5563;
  flex-shrink: 0;
}

.offer-item:hover .offer-number {
  border-color: #667eea;
  color: #667eea;
}

.offer-item.offer-active .offer-number {
  border-color: #10b981;
  background: #10b981;
  color: white;
}

/* Offer Info (Middle) */
.offer-info {
  flex: 1;
  min-width: 0;
}

.offer-title-text {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.offer-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Offer Action Circle (Right) */
.offer-action-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

.offer-item:hover .offer-action-circle {
  border-color: #667eea;
  background: #f0f4ff;
}

/* Loading State (Spinning Timer) */
.offer-action-circle.loading {
  border-color: #667eea;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

/* Retry State */
.offer-action-circle.retry-state {
  border-color: #f59e0b;
  background: #fef3c7;
}

.offer-action-circle.retry-state:hover {
  background: #fde68a;
  transform: scale(1.1);
}

/* Spin Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* =========================================
   DECOUPLED OFFER LIST STYLES (Redesign)
   ========================================= */

/* Glassmorphism Title Container */
.locker-title-container.glass-mode {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 5px !important; /* Reduced vertical spacing */
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Reduce visual dominance */
  max-height: auto;
}

.locker-title-container.glass-mode h2 {
  font-size: 18px !important; /* Smaller title */
  margin: 0;
}

/* === COMPACT OFFER CARDS === */

/* Decoupled Row Layout */
.offer-row-decoupled {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

/* 1. Offer Badge (Standalone, Left) */
.offer-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
}

/* 2. Content Card (Center, Focus) */
.offer-card {
  flex: 1;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px; /* Pill/Rounded */
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.offer-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.offer-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
  line-height: 1.2;
}

.offer-card-subtitle {
  font-size: 11px;
  color: #6b7280;
}

/* 3. Status Indicator (Right, Isolated) */
.offer-status {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pie Timer Implementation */
.pie-timer {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: conic-gradient(#3b82f6 var(--progress, 0%), #e5e7eb 0deg);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-timer::after {
  content: "";
  width: 26px; /* Inner hole */
  height: 26px;
  background: white; /* Matches bg */
  border-radius: 50%;
  position: absolute;
}

/* State Tints (Applied to Content Card mostly, or whole row?) */
/* User said: "the offer container should display a bluish tint... offer container should transition to reddish" */
/* We will tint the CARD itself. */

/* Active State (Blue Tint) */
.offer-card.active-state {
  background-color: #eff6ff; /* Blue-50 */
  border-color: #bfdbfe; /* Blue-200 */
}
.offer-badge.active-state {
  background-color: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* Failure State (Red Tint) */
.offer-card.failure-state {
  background-color: #fef2f2; /* Red-50 */
  border-color: #fecaca; /* Red-200 */
}
.offer-badge.failure-state {
  background-color: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Animation for Retry Icon */
.spin-anim {
  animation: fullSpin 0.6s ease-in-out;
}

@keyframes fullSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Instructions persistence styling handled by layout structure */
/* ============================================
   ADD THESE TO THE END OF YOUR styles.css
   ============================================ */

/* === SPINNER + PIE PROGRESS (COMBINED) === */
/* === SPINNER + PIE PROGRESS (COMBINED) === */
.pie-timer {
  width: 40px;
  height: 40px;
  position: relative;
  display: flex; /* Centering helper */
  align-items: center;
  justify-content: center;
  /* Container is STATIC (does not spin) */
}

/* 1. Outer Spinning Ring (The "Thick Ring") */
.pie-timer::before {
  content: "";
  position: absolute;
  inset: 0; /* Full size */
  border-radius: 50%;
  border: 4px solid #e5e7eb; /* Thicker border */
  border-top-color: #667eea;
  animation: spin 1s linear infinite;
  z-index: 2; /* On top of fill? Or outside? */
}

/* 2. Inner Solid Fill (The "Pie") */
.pie-timer::after {
  content: "";
  position: absolute;
  inset: 6px; /* Gap so it's "inside" the ring */
  border-radius: 50%;
  /* Solid fill filling up */
  background: conic-gradient(
    #667eea var(--progress, 0%),
    transparent var(--progress, 0%)
  );
  /* Optional: Light background for the empty part of pie? */
  background-color: transparent;
  z-index: 1;
}

/* Hide text content if any (clean visual only) */
.pie-timer[data-time] {
  color: transparent !important;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spin-anim {
  animation: spin-once 0.6s ease-in-out;
}

@keyframes spin-once {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* === COMPACT OFFER CARDS === */
.offers-list-decoupled {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
  overscroll-behavior-y: contain; /* Prevents mobile flickering */
  padding: 4px;
  margin-top: 10px;
}

.offers-list-decoupled::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari and Opera */
  width: 0 !important;
  height: 0 !important;
}

.offers-list-decoupled::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 10px;
}

.offers-list-decoupled::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

.offers-list-decoupled::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.offer-row-decoupled {
  display: flex;
  align-items: center;
  gap: 12px;
  /* Ensure full width usage */
  width: 100%;
  transition: opacity 0.3s ease;
}

/* Phase 1: Locking */
.offer-row-decoupled.is-locked {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.5);
}

/* === OFFER BADGE REMOVED per request === */

/* === SOLID WHITE OFFER CARD (AdMaven Style) === */
.offer-card {
  flex: 1;
  min-width: 0;
  padding: 12px;
  background: white; /* Solid White */
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* Layout Variants */
.offer-card.layout-left {
  flex-direction: row;
  align-items: center;
  text-align: left;
}

.offer-card.layout-top {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
}

.offer-card.layout-none {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.offer-card.layout-top .offer-card-img {
  width: 52px; /* Slightly larger when on top */
  height: 52px;
}

.offer-card-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6; /* Placeholder color while loading */
}

/* Status is now outside, so card takes middle space */

.offer-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateX(2px);
}

/* === SOLID STATE COLORS (Readability Focus) === */
.offer-card.active-state {
  /* Solid Light Blue - No Transparency */
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25) !important;
  position: relative;
}

.selected-tag {
  position: absolute;
  top: -8px; /* Lift it above the card slightly */
  right: 12px;
  background: #3b82f6;
  color: white;
  font-size: 9px; /* Slightly smaller */
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 4px; /* Ribbon style */
  display: flex;
  align-items: center;
  gap: 3px;
  animation: fadeIn 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.offer-card.failure-state {
  /* Solid Light Red - No Transparency */
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
}

.offer-card-text {
  flex: 1;
  min-width: 0;
}

.offer-card-title {
  font-size: 14px; /* Slightly larger for readability */
  font-weight: 700;
  color: #1f2937; /* Dark Gray */
  line-height: 1.3;
  /* Allow Wrap */
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.offer-time-estimate {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.offer-card-subtitle {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  /* Allow Wrap */
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* === STATUS AREA (REPLACES CHEVRON) === */
.offer-status-area {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: none; /* Hidden by default to let card take full width */
  align-items: center;
  justify-content: center;
}

/* Show when it has content (clicked or retry) */
.offer-row-decoupled.is-active .offer-status-area,
.offer-row-decoupled.is-failure .offer-status-area {
  display: flex;
}

/* === RETRY BUTTON IN PILL CONTAINER === */
/* === RETRY BUTTON (ROUND + SVG) === */
.offer-status-area .retry-btn-container {
  width: 32px;
  height: 32px;
  border-radius: 50%; /* Round */
  background: white;
  border: 1px solid #e5e7eb;
  display: flex; /* Center SVG */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.offer-status-area .retry-btn-container:hover {
  transform: rotate(180deg);
  border-color: #9ca3af;
}

.offer-status-area img.retry-icon {
  width: 32px; /* Full size of container */
  height: 32px;
  display: block;
}

/* Hide old styles if any remain */
.offer-status-area i.fa-redo-alt {
  display: none !important;
}

/* === PHASE 3: SUCCESS STATE === */
.success-reveal-card {
  text-align: center;
  padding: 24px 16px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  animation: slideUp 0.4s ease-out;
}

.success-check-icon {
  width: 56px;
  height: 56px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.passcode-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.passcode-box {
  width: 48px;
  height: 56px;
  border: 2px solid #10b981;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #1f2937;
  background: #f0fdf4;
}

.copy-btn {
  width: 100%;
  padding: 12px;
  background: #1f2937;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.copy-btn:hover {
  background: #374151;
}

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

/* === PHASE 4: PIN FEEDBACK === */
.shake-anim {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

.help-pulse {
  animation: helpPulse 0.8s ease-in-out 3;
  display: inline-block;
}

@keyframes helpPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
    color: #3b82f6;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.locker-card {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
