/* ============================================
   VideoSwipe Standalone - Responsive Styles
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }

  .container {
    padding: 0 1rem;
  }

  /* Feed adjustments */
  .videoswipe-actions {
    right: 1rem;
    gap: 1rem;
  }

  .videoswipe-overlay {
    padding: 1.5rem 1rem 1rem;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  h1 { font-size: 1.25rem; }
  h2 { font-size: 1rem; }
  h3 { font-size: 0.95rem; }

  .container {
    padding: 0 0.75rem;
  }

  /* Feed adjustments */
  .videoswipe-actions {
    right: 0.75rem;
    bottom: 30%;
    gap: 0.75rem;
  }

  .videoswipe-action-btn {
    font-size: 1rem;
  }

  .videoswipe-overlay {
    padding: 1rem 0.75rem 0.75rem;
  }

  .videoswipe-info {
    gap: 0.5rem;
  }

  .videoswipe-avatar {
    width: 35px;
    height: 35px;
  }

  .videoswipe-creator-name {
    font-size: 0.8rem;
  }

  .videoswipe-video-title {
    font-size: 0.75rem;
  }

  .videoswipe-tags {
    gap: 0.25rem;
  }

  .videoswipe-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
  }

  /* Navigation */
  .videoswipe-nav-controls {
    bottom: 1rem;
    gap: 0.5rem;
  }

  .videoswipe-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* Counter */
  .videoswipe-counter {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  /* Forms */
  input,
  textarea,
  select {
    padding: 0.6rem;
    font-size: 16px; /* Prevents zoom on iOS */
    margin-bottom: 0.75rem;
  }

  label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
  }

  button,
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* Small phones (320px and below) */
@media (max-width: 320px) {
  h1 { font-size: 1.1rem; }
  h2 { font-size: 0.95rem; }
  h3 { font-size: 0.9rem; }

  .videoswipe-actions {
    right: 0.5rem;
    gap: 0.5rem;
  }

  .videoswipe-action-btn {
    font-size: 0.9rem;
  }

  .videoswipe-action-count {
    font-size: 0.6rem;
  }

  .videoswipe-avatar {
    width: 30px;
    height: 30px;
  }

  .videoswipe-creator-name {
    font-size: 0.75rem;
  }

  .videoswipe-video-title {
    font-size: 0.7rem;
  }

  .videoswipe-nav-btn {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  button,
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* Landscape orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .videoswipe-overlay {
    padding: 1rem 1.5rem 0.75rem;
  }

  .videoswipe-actions {
    gap: 0.75rem;
  }

  .videoswipe-action-btn {
    font-size: 1.1rem;
  }

  .videoswipe-avatar {
    width: 35px;
    height: 35px;
  }

  .videoswipe-creator-name {
    font-size: 0.8rem;
  }

  .videoswipe-video-title {
    font-size: 0.75rem;
  }

  .videoswipe-nav-controls {
    bottom: 0.75rem;
  }

  .videoswipe-counter {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* Large screens (1200px and above) */
@media (min-width: 1200px) {
  .videoswipe-actions {
    right: 2rem;
    gap: 1.75rem;
  }

  .videoswipe-action-btn {
    font-size: 1.75rem;
  }

  .videoswipe-overlay {
    padding: 2.5rem 2rem 2rem;
  }

  .videoswipe-info {
    gap: 1.25rem;
  }

  .videoswipe-avatar {
    width: 60px;
    height: 60px;
  }

  .videoswipe-creator-name {
    font-size: 1rem;
  }

  .videoswipe-video-title {
    font-size: 0.95rem;
  }

  .videoswipe-nav-controls {
    gap: 1.5rem;
  }

  .videoswipe-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .videoswipe-counter {
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .videoswipe-action-btn:active {
    transform: scale(0.95);
  }

  button:active,
  a:active {
    opacity: 0.8;
  }

  /* Increase touch target size */
  .videoswipe-action-btn {
    padding: 0.75rem;
  }

  .videoswipe-nav-btn {
    width: 48px;
    height: 48px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --dark-bg: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --dark-tertiary: #262626;
  }
}

/* Light mode support (if needed) */
@media (prefers-color-scheme: light) {
  :root {
    --dark-bg: #f5f5f5;
    --dark-secondary: #ffffff;
    --dark-tertiary: #f0f0f0;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e0e0e0;
  }

  body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
  }

  input,
  textarea,
  select {
    background-color: var(--dark-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
  }

  .videoswipe-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8), transparent);
  }

  .videoswipe-nav-btn {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
  }

  .videoswipe-nav-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
  }
}

/* High contrast mode */
@media (prefers-contrast: more) {
  :root {
    --primary: #ff0066;
    --secondary: #00ffff;
  }

  button,
  a,
  .videoswipe-action-btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .videoswipe-actions,
  .videoswipe-nav-controls,
  .videoswipe-counter {
    display: none;
  }

  body {
    background-color: white;
    color: black;
  }

  .videoswipe-slide {
    page-break-inside: avoid;
  }
}
