/* ========================================
 * css/floating-cart.css
 * ======================================== */

/* Floating Cart Styles */
:root {
  /* Define missing color variants for hover states */
  --color-blue-dark: #4a5a94; /* Darker shade of #5b6bb5 */
  --color-red-dark: #a3212c; /* Darker shade of #cc2936 */
}

.floating-cart-container {
  --cart-primary: var(--color-red);
  --cart-secondary: var(--color-blue);
  --cart-bg: rgba(255, 255, 255, 0.85);
  --cart-border: var(--color-gray-200);
  --cart-shadow: rgba(0, 0, 0, 0.1);
  --cart-text: var(--color-gray-900);
  --cart-text-secondary: var(--color-gray-600);
  --cart-radius: var(--radius-lg);
  --cart-transition: var(--transition-base);
  /* Container is always present - children (panel/backdrop) control their own visibility */
}

/* Backdrop */
.cart-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--cart-transition),
    visibility var(--cart-transition);
}

.cart-backdrop.active {
  opacity: 1;
  visibility: visible;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Cart Badge - Now used in header only */

/* Cart Panel - Slides in from right (more intuitive for shopping carts) */
.floating-cart-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: var(--cart-bg);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform var(--cart-transition);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  /* Mobile: Add smooth momentum scrolling */
  -webkit-overflow-scrolling: touch;
}

.floating-cart-panel.open {
  transform: translateX(0);
  /* Add subtle box shadow for depth */
  box-shadow: -4px 0 24px var(--cart-shadow);
}

/* Cart Header */
.cart-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--cart-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  flex-shrink: 0;
}

.cart-header h3 {
  margin: 0;
  font-size: var(--font-size-2xl);
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--color-black);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cart-text-secondary);
  border-radius: 4px;
  /* Removed transition per performance guidelines */
}

.cart-close:hover {
  background-color: #f5f5f5;
  color: var(--cart-text);
}

.cart-close:focus {
  outline: 2px solid var(--cart-primary);
  outline-offset: 1px;
}

.cart-close svg {
  fill: currentColor;
}

/* Cart Content */
.cart-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--cart-text-secondary);
}

.cart-empty-message p:first-child {
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 500;
}

.cart-empty-message p:last-child {
  font-size: 14px;
  margin-top: 8px;
}

/* Cart Items */
.cart-items {
  display: none;
}

/* Test Ticket Styling */
.cart-item.test-ticket {
  background: linear-gradient(135deg, #fff3cd 0%, #fef8e1 100%);
  border: 1px solid #ffc107;
  border-radius: var(--cart-radius);
  padding: 18px 16px;
  margin: 8px 0;
}

.test-ticket-badge {
  display: inline-block;
  background: #ffc107;
  color: #212529;
  font-size: 11px;
  font-weight: 900;
  font-family: var(--font-display);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 8px;
  vertical-align: middle;
}

/* Cart Categories */
.cart-category {
  margin-bottom: var(--space-lg);
}

.cart-category:last-child {
  margin-bottom: 0;
}

.cart-category-header {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 900;
  color: var(--color-red);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--cart-border);
}

.cart-category-header.tickets {
  color: var(--color-blue);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--cart-border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  flex: 1;
  margin-right: 16px;
}

.cart-item-info h4 {
  margin: 0 0 4px 0;
  font-size: var(--font-size-base);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-black);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.cart-item-price {
  color: var(--color-gray-600);
  font-size: var(--font-size-sm);
  font-family: var(--font-code);
  margin: 0;
}

/* Cart Item Availability Warnings */
.cart-item-unavailable {
  border-left: 3px solid var(--color-red, #ef4444);
  background: rgba(239, 68, 68, 0.05);
}

.cart-item-availability-warning {
  color: var(--color-red, #ef4444);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-code);
  margin: 4px 0 0 0;
  padding: 4px 8px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 4px;
  display: inline-block;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.qty-adjust {
  width: 44px;
  height: 44px;
  border: 1px solid var(--cart-border);
  background: var(--color-surface);
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Removed transition per performance guidelines */
}

.qty-adjust:hover {
  background: var(--color-background-secondary);
  border-color: var(--cart-primary);
}

.qty-adjust:focus {
  outline: 2px solid var(--cart-primary);
  outline-offset: 1px;
}

.qty-adjust:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.qty-display {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-code);
}

/* Donation Item */
.donation-item {
  background: linear-gradient(135deg, var(--color-warning-light) 0%, #ffecb3 100%);
  border-radius: var(--cart-radius);
  padding: 16px 20px;
  margin: 8px 0;
  border: 1px solid var(--color-warning);
}

.remove-donation {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--cart-text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  /* Removed transition per performance guidelines */
}

.remove-donation:hover {
  background: var(--shadow-color-light);
  color: var(--cart-text);
}

.remove-donation:focus {
  outline: 2px solid var(--cart-primary);
  outline-offset: 1px;
}

/* Cart Footer */
.cart-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--cart-border);
  background: transparent;
  flex-shrink: 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-black);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.cart-total-amount {
  color: var(--cart-primary);
  font-family: var(--font-code);
  font-weight: 700;
}

.cart-checkout-btn {
  width: 100%;
  padding: var(--space-md);
  background: var(--cart-secondary);
  color: var(--color-white);
  border: none;
  border-radius: var(--cart-radius);
  font-size: var(--font-size-base);
  font-weight: 900;
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.cart-checkout-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.cart-checkout-btn:active:not(:disabled) {
  transform: translateY(0);
}

.cart-checkout-btn:focus {
  outline: 2px solid var(--color-warning);
  outline-offset: 2px;
}

.cart-checkout-btn:disabled {
  background: var(--color-border-medium);
  cursor: not-allowed;
  transform: none;
}

/* Clear Cart Link */
.cart-clear-btn {
  display: block;
  width: 100%;
  padding: var(--space-sm) 0;
  margin-top: var(--space-md);
  background: transparent;
  border: none;
  color: var(--color-gray-600);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  text-decoration: underline;
  cursor: pointer;
  /* Removed transition per performance guidelines */
  text-align: center;
}

.cart-clear-btn:hover {
  color: var(--color-secondary);
}

.cart-clear-btn:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Cart Clear Message Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* Mobile Optimizations */
@media (max-width: 768px) {
  .floating-cart-panel {
    max-width: 100%;
    width: 100vw;
  }

  /* Button styles removed - header cart only */

  .cart-header {
    padding: 16px 20px;
  }

  .cart-content {
    padding: 16px 20px;
  }

  .cart-footer {
    padding: 16px 20px;
  }

  .cart-item {
    padding: 12px 0;
  }

  .cart-item-actions {
    gap: 8px;
  }

  .qty-adjust {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  /* Badge styles removed - header cart only */
}

@media (max-width: 480px) {
  /* Button styles removed - header cart only */

  .cart-header h3 {
    font-size: 18px;
  }

  .cart-item-info h4 {
    font-size: 15px;
  }

  .cart-item-price {
    font-size: 13px;
  }

  .cart-total {
    font-size: 16px;
  }

  .cart-checkout-btn {
    padding: 14px;
    font-size: 15px;
  }

  /* Badge styles removed - header cart only */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .floating-cart-container {
    --cart-border: var(--color-black);
    --cart-shadow: var(--shadow-color-strong);
  }

  /* Button styles removed - header cart only */

  .qty-adjust {
    border: 2px solid var(--cart-border);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .floating-cart-container {
    --cart-transition: 0.1s ease-out;
  }

  /* Button and badge animations removed - header cart only */

  .qty-adjust,
  .cart-close,
  .remove-donation,
  .cart-checkout-btn {
    transition: none;
  }

  /* Disable animations for checkout overlays */
  .checkout-email-modal,
  .checkout-loading-overlay,
  .checkout-error-message {
    animation: none;
  }

  .checkout-loading-content,
  .checkout-email-content,
  .checkout-error-content {
    animation: none;
  }

  /* Stop spinner rotation for reduced motion */
  .checkout-loading-spinner {
    animation: none;
  }
}

/* Dark mode support - removed in favor of explicit dark mode CSS file */
/* @media (prefers-color-scheme: dark) rules have been moved to floating-cart-dark.css */
/* Orphaned dark-mode overrides removed (migrated to floating-cart-dark.css) */

/* Animations */
@keyframes cart-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Print styles */
@media print {
  .floating-cart-container {
    display: none !important;
  }
}

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

/* ============================================
   Email Collection Modal
   ============================================ */

.checkout-email-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease forwards;
}

.checkout-email-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--shadow-color-strong);
}

.checkout-email-content {
  position: relative;
  background: var(--color-surface);
  padding: var(--space-xl);
  max-width: 500px;
  width: 90%;
  margin: var(--space-lg);
  border: 2px solid var(--color-black);
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease forwards;
}

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

.checkout-email-content h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.checkout-email-content p {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

#checkout-email-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.checkout-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

#checkout-email-form input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--color-border-medium);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: opacity 0.2s ease;
}

#checkout-email-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91, 107, 181, 0.1);
}

.checkout-form-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-md);
}

.checkout-cancel-btn,
.checkout-continue-btn {
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s ease;
  border: none;
}

.checkout-cancel-btn {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--color-border-medium);
}

.checkout-cancel-btn:hover {
  background: var(--color-background-secondary);
  border-color: var(--color-border-strong);
}

.checkout-continue-btn {
  background: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
}

.checkout-continue-btn:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* ============================================
   Checkout Loading Overlay
   ============================================ */

.checkout-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-surface-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.3s ease forwards;
}

.checkout-loading-content {
  text-align: center;
  padding: var(--space-xl);
}

.checkout-loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-lg);
}

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

.checkout-loading-content p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Checkout Error Message
   ============================================ */

.checkout-error-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--shadow-color-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  animation: fadeIn 0.3s ease forwards;
}

