/* Admin Panel Mobile Responsive Styles */

/* Base Responsive Adjustments */
@media (max-width: 768px) {
  /* Layout */
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .sidebar.active {
    left: 0;
  }

  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .mobile-menu-toggle i {
    font-size: 1.25rem;
  }

  /* Content Area */
  .content {
    width: 100%;
    padding: 4rem 1rem 1rem;
    margin-left: 0;
  }

  /* Tables */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
    font-size: 0.875rem;
  }

  th, td {
    padding: 0.5rem;
    white-space: nowrap;
  }

  /* Cards */
  .card {
    margin-bottom: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Forms */
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group label {
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* iOS zoom prevention */
    padding: 0.75rem;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .btn-group {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Modal */
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  /* Hero Image Management */
  .hero-images-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-image-card {
    padding: 1rem;
  }

  .hero-image-preview {
    height: 150px;
  }
}

@media (max-width: 480px) {
  /* Content */
  .content {
    padding: 4rem 0.75rem 1rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  /* Tables - Card View */
  .table-container {
    display: none;
  }

  .mobile-card-view {
    display: block;
  }

  .mobile-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
  }

  .mobile-card-title {
    font-weight: 600;
    color: #2c3e50;
  }

  .mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
  }

  .mobile-card-label {
    color: #666;
    font-weight: 500;
  }

  .mobile-card-value {
    color: #2c3e50;
  }

  .mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
  }

  .mobile-card-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  /* Buttons */
  .btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }

  /* Modal */
  .modal-content {
    margin: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  /* Hero Image Management */
  .hero-image-preview {
    height: 120px;
  }

  .hero-image-info h4 {
    font-size: 1rem;
  }

  .hero-image-info p {
    font-size: 0.85rem;
  }

  .hero-image-actions {
    flex-wrap: wrap;
  }

  .hero-image-actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: auto;
  }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

@media (max-width: 768px) {
  .sidebar-overlay.active {
    display: block;
  }
}

/* Desktop - hide mobile elements */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }

  .mobile-card-view {
    display: none;
  }

  .table-container {
    display: block;
  }
}
