/* Enhanced mobile responsiveness for AspectRatioChecker */

/* General mobile improvements */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }
  
  .card {
    padding: 16px;
  }
  
  .tabs {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1 0 auto;
    font-size: 0.9rem;
    padding: 8px;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .input-wrapper {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .dimension-separator {
    margin: 0 0 10px 0;
    align-self: center;
  }
  
  .result-container {
    flex-direction: column;
  }
  
  .result-box {
    width: 100%;
  }
  
  .visual-container {
    width: 100%;
    margin-top: 20px;
  }
  
  .ratio-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .resize-options {
    flex-direction: column;
  }
  
  .resize-option {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* Specific fixes for comparison table */
.comparison-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.comparison-table {
  min-width: 650px; /* Ensures table doesn't shrink too much */
}

.comparison-table-wrapper {
  position: relative;
}

.scroll-indicator {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
  z-index: 10;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

@media (max-width: 768px) {
  .scroll-indicator {
    display: block;
  }
  
  .platform-card {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .platforms-grid {
    grid-template-columns: 1fr;
  }
  
  .platform-search-container {
    margin-bottom: 15px;
  }
  
  .search-input {
    font-size: 0.9rem;
  }
  
  /* Image upload improvements */
  .image-info {
    flex-direction: column;
  }
  
  .image-preview {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
  }
  
  .image-details {
    width: 100%;
  }
  
  .crop-preview-container {
    flex-direction: column;
  }
  
  .crop-preview {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .crop-info {
    width: 100%;
  }
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
  button, 
  .btn, 
  select, 
  input[type="text"], 
  input[type="number"] {
    min-height: 44px; /* Recommended minimum touch target size */
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .platform-btn {
    width: 100%;
  }
  
  /* Fix for platform cards on mobile */
  .preset-details {
    padding: 10px;
  }
  
  .preset-info {
    font-size: 0.85rem;
  }
}