.checkout-error-content {
  background: var(--color-surface);
  padding: var(--space-xl);
  max-width: 400px;
  width: 90%;
  margin: var(--space-lg);
  border: 2px solid var(--color-error);
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.checkout-error-icon {
  color: var(--color-error);
  margin-bottom: var(--space-md);
}

.checkout-error-content p {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.checkout-error-content button {
  padding: var(--space-md) var(--space-xl);
  background: var(--color-error);
  color: var(--color-white);
  border: none;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.checkout-error-content button:hover {
  background: var(--color-secondary-hover);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .checkout-form-row {
    grid-template-columns: 1fr;
  }

  .checkout-form-buttons {
    flex-direction: column;
  }

  .checkout-cancel-btn,
  .checkout-continue-btn {
    width: 100%;
  }

  .checkout-email-content,
  .checkout-error-content {
    padding: var(--space-lg);
    margin: var(--space-md);
  }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   Dark Mode Overrides
   ============================================ */

/* Cart Header - Fix dark mode text */
[data-theme="dark"] .cart-header h3 {
  color: var(--color-white) !important;
}

/* Cart item text */
[data-theme="dark"] .cart-item-info h4 {
  color: var(--color-white);
}

[data-theme="dark"] .cart-item-info p {
  color: rgba(255, 255, 255, 0.7);
}

/* Cart totals and checkout button */
[data-theme="dark"] .cart-total-label,
[data-theme="dark"] .cart-total-amount {
  color: var(--color-white);
}

/* Close button */
[data-theme="dark"] .cart-close {
  color: var(--color-white);
}

[data-theme="dark"] .cart-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Quantity controls */
[data-theme="dark"] .qty-adjust {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .qty-adjust:hover {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .qty-display {
  color: var(--color-white);
}

/* Remove button */
[data-theme="dark"] .remove-donation {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .remove-donation:hover {
  color: var(--color-white);
  background: rgba(255, 0, 0, 0.1);
}

/* Remove borders on cart items in dark mode */
[data-theme="dark"] .cart-item {
  border-bottom: none;
}

[data-theme="dark"] .cart-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .cart-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Test Ticket Dark Mode Support */
[data-theme="dark"] .cart-item.test-ticket {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.08) 100%);
  border-color: rgba(255, 193, 7, 0.3);
}

[data-theme="dark"] .test-ticket-badge {
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}


/* ========================================
 * css/floating-cart-dark.css
 * ======================================== */

/* ==========================================================================
   FLOATING CART DARK MODE STYLES
   A Lo Cubano Boulder Fest - Enhanced dark mode support for cart component
   ========================================================================== */

/* Dark mode floating cart styles */
[data-theme="dark"] {
  /* Floating Cart Variables - Button variables removed */
  --floating-cart-bg: var(--color-cart-dark-bg);
  --floating-cart-border: rgba(255, 255, 255, 0.1);
  --floating-cart-panel-bg: var(--color-cart-dark-bg);
  --floating-cart-panel-shadow: 0 20px 60px var(--shadow-color-dark);
  --floating-cart-backdrop: var(--color-overlay-dark);
  --floating-cart-item-bg: var(--color-gray-800);
  --floating-cart-item-border: var(--color-border);
  --floating-cart-header-border: rgba(255, 255, 255, 0.1);
  --floating-cart-footer-border: rgba(255, 255, 255, 0.1);
  --floating-cart-clear-button-bg: var(--color-surface-elevated);
  --floating-cart-clear-button-hover: var(--color-error-light);

  /* Override base cart variables for dark mode - ensure consistency */
  --cart-bg: var(--color-cart-dark-bg);
  --cart-border: rgba(255, 255, 255, 0.1);
  --cart-text: var(--color-white);
  --cart-text-secondary: var(--color-gray-300);
  --cart-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Floating Cart Container */
[data-theme="dark"] .floating-cart-container {
  /* Override any media query rules with higher specificity */
  --cart-bg: var(--color-cart-dark-bg);
  --cart-border: rgba(255, 255, 255, 0.1) !important;
  --cart-text: var(--color-white) !important;
  --cart-text-secondary: var(--color-gray-300) !important;
}

/* Button and badge styles removed - header cart only */

/* Cart Backdrop */
[data-theme="dark"] .cart-backdrop {
  background: var(--floating-cart-backdrop);
}

[data-theme="dark"] .cart-backdrop.active {
  backdrop-filter: blur(8px);
}

/* Cart Panel */
[data-theme="dark"] .floating-cart-panel {
  background: var(--color-cart-dark-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--floating-cart-panel-shadow);
}

/* Cart Header */
[data-theme="dark"] .cart-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

[data-theme="dark"] .cart-header h3 {
  color: var(--color-text-primary);
}

/* Cart Close Button */
[data-theme="dark"] .cart-close {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .cart-close:hover {
  background: var(--color-error-light);
  color: var(--color-red);
  border-color: var(--color-red);
}

[data-theme="dark"] .cart-close:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

[data-theme="dark"] .cart-close svg {
  fill: currentColor;
}

/* Cart Content */
[data-theme="dark"] .cart-content {
  background: transparent;
}

/* Empty Message */
[data-theme="dark"] .cart-empty-message {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .cart-empty-message p:first-child {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* Cart Items */
[data-theme="dark"] .cart-items {
  background: transparent;
}

/* Cart Category Headers */
[data-theme="dark"] .cart-category-header {
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--floating-cart-item-border);
}

[data-theme="dark"] .cart-category-header.tickets {
  color: var(--color-blue);
}

[data-theme="dark"] .cart-category-header.donations {
  color: var(--color-red);
}

/* Cart Item - Match light mode (no background, no hover) */
[data-theme="dark"] .cart-item {
  /* No background - matches light mode */
  border-bottom: 1px solid var(--floating-cart-item-border);
}

[data-theme="dark"] .cart-item:last-child {
  border-bottom: none;
}

/* Cart Item Info */
[data-theme="dark"] .cart-item-info h4 {
  color: var(--color-text-primary);
}

[data-theme="dark"] .cart-item-price {
  color: var(--color-text-secondary);
}

/* Quantity Controls */
[data-theme="dark"] .cart-item-actions {
  /* Inherits container styling */
}

[data-theme="dark"] .qty-adjust {
  background: var(--color-surface);
  border: 1px solid var(--color-border-medium);
  color: var(--color-text-primary);
  border-radius: 4px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .qty-adjust:hover:not(:disabled) {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: var(--color-text-inverse);
}

[data-theme="dark"] .qty-adjust:disabled {
  background: var(--color-background-tertiary);
  border-color: var(--color-border-light);
  color: var(--color-text-muted);
  opacity: 0.5;
  cursor: not-allowed;
}

[data-theme="dark"] .qty-display {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* Remove Donation Button */
[data-theme="dark"] .remove-donation {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

[data-theme="dark"] .remove-donation:hover {
  background: var(--color-error-light);
  color: var(--color-red);
  border-color: var(--color-red);
}

/* Cart Footer */
[data-theme="dark"] .cart-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

/* Cart Total */
[data-theme="dark"] .cart-total {
  color: var(--color-text-primary);
}

[data-theme="dark"] .cart-total-amount {
  color: var(--color-blue);
  font-weight: 700;
}

/* Checkout Button */
[data-theme="dark"] .cart-checkout-btn {
  background: var(--color-blue);
  color: var(--color-text-inverse);
  border: 2px solid var(--color-blue);
  transition: all 0.2s ease;
}

[data-theme="dark"] .cart-checkout-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: var(--shadow-accent-blue);
}

[data-theme="dark"] .cart-checkout-btn:disabled {
  background: var(--color-background-tertiary);
  border-color: var(--color-border-light);
  color: var(--color-text-muted);
  opacity: 0.6;
  cursor: not-allowed;
}

[data-theme="dark"] .cart-checkout-btn:focus:not(:disabled) {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

/* Clear Cart Button */
[data-theme="dark"] .cart-clear-btn {
  background: var(--floating-cart-clear-button-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

[data-theme="dark"] .cart-clear-btn:hover {
  background: var(--floating-cart-clear-button-hover);
  color: var(--color-red);
  border-color: var(--color-red);
}

[data-theme="dark"] .cart-clear-btn:focus {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

/* Cart Messages */
[data-theme="dark"] .cart-clear-message {
  background: var(--color-blue);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-accent-blue);
}

[data-theme="dark"] .cart-error-message {
  background: var(--color-red);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-accent-red);
}

/* Confirmation Modal */
[data-theme="dark"] .confirmation-backdrop {
  background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .confirmation-modal {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated-lg);
}

[data-theme="dark"] .confirmation-modal h3 {
  color: var(--color-blue);
}

[data-theme="dark"] .confirmation-modal p {
  color: var(--color-text-primary);
}

[data-theme="dark"] .confirm-cancel {
  background: transparent;
  border-color: var(--color-blue);
  color: var(--color-blue);
}

[data-theme="dark"] .confirm-cancel:hover {
  background: var(--color-blue);
  color: var(--color-text-inverse);
}

[data-theme="dark"] .confirm-clear {
  background: var(--color-red);
  color: var(--color-text-inverse);
  border: none;
}

[data-theme="dark"] .confirm-clear:hover {
  background: var(--color-secondary-hover);
}

/* Checkout Loading States */
[data-theme="dark"] .checkout-loading-overlay {
  background: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .checkout-loading-content {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-2xl);
  box-shadow: var(--shadow-elevated-lg);
}

[data-theme="dark"] .checkout-loading-spinner {
  border: 4px solid var(--color-border);
  border-top-color: var(--color-blue);
}

[data-theme="dark"] .checkout-error-message {
  background: rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .checkout-error-content {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 2px solid var(--color-red);
  border-radius: 12px;
  padding: var(--space-2xl);
  box-shadow: var(--shadow-elevated-lg);
}

[data-theme="dark"] .checkout-error-icon {
  color: var(--color-red);
}

/* Mobile Responsive Dark Mode */
@media (max-width: 768px) {
  [data-theme="dark"] .floating-cart-panel {
    background: var(--color-cart-dark-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--floating-cart-header-border);
  }

  /* Cart item - no background to match light mode */

  /* Button styles removed - header cart only */

  [data-theme="dark"] .confirmation-modal {
    margin: var(--space-md);
    padding: var(--space-xl);
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  [data-theme="dark"] .cart-checkout-btn,
  [data-theme="dark"] .cart-clear-btn {
    border-width: 2px;
  }

  /* Cart item borders removed for cleaner look */

  [data-theme="dark"] .qty-adjust {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  /* Badge and button animations removed - header cart only */

  [data-theme="dark"] .cart-checkout-btn:hover {
    transform: none;
  }
}

/* Cart Item Availability Warnings - Dark Mode */
[data-theme="dark"] .cart-item-unavailable {
  border-left-color: var(--color-red, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .cart-item-availability-warning {
  color: var(--color-red-light, #fca5a5);
  background: rgba(239, 68, 68, 0.15);
}

/* Print Styles */
@media print {
  [data-theme="dark"] .floating-cart-container {
    display: none !important;
  }
}

/* ========================================
 * css/header-cart.css
 * ======================================== */

/* Header Cart Styles */

/* Cart item in navigation */
.nav-cart-item {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  margin-left: 0;
  vertical-align: baseline;
}

/* Cart button in header */
.nav-cart-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform var(--transition-fast);
  vertical-align: baseline;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
}

.nav-cart-button:hover {
  transform: scale(1.1);
}

.nav-cart-button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Cart icon */
.nav-cart-icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  color: var(--color-text-primary);
  transition: color var(--transition-fast);
}

/* Theme-aware colors */
[data-theme="light"] .nav-cart-icon,
:root:not([data-theme]) .nav-cart-icon {
  color: var(--color-black);
}

[data-theme="dark"] .nav-cart-icon {
  color: var(--color-white);
}

/* Cart badge in header */
.nav-cart-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-red);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-code);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  animation: pulse 0.3s ease-out;
}

.nav-cart-badge.pulse {
  animation: pulse 0.3s ease-out;
}

/* Mobile styles */
@media (max-width: 768px) {
  /* Position cart icon in mobile header */
  .nav-cart-item {
    position: fixed !important; /* Fixed to viewport, no parent transform */
    right: 80px; /* Position to the left of hamburger menu with more spacing */
    top: var(--space-lg); /* Align with hamburger vertical position */
    transform: none;
    margin: 0;
    z-index: 1001; /* Same as hamburger menu */
  }
  
  .nav-cart-button {
    padding: var(--space-sm);
    min-width: 44px;
    min-height: 44px;
  }
  
  .nav-cart-icon {
    width: 34px;
    height: 34px;
  }

  .nav-cart-badge {
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    padding: 0 4px;
  }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-cart-item {
    margin-left: 0;
  }
}

/* Desktop adjustments for alignment */
@media (min-width: 1025px) {
  .nav-cart-item {
    margin-left: 0;
  }

  /* Ensure cart icon aligns with nav text baseline */
  .nav-cart-button {
    display: inline-flex;
    align-items: baseline;
    vertical-align: baseline;
  }
}


/* Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .nav-cart-icon {
    stroke: currentColor;
    stroke-width: 0.5;
  }
  
  .nav-cart-badge {
    border: 1px solid var(--color-white);
  }
}

/* Print styles */
@media print {
  .nav-cart-item {
    display: none !important;
  }
}

/* ========================================
 * css/mobile-overrides.css
 * ======================================== */

/* Mobile Overrides for A Lo Cubano Boulder Fest
 * Desktop-First Protection: All styles here are mobile-only
 * Breakpoint: 768px and below
 * This file can be removed entirely without affecting desktop design
 */

/* ==========================================================================
   DESKTOP PROTECTION - Ensure desktop navigation always works
   ========================================================================== */

/* Desktop navigation is handled by navigation.css - removed conflicting overrides */

/* ==========================================================================
   MOBILE-ONLY NAVIGATION ENHANCEMENTS
   ========================================================================== */

@media (max-width: 768px) {
  /* Enhanced Mobile Header */
  .header {
    padding: var(--space-md) 0;
    background: var(--color-surface-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
  }

  /* Logo responsiveness */
  .header-left img {
    height: 60px !important; /* Smaller logo for mobile */
  }

  .logo-text {
    font-size: var(--font-size-xl) !important;
    gap: var(--space-xs) !important;
  }

  /* Mobile menu toggle enhancements */
  .menu-toggle {
    width: 44px;
    height: 44px;
    touch-action: manipulation;
  }

  .menu-icon span {
    width: 20px;
    height: 2px;
    border-radius: 1px;
  }

  /* Mobile navigation is now handled by navigation.css */
}

/* ==========================================================================
   MOBILE-ONLY TYPOGRAPHY OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* Hero title mobile optimization */
  .hero-title-massive {
    font-size: clamp(
      var(--font-size-4xl),
      12vw,
      var(--font-size-6xl)
    ) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
  }

  .hero-title-word {
    display: block;
    margin-bottom: var(--space-xs);
  }

  /* Large display text mobile scaling */
  .text-display {
    font-size: clamp(var(--font-size-xl), 6vw, var(--font-size-3xl)) !important;
    line-height: 1.1 !important;
  }

  /* Gallery typography mobile optimization */
  .gallery-item-type {
    padding: var(--space-lg) !important;
  }

  .gallery-type-title {
    font-size: var(--font-size-xl) !important;
    line-height: 1.2 !important;
  }

  .gallery-type-meta {
    font-size: var(--font-size-sm) !important;
    margin: var(--space-sm) 0 !important;
  }

  .gallery-type-description {
    font-size: var(--font-size-base) !important;
    line-height: 1.5 !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY LAYOUT OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* Section spacing mobile optimization */
  .section-typographic {
    padding: var(--space-md) 0;
  }

  .hero-typographic {
    padding: var(--space-4xl) 0 var(--space-3xl);
    min-height: auto;
  }

  /* Grid layouts mobile stacking */
  .text-composition,
  .gallery-typographic {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Pricing tables mobile optimization */
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .day-passes {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
  }

  .individual-items {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY FORM OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* Ticket form mobile enhancements */
  .purchase-section {
    padding: var(--space-xl) !important;
    margin: 0 var(--space-md) var(--space-3xl) !important;
  }

  .ticket-group {
    margin-bottom: var(--space-xl) !important;
  }

  /* Form inputs mobile optimization */
  .purchase-section input[type="text"],
  .purchase-section input[type="email"],
  .purchase-section input[type="tel"],
  .purchase-section input[type="number"] {
    padding: var(--space-md);
    font-size: var(--font-size-base);
    border-radius: 4px;
    touch-action: manipulation;
    min-height: 44px;
  }

  /* Mobile form grid layouts */
  .purchase-section [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
  }

  .purchase-section [style*="grid-template-columns: 1fr auto"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-sm) !important;
    align-items: stretch !important;
  }

  /* Button mobile optimization */
  .form-button-type {
    width: 100% !important;
    padding: var(--space-lg) !important;
    font-size: var(--font-size-base) !important;
    min-height: 48px;
    touch-action: manipulation;
    border-radius: 4px;
  }
}

/* ==========================================================================
   MOBILE-ONLY PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* Reduce animations for performance */
  .text-glitch,
  .typewriter,
  .letter-dance {
    animation: none !important;
  }

  /* Simplified hover states for touch */
  .gallery-item-type:hover {
    transform: none !important;
  }

  .nav-link:hover::after {
    animation: none !important;
  }

  /* Optimize background attachments */
  * {
    background-attachment: scroll !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

@media (max-width: 768px) {
  /* Touch target sizes */
  .nav-link,
  .social-link-type,
  .menu-toggle,
  .form-button-type {
    min-height: 44px;
    min-width: 44px;
  }

  /* Focus indicators for touch */
  .nav-link:focus,
  .form-button-type:focus,
  input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
  }

  /* Readable text sizes */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* Prevent zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"] {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY MICRO-INTERACTIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* Touch feedback */
  .menu-toggle:active,
  .form-button-type:active,
  .nav-link:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Mobile-friendly card interactions */
  .gallery-item-type:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

/* ==========================================================================
   MOBILE-ONLY RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 480px) {
  /* Extra small screens */
  .container {
    padding: 0 var(--space-md);
  }

  .hero-title-massive {
    font-size: clamp(
      var(--font-size-3xl),
      10vw,
      var(--font-size-5xl)
    ) !important;
  }

  .text-display {
    font-size: clamp(var(--font-size-lg), 5vw, var(--font-size-2xl)) !important;
  }

  .purchase-section {
    padding: var(--space-lg) !important;
    margin: 0 0 var(--space-3xl) !important;
  }
}

/* ==========================================================================
   MOBILE-ONLY DARK MODE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 768px) {
  /* Enhanced header contrast for mobile dark mode */
  [data-theme="dark"] .header {
    background: var(--color-surface-overlay);
    backdrop-filter: blur(20px);
    border-bottom-color: var(--color-border);
  }

  /* Mobile navigation dark mode improvements */
  [data-theme="dark"] .nav-list {
    background: var(--color-surface);
    opacity: 0.98; /* Better readability than 0.85 */
  }

  /* Form inputs dark mode mobile optimization */
  [data-theme="dark"] .purchase-section input[type="text"],
  [data-theme="dark"] .purchase-section input[type="email"],
  [data-theme="dark"] .purchase-section input[type="tel"],
  [data-theme="dark"] .purchase-section input[type="number"] {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-primary);
  }

  [data-theme="dark"] .purchase-section input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px var(--color-info-light);
  }

  /* Mobile button dark mode optimization */
  [data-theme="dark"] .form-button-type {
    background: var(--color-text-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-text-primary);
  }

  [data-theme="dark"] .form-button-type:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
  }

  /* Mobile card components dark mode */
  [data-theme="dark"] .purchase-section {
    background: var(--color-surface);
    border-color: var(--color-border);
  }

  /* Gallery mobile dark mode optimizations */
  [data-theme="dark"] .gallery-item-type {
    background: var(--color-surface);
    border-color: var(--color-border);
  }

  [data-theme="dark"] .gallery-item-type:hover {
    box-shadow: var(--shadow-lg);
  }

  /* Mobile hero dark mode improvements */
  [data-theme="dark"] .hero-typographic {
    background: var(--color-background);
  }

  /* Touch feedback dark mode adjustments */
  [data-theme="dark"] .menu-toggle:active,
  [data-theme="dark"] .form-button-type:active,
  [data-theme="dark"] .nav-link:active {
    background: var(--color-surface-elevated);
  }

  [data-theme="dark"] .gallery-item-type:active {
    background: var(--color-surface-elevated);
  }

  /* Mobile accessibility - better contrast for focus states */
  [data-theme="dark"] .nav-link:focus,
  [data-theme="dark"] .form-button-type:focus,
  [data-theme="dark"] input:focus {
    outline-color: var(--color-blue);
    box-shadow: 0 0 0 4px var(--color-info-light);
  }

  /* Mobile pricing dark mode */
  [data-theme="dark"] .pricing-grid {
    background: var(--color-background);
  }

  [data-theme="dark"] .day-passes,
  [data-theme="dark"] .individual-items {
    background: var(--color-surface);
  }
}

/* Extra small screens dark mode */
@media (max-width: 480px) {
  [data-theme="dark"] .container {
    background: var(--color-background);
  }

  [data-theme="dark"] .purchase-section {
    background: var(--color-surface);
    box-shadow: 0 2px 10px var(--shadow-color-light);
  }

  /* Mobile typography dark mode refinements */
  [data-theme="dark"] .hero-title-massive {
    color: var(--color-text-primary);
    text-shadow: none; /* Remove any light mode text shadows */
  }

  [data-theme="dark"] .text-display {
    color: var(--color-text-primary);
  }
}

/* ==========================================================================
   MOBILE-ONLY DEBUG HELPERS (Remove in production)
   ========================================================================== */

@media (max-width: 768px) {
  /* Uncomment for mobile debugging */
  /*
  .container {
    outline: 1px solid red;
  }
  
  .section-typographic {
    outline: 1px solid blue;
  }
  */
}


/* ========================================
 * css/mobile-enhancements.css
 * ======================================== */

/**
 * Mobile UI Enhancements - Phase 2 & 3
 * Comprehensive mobile-first improvements for better UX
 */

/* ============================================
   Phase 2: Visual Feedback for Cart Actions
   ============================================ */

/* Cart item added animation */
@keyframes itemAdded {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.cart-item-added {
  animation: itemAdded 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Quantity change feedback */
@keyframes quantityPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.qty-display.changed {
  animation: quantityPulse 0.3s ease;
}

/* Button press feedback (mobile) */
@media (max-width: 768px) {
  .btn:active,
  .cart-checkout-btn:active,
  .qty-adjust:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* Enhanced ripple effect for buttons */
  .btn,
  .cart-checkout-btn {
    position: relative;
    overflow: hidden;
  }

  .btn::after,
  .cart-checkout-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--color-surface-overlay);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
  }

  .btn:active::after,
  .cart-checkout-btn:active::after {
    width: 300px;
    height: 300px;
  }
}

/* Success feedback for add to cart */
.cart-success-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-success);
  color: var(--color-white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px var(--shadow-color-strong);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-success-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .cart-success-toast {
    bottom: 24px;
    left: var(--space-md);
    right: var(--space-md);
    transform: translateY(100px);
    text-align: center;
  }

  .cart-success-toast.show {
    transform: translateY(0);
  }
}

/* ============================================
   Phase 2: Form Input Mobile Optimization
   ============================================ */

@media (max-width: 768px) {
  /* Larger touch-friendly inputs */
  .form-input,
  .form-textarea,
  .form-select,
  .form-input-type,
  .form-textarea-type,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="url"],
  select,
  textarea {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: var(--space-md);
  }

  /* Larger select dropdowns */
  select {
    background-size: 16px;
    padding-right: var(--space-xl);
  }

  /* Better textarea sizing */
  textarea {
    min-height: 120px;
  }

  /* Form labels larger for readability */
  .form-label,
  .form-label-type {
    font-size: 14px;
    margin-bottom: var(--space-sm);
  }

  /* Better error message visibility */
  .error-message {
    font-size: 14px;
    padding: var(--space-xs) 0;
  }
}

/* ============================================
   Phase 3: Typography Refinements for Mobile
   ============================================ */

@media (max-width: 768px) {
  /* Optimized heading hierarchy */
  h1, .h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
  }

  h2, .h2 {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: var(--space-md);
  }

  h3, .h3 {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    line-height: 1.3;
    margin-bottom: var(--space-sm);
  }

  h4, .h4 {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    line-height: 1.4;
  }

  /* Better body text readability */
  body,
  p {
    font-size: 16px; /* Optimal for mobile reading */
    line-height: 1.6;
  }

  /* Tighter letter spacing on small screens */
  .typographic h1,
  .typographic h2,
  .typographic h3 {
    letter-spacing: 0.02em;
  }
}

@media (max-width: 480px) {
  /* Even more compact for very small screens */
  h1, .h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  h2, .h2 {
    font-size: clamp(1.375rem, 5.5vw, 2rem);
  }
}

/* ============================================
   Phase 3: Spacing Optimization for Mobile
   ============================================ */

@media (max-width: 768px) {
  /* Consistent vertical rhythm */
  section {
    padding: var(--space-2xl) var(--space-md);
  }

  /* Tighter spacing for compact layouts */
  .container {
    padding: 0 var(--space-md);
  }

  /* Better grid gaps */
  .grid {
    gap: var(--space-md);
  }

  /* Card spacing */
  .card {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
  }

  /* List spacing */
  ul, ol {
    padding-left: var(--space-lg);
  }

  li {
    margin-bottom: var(--space-xs);
  }
}

@media (max-width: 480px) {
  /* Even tighter for small screens */
  section {
    padding: var(--space-xl) var(--space-sm);
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .card {
    padding: var(--space-md);
  }
}

/* ============================================
   Phase 3: Loading States for Async Operations
   ============================================ */

/* Button loading state */
.btn-loading,
.cart-checkout-btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after,
.cart-checkout-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--shadow-color-light);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

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

/* Form submission loading */
.form-submitting {
  opacity: 0.7;
  pointer-events: none;
}

.form-submitting .btn,
.form-submitting button[type="submit"] {
  position: relative;
}

.form-submitting .btn::before,
.form-submitting button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--shadow-color-light);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

/* ============================================
   Phase 3: Skeleton Screens
   ============================================ */

/* Skeleton loading animation */
@keyframes skeletonPulse {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-200) 25%,
    var(--color-gray-100) 50%,
    var(--color-gray-200) 75%
  );
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* Skeleton variants */
.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-xs);
  width: 100%;
}

.skeleton-text-short {
  width: 60%;
}

.skeleton-heading {
  height: 32px;
  margin-bottom: var(--space-md);
  width: 80%;
}

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

.skeleton-card {
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.skeleton-button {
  height: 44px;
  width: 120px;
  border-radius: var(--radius-md);
}

/* Gallery skeleton */
.gallery-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.gallery-skeleton-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
}

@media (max-width: 768px) {
  .gallery-skeleton {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-sm);
  }
}

/* Dark mode skeleton support */
[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
}

/* ============================================
   Cuban-Inspired Visual Enhancements for Mobile
   ============================================ */

@media (max-width: 768px) {
  /* Cuban flag-inspired accent borders */
  .accent-border-top {
    border-top: 3px solid transparent;
    border-image: linear-gradient(
      90deg,
      var(--color-blue) 0%,
      var(--color-red) 50%,
      var(--color-blue) 100%
    ) 1;
  }

  /* Subtle Cuban color accents on cards */
  .card-cuban-accent {
    position: relative;
  }

  .card-cuban-accent::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(
      180deg,
      var(--color-blue) 0%,
      var(--color-red) 100%
    );
    border-radius: 4px 0 0 4px;
  }

  /* Cuban-themed section dividers */
  .section-divider-cuban {
    height: 3px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--color-blue) 20%,
      var(--color-red) 50%,
      var(--color-blue) 80%,
      transparent 100%
    );
    margin: var(--space-xl) 0;
  }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .skeleton {
    animation: none;
    background: var(--color-gray-200);
  }
}

/* Hardware acceleration for smooth animations */
.cart-backdrop,
.cart-success-toast {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Cart panel uses translateX() for slide animation, so can't use translateZ() */
.floating-cart-panel {
  will-change: transform;
  backface-visibility: hidden;
}

/* Prevent layout shift during loading */
.btn,
.cart-checkout-btn,
.form-button-type {
  contain: layout;
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

/* Better focus indicators for mobile */
@media (max-width: 768px) {
  *:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
  }

  /* Larger tap targets for links */
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Better checkbox/radio sizing */
  input[type="checkbox"],
  input[type="radio"] {
    min-width: 24px;
    min-height: 24px;
  }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
  .btn,
  .cart-checkout-btn,
  .form-input,
  .form-select {
    border: 2px solid currentColor;
  }

  .skeleton {
    background: var(--color-gray-300);
    animation: none;
  }
}


/* ========================================
 * css/theme-toggle.css
 * ======================================== */

/* A Lo Cubano Boulder Fest - Theme Toggle Component
   Elegant three-button segmented control for theme switching
   Compatible with Cuban salsa festival aesthetic */

/* =================================================================
   THEME TOGGLE DESIGN SYSTEM
   ================================================================= */

:root {
  /* Theme Toggle Specific Variables */
  --theme-toggle-width: 140px;
  --theme-toggle-height: 44px;
  --theme-toggle-padding: 3px;
  --theme-toggle-border-radius: var(--radius-lg);
  --theme-toggle-backdrop-blur: 16px;
  --theme-toggle-shadow: var(--shadow-md);
  --theme-toggle-shadow-active: var(--shadow-lg);
  --theme-toggle-transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Icon sizing */
  --theme-toggle-icon-size: 20px;
  --theme-toggle-button-size: 44px;

  /* Icon filter values as CSS variables for maintainability */
  --theme-toggle-filter-light-default: brightness(0.4);
  --theme-toggle-filter-light-hover: brightness(0.6);
  --theme-toggle-filter-dark-invert: invert(1);
  --theme-toggle-filter-dark-brightness: brightness(0.8);
  --theme-toggle-filter-dark-hover: brightness(1);
  
  /* Colors and opacity for elegance */
  --theme-toggle-bg: rgba(255, 255, 255, 0.85);
  --theme-toggle-bg-active: var(--color-primary);
  --theme-toggle-border: rgba(0, 0, 0, 0.1);
  --theme-toggle-text: var(--color-text-secondary);
  --theme-toggle-text-active: var(--color-white);
  
  /* Positioning */
  --theme-toggle-top: var(--space-lg);
  --theme-toggle-right: var(--space-xl);
  --theme-toggle-z-index: calc(var(--z-fixed) + 10);
  
  /* Warm Cuban-inspired glow */
  --theme-toggle-glow: 0 0 20px rgba(91, 107, 181, 0.3);
  --theme-toggle-glow-active: 0 0 25px rgba(91, 107, 181, 0.4);
}

/* Dark mode theme toggle overrides */
[data-theme="dark"] {
  --theme-toggle-bg: rgba(17, 17, 17, 0.9);
  --theme-toggle-border: rgba(255, 255, 255, 0.15);
  --theme-toggle-text: var(--color-gray-300);
  --theme-toggle-glow: 0 0 20px rgba(204, 41, 54, 0.2);
  --theme-toggle-glow-active: 0 0 25px rgba(204, 41, 54, 0.3);
}

/* System theme support */
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --theme-toggle-bg: rgba(17, 17, 17, 0.9);
    --theme-toggle-border: rgba(255, 255, 255, 0.15);
    --theme-toggle-text: var(--color-gray-300);
    --theme-toggle-glow: 0 0 20px rgba(204, 41, 54, 0.2);
    --theme-toggle-glow-active: 0 0 25px rgba(204, 41, 54, 0.3);
  }
}

/* =================================================================
   THEME TOGGLE CONTAINER
   ================================================================= */

.theme-toggle {
  position: fixed;
  top: var(--theme-toggle-top);
  right: var(--theme-toggle-right);
  z-index: var(--theme-toggle-z-index);

  /* Minimal container - just for positioning */
  display: inline-flex;
  gap: var(--space-md);

  /* Remove all container styling */
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  /* Smooth transitions */
  transition: var(--theme-toggle-transition);

  /* Accessibility */
  user-select: none;
}

/* =================================================================
   THEME TOGGLE BUTTONS
   ================================================================= */

.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;

  /* Sizing for touch targets */
  min-width: var(--theme-toggle-button-size);
  height: var(--theme-toggle-button-size);

  /* No background or border - just the icon */
  background: transparent;
  border: none;
  padding: 0;

  /* Typography */
  color: var(--theme-toggle-text);
  font-family: var(--font-sans);

  /* Smooth interactions */
  cursor: pointer;
  transition: var(--theme-toggle-transition);

  /* Touch optimization */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;

  /* Icon container properties */
  position: relative;
}

.theme-option:focus {
  outline: none;
  /* Add subtle opacity change for accessibility */
  opacity: 0.8;
}

.theme-option:focus-visible {
  /* Show very subtle outline only for keyboard navigation */
  outline: none;
  /* Use opacity change instead of outline for cleaner look */
  opacity: 0.7;
}

.theme-option:hover {
  /* Scale up icon slightly on hover */
  transform: scale(1.1);
}

[data-theme="dark"] .theme-option:hover {
  /* Scale up icon slightly on hover */
  transform: scale(1.1);
}

/* =================================================================
   ACTIVE STATE STYLING
   ================================================================= */

/* Visible selected state for accessibility and user feedback */
.theme-option.active {
  /* Add visual distinction for selected option */
  background-color: var(--color-primary-hover);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 2px var(--color-primary);
  transform: scale(1.05);
}

.theme-option.active::before {
  /* Make active icon more prominent */
  filter: var(--theme-toggle-filter-light-default) !important;
  opacity: 1;
}

[data-theme="dark"] .theme-option.active {
  /* Dark mode active state */
  background-color: rgba(91, 107, 181, 0.2);
  box-shadow: 0 0 0 2px var(--color-blue);
}

[data-theme="dark"] .theme-option.active::before {
  /* Dark mode active icon */
  filter: var(--theme-toggle-filter-dark-invert) var(--theme-toggle-filter-dark-hover) !important;
}

/* =================================================================
   SVG ICONS - EMBEDDED FOR PERFORMANCE
   ================================================================= */

.theme-option svg {
  width: var(--theme-toggle-icon-size);
  height: var(--theme-toggle-icon-size);
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
  transition: var(--theme-toggle-transition);
}

/* System Theme Icon (Monitor/Computer) */
.theme-option[data-theme="system"] svg {
  /* Custom monitor icon - clean and recognizable */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='3' width='20' height='14' rx='2' ry='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Light Theme Icon (Sun) */
.theme-option[data-theme="light"] svg {
  /* Custom sun icon with rays */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Dark Theme Icon (Moon Crescent) */
.theme-option[data-theme="dark"] svg {
  /* Custom moon icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Alternative approach using pseudo-elements for better control */
.theme-option::before {
  content: '';
  width: var(--theme-toggle-icon-size);
  height: var(--theme-toggle-icon-size);
  display: block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: none;
  transition: var(--theme-toggle-transition);
}

/* System icon - monitor/computer */
.theme-option[data-theme="system"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='1.5'%3E%3Crect x='2' y='3' width='20' height='14' rx='2' ry='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E");
}

/* Light icon - sun with black stroke for light mode visibility */
.theme-option[data-theme="light"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.5'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
  filter: var(--theme-toggle-filter-light-default);
}

/* Dark icon - moon with black stroke for light mode visibility */
.theme-option[data-theme="dark"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='1.5'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
  filter: var(--theme-toggle-filter-light-default);
}

/* Dark theme icon adjustments - invert black to white */
[data-theme="dark"] .theme-option[data-theme="light"]::before,
[data-theme="dark"] .theme-option[data-theme="dark"]::before {
  filter: var(--theme-toggle-filter-dark-invert) var(--theme-toggle-filter-dark-brightness);
}

/* Active state icon colors */
/* Active state icon colors removed - icons remain the same color */

/* Hover state icon brightness */
.theme-option:hover::before {
  /* Increase brightness on hover in light mode */
  filter: var(--theme-toggle-filter-light-hover);
}

[data-theme="dark"] .theme-option:hover::before {
  /* Maintain invert and increase brightness in dark mode */
  filter: var(--theme-toggle-filter-dark-invert) var(--theme-toggle-filter-dark-hover);
}

/* SVG elements are handled via pseudo-elements */
.theme-option svg {
  /* Keep SVG in DOM for accessibility but visually hide via size */
  width: 0;
  height: 0;
  overflow: hidden;
}

/* =================================================================
   MOBILE RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 768px) {
  .theme-toggle {
    /* Move to top-left on mobile to avoid hamburger menu conflict */
    top: var(--space-md);
    left: var(--space-md);
    right: auto;

    /* Stack horizontally to save vertical space */
    flex-direction: row;
    gap: var(--space-sm);

    /* Maintain same size for touch targets */
    width: auto;
    height: var(--theme-toggle-height);

    /* Ensure it doesn't interfere with mobile menu */
    z-index: calc(var(--z-fixed) + 5);
  }

  /* Ensure buttons maintain 44px minimum touch target */
  .theme-option {
    min-width: var(--theme-toggle-button-size);
    min-height: var(--theme-toggle-button-size);
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    /* Keep on left side for small screens */
    left: var(--space-sm);
    top: var(--space-sm);

    /* Maintain horizontal layout */
    width: auto;
    height: var(--theme-toggle-height);
  }

  .theme-option {
    /* Maintain 44px minimum even on small screens */
    min-width: var(--theme-toggle-button-size);
    min-height: var(--theme-toggle-button-size);
  }

  .theme-option::before {
    /* Slightly smaller icons on mobile */
    width: 18px;
    height: 18px;
  }
}

/* =================================================================
   HIGH CONTRAST MODE SUPPORT
   ================================================================= */

@media (prefers-contrast: high) {
  .theme-toggle {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .theme-option {
    color: var(--color-text-primary);
    border: none;
  }

  /* Active state removed for high contrast mode */

  .theme-option:focus {
    border: none;
    outline: none;
  }
}

/* =================================================================
   REDUCED MOTION ACCESSIBILITY
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-option,
  .theme-option::before {
    transition: none;
    animation: none;
  }
  
  .theme-toggle:hover {
    transform: none;
  }
  
  .theme-option:hover {
    transform: none;
  }
  
  /* Active state removed */
}

/* =================================================================
   INTEGRATION WITH NAVIGATION HEADER
   ================================================================= */

/* Ensure theme toggle doesn't interfere with navigation */
@media (min-width: 769px) {
  /* Adjust header grid to accommodate theme toggle */
  .typographic .header .grid {
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: var(--space-lg);
  }
  
  /* Add a specific area for theme toggle in header if needed */
  .header-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
  }
}

/* =================================================================
   ANIMATION FOR THEME TRANSITIONS
   ================================================================= */

/* Subtle animation when theme changes */
@keyframes themeTransition {
  0% {
    opacity: 0.8;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Apply animation to the entire toggle when theme changes */
.theme-toggle.theme-changing {
  animation: themeTransition 0.3s ease-out;
}

/* =================================================================
   PERFORMANCE OPTIMIZATIONS
   ================================================================= */

/* GPU acceleration for smooth animations - Applied conditionally */
.theme-toggle {
  transform: translateZ(0); /* Force GPU layer */
  /* will-change applied only during interactions */
}

.theme-option {
  transform: translateZ(0); /* Force GPU layer */
  /* will-change applied only during hover/active states */
}

.theme-option::before {
  transform: translateZ(0); /* Force GPU layer */
}

/* Apply will-change only during interactions for better performance */
.theme-toggle:hover {
  will-change: transform;
}

.theme-option:hover,
.theme-option:active,
.theme-option:focus {
  will-change: transform, background-color, color;
}

.theme-option:hover::before {
  will-change: transform, filter;
}

/* Cleanup will-change after interactions to free GPU memory */
.theme-toggle:not(:hover) {
  will-change: auto;
}

.theme-option:not(:hover):not(:active):not(:focus) {
  will-change: auto;
}

/* CSS Containment for better performance */
.theme-toggle {
  contain: layout style;
}

.theme-option {
  contain: layout;
}

/* =================================================================
   SCREEN READER ACCESSIBILITY
   ================================================================= */

/* Hidden labels for screen readers */
.theme-option .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible improvements */
.theme-option:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: none;
}

/* =================================================================
   CUBAN FESTIVAL THEMING TOUCHES
   ================================================================= */

/* Subtle warmth and festival spirit are integrated into main .theme-toggle rule above */

/* Festive glow active state removed */

/* Festive glow removed for cleaner appearance */

/* =================================================================
   FOOTER THEME TOGGLE POSITIONING
   ================================================================= */

/* Footer-specific positioning for theme toggle */
.footer-theme-toggle .theme-toggle {
  /* Override fixed positioning for footer placement */
  position: relative;
  top: auto;
  right: auto;
  
  /* No margin needed - positioning handled by container */
  margin: 0;
  display: flex;
  
  /* Seamless integration - remove container styling */
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  
  /* Adjust z-index for footer context */
  z-index: var(--z-base);
}

/* Position theme toggle in bottom-right of footer */
.footer-theme-toggle {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
}

/* Mobile adjustments for footer theme toggle */
@media (max-width: 768px) {
  .footer-theme-toggle {
    bottom: var(--space-md);
    right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .footer-theme-toggle {
    bottom: var(--space-sm);
    right: var(--space-sm);
  }
  
  .footer-theme-toggle .theme-toggle {
    width: calc(var(--theme-toggle-width) - 10px);
  }
}

/* =================================================================
   FOOTER THEME TOGGLE HOVER STATES
   ================================================================= */

/* Remove container hover effects for seamless integration */
.footer-theme-toggle .theme-toggle:hover {
  transform: none;
  box-shadow: none;
}

/* Enhanced button hover states for footer context */
.footer-theme-toggle .theme-option:hover {
  /* Very subtle hover feedback */
  opacity: 0.7;
}

/* Dark theme footer hover adjustments */
[data-theme="dark"] .footer-theme-toggle .theme-option:hover {
  opacity: 0.7;
}

/* Focus states for accessibility in footer */
.footer-theme-toggle .theme-option:focus {
  outline: none;
  outline-offset: 0;
}

/* Enhanced icon visibility for footer context - show all three icons */
.footer-theme-toggle .theme-option[data-theme="system"] {
  /* Show system icon in footer for consistency */
  display: flex;
}

.footer-theme-toggle .theme-option[data-theme="light"]::before {
  /* Sun icon using same style as main toggle */
  filter: var(--theme-toggle-filter-light-hover);
}

.footer-theme-toggle .theme-option[data-theme="dark"]::before {
  /* Moon icon using same style as main toggle */
  filter: var(--theme-toggle-filter-light-hover);
}

/* Dark theme footer icon adjustments */
[data-theme="dark"] .footer-theme-toggle .theme-option[data-theme="light"]::before,
[data-theme="dark"] .footer-theme-toggle .theme-option[data-theme="dark"]::before {
  filter: var(--theme-toggle-filter-dark-invert) brightness(0.7);
}

/* Hover state for footer icons */
.footer-theme-toggle .theme-option:hover::before {
  /* Subtle brightness increase */
  filter: brightness(1.2);
}

/* Make footer toggle completely seamless */
.footer-theme-toggle .theme-toggle {
  /* Remove all padding for minimal footprint */
  padding: 0;
  width: auto;
  gap: var(--space-md);
}

.footer-theme-toggle .theme-option {
  /* Make buttons completely transparent */
  background: transparent !important;
  border: none !important;
  padding: var(--space-xs);
}

/* Active state brightness removed */

/* ========================================
 * css/forms.css
 * ======================================== */

/* Forms Module - Consolidated from typography.css and components.css */

/* Form Components - Base Styles */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-input-border);
  background-color: var(--color-input-bg);
  color: var(--color-input-text);
  font-size: var(--font-size-base);
  transition: all var(--transition-base);
}

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

.form-input.error,
.form-textarea.error,
.form-select.error {
  border-color: var(--color-error);
}

.error-message {
  display: block;
  color: var(--color-error);
  font-size: var(--font-size-sm);
  margin-top: var(--space-xs);
}

.form-success {
  background-color: var(--color-success-light);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  margin-top: var(--space-lg);
  text-align: center;
  color: var(--color-success);
}

/* Typographic Form Styles */
.form-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.form-grid-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.form-group-type {
  margin-bottom: var(--space-xl);
}

.form-label-type {
  display: block;
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.form-input-type,
.form-textarea-type {
  width: 100%;
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  color: var(--color-input-text);
  transition: border-color 0.2s ease;
}

.form-input-type:focus,
.form-textarea-type:focus {
  outline: none;
  border-color: var(--color-text-primary);
}

/* Volunteer Form Specific */
.volunteer-form-typographic {
  max-width: 600px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: var(--space-3xl);
  border: 2px solid var(--color-text-primary);
}

.checkbox-group-type {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.checkbox-type {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}

.checkbox-type input {
  margin-right: var(--space-sm);
}

/* Button Components - Mobile-First Design */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-sm);
  border: 2px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  /* Mobile-first: Ensure minimum touch target */
  min-height: 44px;
  min-width: 44px;
  /* Better tap feedback on mobile */
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  /* Prevent text selection on double-tap */
  user-select: none;
  -webkit-user-select: none;
}

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

.btn-primary:hover {
  background-color: var(--color-white);
  color: var(--color-blue);
  border-color: var(--color-blue);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

.btn-secondary:hover {
  background-color: var(--color-text-primary);
  color: var(--color-text-inverse);
}

.btn-accent {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn-accent:hover {
  background-color: var(--color-surface);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* Typographic Button Styles */
.form-button-type {
  position: relative;
  overflow: hidden;
  background: var(--color-black) !important;
  color: var(--color-white) !important;
  border: 2px solid var(--color-black);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-code);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* Dark mode specific styling for form button */
[data-theme="dark"] .form-button-type {
  background: var(--color-blue) !important;
  color: var(--color-white) !important;
  border-color: var(--color-blue);
}

.form-button-type::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-secondary);
  transition: left 0.3s ease;
  z-index: -1;
}

.form-button-type:hover {
  color: var(--color-white) !important;
  transform: translateY(-2px);
  background: var(--color-blue) !important;
}

[data-theme="dark"] .form-button-type:hover {
  background: var(--color-red) !important;
  color: var(--color-white) !important;
}

.form-button-type:hover::before {
  left: 0;
}

.volunteer-submit {
  width: 100%;
  background: var(--color-text-primary);
  color: var(--color-text-inverse);
}

.volunteer-submit:hover {
  background: var(--color-secondary);
}

/* Form Responsive Design */
@media (max-width: 768px) {
  .form-grid-type {
    grid-template-columns: 1fr;
  }

  .volunteer-form-typographic {
    padding: var(--space-xl);
  }
}

/* Form Accessibility */
.form-input:invalid,
.form-textarea:invalid,
.form-select:invalid {
  border-color: var(--color-error);
}

.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"],
.form-select[aria-invalid="true"] {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px var(--color-error-light);
}

/* Custom Form Elements */
.custom-checkbox {
  position: relative;
  display: inline-block;
  cursor: pointer;
  padding-left: 25px;
  margin-bottom: 12px;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  transition: all var(--transition-base);
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--color-primary);
}

.custom-checkbox input:checked ~ .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.custom-checkbox .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.custom-checkbox .checkmark:after {
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid var(--color-white);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Donation Form Layout */
.donation-form-container {
  max-width: min(700px, 100%);
  padding: 0 var(--space-md);
}

.donation-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .donation-form-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Placeholder Styles - Improved Contrast for Accessibility */
.form-input::placeholder,
.form-textarea::placeholder,
.form-select::placeholder,
.form-input-type::placeholder,
.form-textarea-type::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="search"]::placeholder,
input[type="date"]::placeholder,
input[type="time"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
  color: var(--color-input-placeholder);
  opacity: 0.9;
}

/* Firefox placeholder styles */
.form-input::-moz-placeholder,
.form-textarea::-moz-placeholder,
.form-select::-moz-placeholder,
.form-input-type::-moz-placeholder,
.form-textarea-type::-moz-placeholder,
input[type="text"]::-moz-placeholder,
input[type="email"]::-moz-placeholder,
input[type="password"]::-moz-placeholder,
input[type="number"]::-moz-placeholder,
input[type="tel"]::-moz-placeholder,
input[type="search"]::-moz-placeholder,
input[type="date"]::-moz-placeholder,
input[type="time"]::-moz-placeholder,
input[type="url"]::-moz-placeholder,
textarea::-moz-placeholder {
  color: var(--color-input-placeholder);
  opacity: 0.9;
}

/* Webkit placeholder styles */
.form-input::-webkit-input-placeholder,
.form-textarea::-webkit-input-placeholder,
.form-select::-webkit-input-placeholder,
.form-input-type::-webkit-input-placeholder,
.form-textarea-type::-webkit-input-placeholder,
input[type="text"]::-webkit-input-placeholder,
input[type="email"]::-webkit-input-placeholder,
input[type="password"]::-webkit-input-placeholder,
input[type="number"]::-webkit-input-placeholder,
input[type="tel"]::-webkit-input-placeholder,
input[type="search"]::-webkit-input-placeholder,
input[type="date"]::-webkit-input-placeholder,
input[type="time"]::-webkit-input-placeholder,
input[type="url"]::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: var(--color-input-placeholder);
  opacity: 0.9;
}

/* Dark mode placeholder styles for better visibility */
[data-theme="dark"] .form-input::placeholder,
[data-theme="dark"] .form-textarea::placeholder,
[data-theme="dark"] .form-select::placeholder,
[data-theme="dark"] .form-input-type::placeholder,
[data-theme="dark"] .form-textarea-type::placeholder,
[data-theme="dark"] input[type="text"]::placeholder,
[data-theme="dark"] input[type="email"]::placeholder,
[data-theme="dark"] input[type="password"]::placeholder,
[data-theme="dark"] input[type="number"]::placeholder,
[data-theme="dark"] input[type="tel"]::placeholder,
[data-theme="dark"] input[type="search"]::placeholder,
[data-theme="dark"] input[type="date"]::placeholder,
[data-theme="dark"] input[type="time"]::placeholder,
[data-theme="dark"] input[type="url"]::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--color-input-placeholder);
  opacity: 1;
}

/* Disabled State Styles */
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled,
.form-input-type:disabled,
.form-textarea-type:disabled,
input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="number"]:disabled,
input[type="tel"]:disabled,
input[type="date"]:disabled,
input[type="time"]:disabled,
input[type="url"]:disabled,
select:disabled,
textarea:disabled {
  background-color: var(--color-background-secondary);
  color: var(--color-text-muted);
  border-color: var(--color-border-light);
  opacity: 0.6;
  cursor: not-allowed;
}

/* Disabled labels */
.form-group:has(:disabled) .form-label,
.form-group:has(:disabled) .form-label-type {
  color: var(--color-text-muted);
  opacity: 0.8;
}

/* Disabled buttons */
.btn:disabled,
.form-button-type:disabled,
.volunteer-submit:disabled,
button:disabled {
  background-color: var(--color-background-secondary);
  color: var(--color-text-muted);
  border-color: var(--color-border-light);
  cursor: not-allowed;
  opacity: 0.6;
}

.btn:disabled:hover,
.form-button-type:disabled:hover,
.volunteer-submit:disabled:hover,
button:disabled:hover {
  background-color: var(--color-background-secondary);
  transform: none;
  box-shadow: none;
}

.form-button-type:disabled::before {
  display: none;
}

/* Disabled checkboxes and radios */
input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

input[type="checkbox"]:disabled + label,
input[type="radio"]:disabled + label,
.checkbox-type:has(input:disabled),
.custom-checkbox:has(input:disabled) {
  color: var(--color-text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.custom-checkbox:has(input:disabled) .checkmark {
  background-color: var(--color-background-secondary);
  border-color: var(--color-border-light);
  opacity: 0.6;
}

.custom-checkbox:has(input:disabled):hover .checkmark {
  border-color: var(--color-border-light);
}

/* Disabled form groups */
.form-group:has(:disabled),
.form-group-type:has(:disabled) {
  opacity: 0.8;
}

/* Enhanced Form Input Dark Mode Compatibility
 * Ensures all form input types use the new CSS variables for consistent theming */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="url"],
select,
textarea {
  background-color: var(--color-input-bg);
  color: var(--color-input-text);
  border-color: var(--color-input-border);
}

/* Focus states for enhanced accessibility */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-info-light);
}

/* Dark mode focus states */
[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="email"]:focus,
[data-theme="dark"] input[type="password"]:focus,
[data-theme="dark"] input[type="number"]:focus,
[data-theme="dark"] input[type="tel"]:focus,
[data-theme="dark"] input[type="search"]:focus,
[data-theme="dark"] input[type="date"]:focus,
[data-theme="dark"] input[type="time"]:focus,
[data-theme="dark"] input[type="url"]:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 3px rgba(91, 107, 181, 0.3);
}


/* ========================================
 * css/newsletter.css
 * ======================================== */

/* Newsletter Signup Component */
.contact-newsletter {
  background: var(--color-white);
  border-left-color: var(--color-blue);
  position: relative;
  overflow: hidden;
  grid-column: 1 / -1; /* Span all columns */
  max-width: 900px; /* Three times the typical width */
  margin: 0 auto; /* Center horizontally */
  justify-self: center; /* Center within grid */
}

.newsletter-form-type {
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.newsletter-input-wrapper {
  display: flex;
  gap: 0;
  border: 2px solid var(--color-black);
  background: var(--color-white);
  transition: all var(--transition-base);
  position: relative;
}

.newsletter-input-wrapper:focus-within {
  box-shadow: 0 0 0 3px var(--shadow-color-light);
  transform: translateY(-2px);
}

.newsletter-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-code);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.newsletter-input:focus {
  outline: none;
  border-color: transparent;
}

.newsletter-input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.newsletter-submit {
  position: relative;
  border: none;
  border-left: 2px solid var(--color-blue);
  padding: var(--space-md) var(--space-lg);
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background: var(--color-blue);
  color: var(--color-white);
  cursor: pointer;
  transition: all var(--transition-base);
}

.newsletter-submit:disabled,
.form-button-type.newsletter-submit:disabled {
  background: var(--color-border-medium) !important;
  border-left-color: var(--color-border-medium) !important;
  color: var(--color-text-disabled, var(--color-black)) !important;  /* Semantic disabled text color with fallback */
  cursor: not-allowed !important;
  opacity: 1 !important;  /* Full opacity for better readability */
}

.newsletter-submit .button-icon {
  font-size: var(--font-size-lg);
}

/* Override all hover effects for newsletter submit button */
.newsletter-submit:hover {
  background: var(--color-blue) !important;
  transform: none !important;
  border-color: var(--color-blue) !important;
  color: var(--color-white) !important;
}

.newsletter-submit:disabled:hover,
.form-button-type.newsletter-submit:disabled:hover {
  background: var(--color-border-medium) !important;
  transform: none !important;
  border-left-color: var(--color-border-medium) !important;
  color: var(--color-text-disabled, var(--color-black)) !important;  /* Maintain semantic disabled text color on hover */
}

.newsletter-submit:hover::before {
  left: -100% !important; /* Hide any sliding background animations */
}

/* Consent Checkbox */
.newsletter-consent {
  margin-top: var(--space-md);
}

.newsletter-consent .checkbox-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Error States */
.newsletter-input[aria-invalid="true"] {
  color: var(--color-error);
}

.newsletter-input-wrapper.error {
  border-color: var(--color-error);
}

.error-message:not(:empty) {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-sans);
  animation: slideDown var(--transition-base) ease-out;
}

/* Success State */
.newsletter-success {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-background-secondary);
  border: 1px solid var(--color-border-medium);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.newsletter-success[aria-hidden="false"] {
  display: flex;
  animation: fadeIn var(--transition-slow) ease-out;
}

.newsletter-success .success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: bold;
}

/* Loading State */
.newsletter-submit[aria-busy="true"] {
  pointer-events: none;
  opacity: 0.7;
}

.newsletter-submit[aria-busy="true"] .button-text {
  opacity: 0;
}

.newsletter-submit[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-white);
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .newsletter-input-wrapper {
    flex-direction: column;
  }

  .newsletter-submit {
    border-left: none;
    border-top: 2px solid var(--color-black);
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .newsletter-submit:disabled {
    border-top-color: var(--color-border-medium);
  }

  .newsletter-input {
    text-align: center;
    font-size: 16px; /* Prevent iOS zoom */
    min-height: 48px;
  }

  .newsletter-consent .checkbox-label {
    font-size: var(--font-size-xs);
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .newsletter-input-wrapper {
    border-width: 3px;
  }

  .newsletter-submit {
    border-left-width: 3px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .newsletter-submit .button-icon,
  .newsletter-submit[aria-busy="true"]::after {
    transition: none;
    animation: none;
  }
}

/* ==========================================================================
   POPUP NOTIFICATION STYLES
   ========================================================================== */

.newsletter-popup {
  position: fixed;
  bottom: var(--space-lg, 20px);
  right: var(--space-lg, 20px);
  max-width: 400px;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-white);
  border: 2px solid var(--color-black);
  box-shadow: 4px 4px 0 0 var(--color-black);
  z-index: var(--z-index-toast, 10000);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  opacity: 0;
  transform: translateY(var(--space-lg, 20px));
  transition: opacity var(--transition-base), transform var(--transition-base);
  font-family: var(--font-sans);
}

.newsletter-popup--visible {
  opacity: 1;
  transform: translateY(0);
}

.newsletter-popup__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  font-weight: bold;
  font-size: var(--font-size-sm);
}

.newsletter-popup--success .newsletter-popup__icon {
  background: var(--color-success);
  color: var(--color-white);
}

.newsletter-popup--error .newsletter-popup__icon {
  background: var(--color-error);
  color: var(--color-white);
}

.newsletter-popup__message {
  flex: 1;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.newsletter-popup__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.newsletter-popup__close:hover {
  opacity: 1;
}

.newsletter-popup__close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  opacity: 1;
}

/* Dark mode popup styles */
[data-theme="dark"] .newsletter-popup {
  background: var(--color-surface);
  border-color: var(--color-border-medium);
  box-shadow: 4px 4px 0 0 var(--color-border-medium);
}

[data-theme="dark"] .newsletter-popup__message {
  color: var(--color-text-primary);
}

[data-theme="dark"] .newsletter-popup__close {
  color: var(--color-text-secondary);
}

/* Mobile responsive popup */
@media (max-width: 768px) {
  .newsletter-popup {
    bottom: var(--space-sm, 10px);
    left: var(--space-sm, 10px);
    right: var(--space-sm, 10px);
    max-width: none;
  }
}

/* Reduced motion support for popup animations */
@media (prefers-reduced-motion: reduce) {
  .newsletter-popup {
    transition: none;
  }

  .newsletter-popup--visible {
    transform: none;
  }
}

/* ==========================================================================
   DARK MODE ENHANCEMENTS
   ========================================================================== */

/* Newsletter component dark mode support */
[data-theme="dark"] .contact-newsletter {
  background: var(--color-surface);
  border-left-color: var(--color-blue);
}

[data-theme="dark"] .newsletter-input-wrapper {
  border-color: var(--color-border-medium);
  background: var(--color-surface);
}

[data-theme="dark"] .newsletter-input-wrapper:focus-within {
  box-shadow: 0 0 0 3px var(--shadow-color-light);
  border-color: var(--color-blue);
}

[data-theme="dark"] .newsletter-input {
  color: var(--color-text-primary);
  background: transparent;
}

[data-theme="dark"] .newsletter-input::placeholder {
  color: var(--color-text-muted);
}

[data-theme="dark"] .newsletter-submit {
  background: var(--color-blue);
  border-left-color: var(--color-blue);
  color: var(--color-text-inverse);
}

[data-theme="dark"] .newsletter-submit:disabled,
[data-theme="dark"] .form-button-type.newsletter-submit:disabled {
  background: var(--color-border-medium) !important;
  border-left-color: var(--color-border-medium) !important;
  color: var(--color-text-disabled-inverse, var(--color-white)) !important;  /* Semantic disabled text color for dark mode with fallback */
}

[data-theme="dark"] .newsletter-submit:disabled:hover,
[data-theme="dark"] .form-button-type.newsletter-submit:disabled:hover {
  background: var(--color-border-medium) !important;
  border-left-color: var(--color-border-medium) !important;
  color: var(--color-text-disabled-inverse, var(--color-white)) !important;  /* Maintain semantic disabled text color on hover in dark mode */
}

/* Enhanced error state visibility in dark mode */
[data-theme="dark"] .newsletter-input[aria-invalid="true"] {
  color: var(--color-error);
}

[data-theme="dark"] .newsletter-input-wrapper.error {
  border-color: var(--color-error);
  background: var(--color-error-light);
}

/* Success state visibility in dark mode */
[data-theme="dark"] .newsletter-success {
  background: var(--color-success-light);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

[data-theme="dark"] .newsletter-success .success-icon {
  background: var(--color-success);
  color: var(--color-white);
}

/* Consent checkbox styling in dark mode */
[data-theme="dark"] .newsletter-consent .checkbox-label {
  color: var(--color-text-secondary);
}

/* Loading spinner visibility in dark mode */
[data-theme="dark"] .newsletter-submit[aria-busy="true"]::after {
  border-color: var(--color-text-inverse);
  border-right-color: transparent;
}

/* Mobile responsive dark mode adjustments */
@media (max-width: 768px) {
  [data-theme="dark"] .newsletter-submit {
    border-top-color: var(--color-blue);
    border-left: none;
  }
  
  [data-theme="dark"] .newsletter-submit:disabled {
    border-top-color: var(--color-border-medium);
  }
}


/* ========================================
 * css/flip-cards.css
 * ======================================== */

/**
 * Flip Card Styles for Tickets Page
 * Implements side-by-side layout with click-to-flip functionality
 */

/* Grid layout for side-by-side tickets */
.ticket-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl, 4rem);
  max-width: 800px;
  margin: 0 auto var(--space-4xl, 3rem) auto;
  /* Allow overflow for hover animations */
  overflow: visible;
  /* Add padding to prevent clipping on hover */
  padding: 10px 0;
}

/* Mobile responsive - stack cards vertically */
@media (max-width: 768px) {
  .ticket-options-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg, 1.5rem);
  }

  /* Maintain sufficient height on mobile for vertical design */
  .flip-card {
    height: 560px; /* Match desktop height for consistency */
  }
}

/* Flip card container */
.flip-card {
  background-color: transparent;
  width: 100%;
  height: 560px; /* Increased to accommodate hover animation (520px ticket + 20px padding top/bottom) */
  cursor: pointer;
  /* Contain the 2D transformation - removed perspective for simpler flip */
  isolation: isolate;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  /* Add padding to prevent hover cutoff */
  padding: 10px 0;
  box-sizing: border-box;
}

/* Inner container that does the flipping */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  -webkit-transition: -webkit-transform 0.6s;
  -moz-transition: -moz-transform 0.6s;
  transition: transform 0.6s;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  border-radius: 12px;
  /* Force GPU rendering to prevent artifacts */
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

/* Flip when active */
.flip-card.flipped .flip-card-inner {
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

/* Position front and back */
.flip-card-front, .flip-card-back {
  position: absolute;
  top: 10px;  /* Account for padding */
  left: 0;  /* Align both faces to the same left edge */
  right: 0;  /* Use left: 0 and right: 0 with margin: auto for perfect centering */
  margin: 0 auto;  /* Center horizontally */
  width: 95%;  /* Reduced from 100% to prevent edge bleeding */
  height: calc(100% - 20px);  /* Account for top and bottom padding */
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow-sm);
  transition: all 0.3s ease;
  /* Use visible overflow to allow ribbon, but card background clips via border-radius */
  overflow: visible;
  /* Ensure consistent box model */
  box-sizing: border-box;
}

/* Front face specific styles */
.flip-card-front {
  background: var(--color-card-bg);
  border: 2px solid var(--color-border);
  /* Simple rotation without 3D depth */
  -webkit-transform: rotateY(0deg);
  -moz-transform: rotateY(0deg);
  transform: rotateY(0deg);
  z-index: 2;
}

/* Back face should be rotated 180 degrees */
.flip-card-back {
  /* Rotate without scaling since both faces are now 95% width */
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
  color: var(--color-white);
  /* Remove flex centering - use same layout as front */
  padding: 0;
  display: block;
  /* Ensure back is visible when flipped */
  opacity: 1;
  visibility: visible;
  /* Remove border to prevent bleed */
  border: none !important;
  /* Add inset shadow for depth instead of border */
  box-shadow: inset 0 0 0 2px var(--shadow-inset-light), 0 4px 12px var(--shadow-md);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hover effects - only apply to non-flipped cards */
.flip-card:not(.flipped):hover .flip-card-front {
  -webkit-transform: rotateY(0deg) translateY(-4px);
  -moz-transform: rotateY(0deg) translateY(-4px);
  transform: rotateY(0deg) translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow-lg);
}

.flip-card.flipped:hover .flip-card-back {
  box-shadow: 0 8px 20px var(--shadow-xl);
}

/* Card back content styling - vertical ticket design layout */
.card-back-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl, 2rem);
  box-sizing: border-box;
  position: relative;
}

/* Watermark removed for cleaner design */

/* Card back content styling */
.card-back-content > * {
  position: relative;
  z-index: 1;
}

.card-back-content h3 {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: var(--font-size-2xl, 2rem);
  margin-top: var(--space-xl, 2rem);
  margin-bottom: var(--space-md, 1rem);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.card-back-content p {
  font-family: var(--font-body, 'Playfair Display', serif);
  font-size: var(--font-size-lg, 1.25rem);
  line-height: 1.8;
  margin-bottom: var(--space-lg, 1.5rem);
  color: var(--color-white-muted);
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 var(--space-md, 1rem);
  max-width: 90%;
}

/* Flip back button */
.flip-back-btn {
  background: var(--bg-white-transparent);
  border: 2px solid var(--border-white-transparent);
  color: var(--color-white);
  padding: var(--space-sm, 0.75rem) var(--space-lg, 1.5rem);
  border-radius: 8px;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: var(--font-size-md, 1rem);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xl, 2rem);
}

.flip-back-btn:hover {
  background: var(--bg-white-transparent-hover);
  border-color: var(--border-white-transparent-hover);
  transform: translateY(-2px);
}

/* Ensure ticket cards within flip cards maintain their styling */
.flip-card-front.ticket-card {
  /* Inherit all existing ticket card styles */
}

/* Override fixed dimensions for vertical-design when inside flip card */
.flip-card .ticket-card.vertical-design {
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .flip-card-front, .flip-card-back {
    border-color: var(--color-border-dark);
  }

  .flip-card-front {
    background: var(--color-card-bg-dark);
  }
}

[data-theme="dark"] .flip-card-front,
[data-theme="dark"] .flip-card-back {
  border-color: var(--color-border-dark);
}

[data-theme="dark"] .flip-card-front {
  background: var(--color-card-bg-dark);
}

/* Accessibility: visible focus styles for keyboard users */
.flip-card:focus-visible .flip-card-inner {
  outline: 3px solid var(--color-focus, var(--color-blue));
  outline-offset: 2px;
}

.flip-back-btn:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Prevent text selection during flip animation */
.flip-card-inner * {
  user-select: none;
}

/* Re-enable text selection for important content */
.card-back-content p {
  user-select: text;
}

/* Ensure each card back is properly isolated */
.full-pass-back .card-back-content h3::after {
  content: " (Full Pass)";
  font-size: 0.8em;
  opacity: 0.7;
}

.single-class-back .card-back-content h3::after {
  content: " (Single Class)";
  font-size: 0.8em;
  opacity: 0.7;
}

/* Additional isolation for debugging */
.flip-card:nth-child(1) {
  z-index: 10;
}

.flip-card:nth-child(2) {
  z-index: 9;
}

/* ========================================
   Event Section Headers (Dynamic Tickets)
   ======================================== */

.event-section {
  margin: var(--space-3xl, 3rem) 0 var(--space-xl, 2rem) 0;
}

/* First event section - reduce top margin */
.event-section:first-child {
  margin-top: var(--space-lg, 1.5rem);
}

.event-section-header {
  text-align: center;
  padding: var(--space-lg, 1.5rem) 0;
  border-bottom: 2px solid var(--color-red, #e53e3e);
  margin-bottom: var(--space-2xl, 2.5rem);
}

.event-title {
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: var(--font-size-3xl, 2.5rem);
  color: var(--color-red, #e53e3e);
  margin-bottom: var(--space-sm, 0.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.event-details {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: var(--font-size-lg, 1.125rem);
  color: var(--color-text-secondary, #6b7280);
  margin: 0;
  font-weight: 400;
}

/* Mobile responsive for event headers */
@media (max-width: 768px) {
  .event-title {
    font-size: var(--font-size-2xl, 2rem);
  }

  .event-details {
    font-size: var(--font-size-base, 1rem);
  }

  .event-section {
    margin: var(--space-2xl, 2.5rem) 0 var(--space-lg, 1.5rem) 0;
  }
}

/* ========================================
   Ticket Status Banners
   ======================================== */

.ticket-status-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: var(--space-sm, 0.5rem);
  text-align: center;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-size: var(--font-size-lg, 1.125rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Coming Soon / Not Available Ribbons - Diagonal corner badge (shared container) */
.ticket-status-banner.coming-soon,
.ticket-status-banner.unavailable {
  position: absolute;
  top: 0;      /* Aligned with card border (banner now inside .flip-card-front) */
  left: 0;     /* Aligned with card border (banner now inside .flip-card-front) */
  width: 150px;
  height: 150px;
  overflow: hidden;
  z-index: 20;
  background: transparent;
  border-radius: 12px 0 0 0; /* Match card's border radius to clip properly */
  padding: 0;
  box-shadow: none;
}

.ticket-status-banner.coming-soon::before {
  content: 'COMING SOON';
  position: absolute;
  width: 200px;
  background: var(--color-error, #dc2626);
  color: var(--color-white, #ffffff);
  text-align: center;
  line-height: 40px;
  font-size: 14px;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-weight: 800;
  letter-spacing: 0.1em;
  transform: rotate(-45deg);
  /* Positioned to stay completely within white card border */
  top: 35px;
  left: -48px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.ticket-status-banner.sold-out {
  background: var(--color-text-secondary, #6b7280);
  color: var(--color-white, #ffffff);
}

/* Not Available Ribbon - Pseudo-element content */
.ticket-status-banner.unavailable::before {
  content: 'NOT AVAILABLE';
  position: absolute;
  width: 200px;
  background: var(--color-error, #dc2626); /* Red background */
  color: var(--color-white, #ffffff);
  text-align: center;
  line-height: 40px;
  font-size: 14px;
  font-family: var(--font-display, 'Bebas Neue', sans-serif);
  font-weight: 800;
  letter-spacing: 0.1em;
  transform: rotate(-45deg);
  /* Positioned to stay completely within white card border */
  top: 35px;
  left: -48px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Disabled Ticket Styling
   ======================================== */

.ticket-disabled {
  opacity: 0.6;
  filter: grayscale(40%);
  cursor: not-allowed;
}

.ticket-disabled .flip-card-inner {
  pointer-events: none !important;
  cursor: not-allowed;
}

.ticket-disabled .qty-btn {
  display: none; /* Hide quantity selectors for unavailable tickets */
}

/* Remove hover effects for disabled tickets */
.flip-card.ticket-disabled:hover .flip-card-front {
  transform: none;
  box-shadow: 0 4px 12px var(--shadow-sm);
}

/* Adjust ticket body padding when banner is present */
.ticket-status-banner + .flip-card-inner .ticket-card {
  padding-top: var(--space-xl, 2rem);
}

/* ========================================
   Dynamic Ticket Container
   ======================================== */

.dynamic-tickets {
  width: 100%;
}

/* Loading and error states */
.loading-state,
.error-state,
.no-tickets-state {
  text-align: center;
  padding: var(--space-4xl, 3rem) var(--space-lg, 1.5rem);
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: var(--font-size-lg, 1.125rem);
}

.loading-state {
  color: var(--color-text-secondary, #6b7280);
}

.error-state {
  color: var(--color-error, #dc2626);
}

.no-tickets-state {
  color: var(--color-text-secondary, #6b7280);
}

/* Dark theme adjustments for status banners */
[data-theme="dark"] .ticket-status-banner.coming-soon::before {
  background: var(--color-error, #dc2626);
}

[data-theme="dark"] .ticket-status-banner.sold-out {
  background: var(--color-text-muted, #4b5563);
  color: var(--color-white, #ffffff);
}

[data-theme="dark"] .event-section-header {
  border-bottom-color: var(--color-red-dark, #dc2626);
}

[data-theme="dark"] .event-title {
  color: var(--color-red-light, #f87171);
}

/* Responsive adjustments for status banners */
@media (max-width: 768px) {
  .ticket-status-banner {
    font-size: var(--font-size-base, 1rem);
    padding: var(--space-xs, 0.375rem);
  }

  /* Adjust diagonal ribbon size for mobile */
  .ticket-status-banner.coming-soon {
    width: 120px;
    height: 120px;
  }

  .ticket-status-banner.coming-soon::before {
    width: 170px;
    line-height: 32px;
    font-size: 11px;
    /* Adjusted to stay completely within white card border on mobile */
    top: 28px;
    left: -41px;
  }
}

/* ========================================
 * css/virtual-gallery.css
 * ======================================== */

/* Virtual Gallery Styles */

.virtual-gallery-wrapper {
  width: 100%;
  margin: 0 auto;
}

.virtual-gallery {
  position: relative;
  width: 100%;
}

.virtual-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) 0;
  opacity: 1;
  visibility: visible;
  transition: all var(--transition-base);
}

.virtual-loading[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top: 3px solid var(--color-secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-md);
}

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

.loading-text {
  font-family: var(--font-code);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.virtual-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) 0;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.virtual-error[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.error-message {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--color-error);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.error-retry {
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-error);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-base);
}

.error-retry:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-1px);
}

.virtual-scroll-container {
  position: relative;
  width: 100%;
  min-height: 400px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  overflow: hidden;
}

.virtual-list {
  position: relative;
  width: 100%;
  min-height: 100%;
}

.virtual-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--space-sm);
  box-sizing: border-box;
  transition: transform 0.1s ease;
}

.virtual-item-content {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--color-background-secondary);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.virtual-item-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.virtual-item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  background: var(--color-background-secondary);
  transition: opacity var(--transition-base);
}

.virtual-item-image.loading {
  opacity: 0.5;
}

.virtual-item-image.loaded {
  opacity: 1;
}

.virtual-item-image.error {
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}

.virtual-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, var(--shadow-color-strong));
  color: var(--color-white);
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(100%);
  transition: all var(--transition-base);
}

.virtual-item-content:hover .virtual-item-caption {
  opacity: 1;
  transform: translateY(0);
}

.virtual-item-category {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--color-secondary);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-code);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
  opacity: 0.9;
}

/* Grid Layout for Standard Mode */
.virtual-list.standard-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-lg);
}

.virtual-list.standard-mode .virtual-item {
  position: static;
  width: auto;
  height: auto;
}

.virtual-list.standard-mode .virtual-item-content {
  height: 280px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .virtual-scroll-container {
    min-height: 300px;
  }

  .virtual-list.standard-mode {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .virtual-list.standard-mode .virtual-item-content {
    height: 240px;
  }

  .virtual-item-image {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .virtual-list.standard-mode {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    padding: var(--space-sm);
  }

  .virtual-list.standard-mode .virtual-item-content {
    height: 200px;
  }

  .virtual-item-image {
    height: 140px;
  }
}

/* Performance optimizations */
.virtual-gallery {
  contain: layout style paint;
  will-change: scroll-position;
}

.virtual-item {
  contain: layout style paint;
}

.virtual-item-image {
  contain: layout style paint;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .virtual-item-content,
  .virtual-item-caption,
  .virtual-item-image {
    transition: none;
  }

  .loading-spinner {
    animation: none;
  }
}

/* Focus styles for keyboard navigation */
.virtual-item-content:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.virtual-item-content:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   DARK MODE ENHANCEMENTS
   ========================================================================== */

/* Dark mode support for virtual gallery components */
[data-theme="dark"] .virtual-scroll-container {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .virtual-item-content {
  background: var(--color-background-secondary);
  box-shadow: 0 2px 8px var(--shadow-color);
}

[data-theme="dark"] .virtual-item-content:hover {
  box-shadow: 0 4px 16px var(--shadow-color-strong);
}

[data-theme="dark"] .virtual-item-image {
  background: var(--color-background-tertiary);
}

/* Enhanced caption visibility in dark mode */
[data-theme="dark"] .virtual-item-caption {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: var(--color-white);
}

/* Category tag visibility in dark mode */
[data-theme="dark"] .virtual-item-category {
  background: var(--color-secondary);
  color: var(--color-white);
}

/* Loading and error states in dark mode */
[data-theme="dark"] .loading-spinner {
  border-color: var(--color-border);
  border-top-color: var(--color-secondary);
}

[data-theme="dark"] .loading-text {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .error-message {
  color: var(--color-error);
}

[data-theme="dark"] .error-retry {
  background: var(--color-error);
  color: var(--color-white);
}

[data-theme="dark"] .error-retry:hover {
  background: var(--color-secondary-hover);
}

/* Enhanced error state icon visibility */
[data-theme="dark"] .virtual-item-image.error {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E");
}
