/* Responsive Design Styles */

/* Large devices (desktops) */
@media (max-width: 1200px) {
    .explorer-container {
      width: 220px;
    }
    
    .h-resizer {
      left: 220px;
    }
  }
  
  /* Medium devices (tablets) */
  @media (max-width: 992px) {
    .explorer-container {
      width: 200px;
    }
    
    .h-resizer {
      left: 200px;
    }
    
    #code-editor, .line-numbers {
      font-size: 13px;
    }
    
    .editor-tab {
      min-width: 90px;
      padding: 5px 10px;
    }
  }
  
  /* Small devices (landscape phones) */
  @media (max-width: 768px) {
    .explorer-container {
      width: 180px;
    }
    
    .h-resizer {
      left: 180px;
    }
    
    .editor-status-bar {
      flex-direction: column;
      align-items: flex-start;
      padding: 4px 8px;
    }
    
    .status-actions {
      margin-bottom: 4px;
      width: 100%;
      display: flex;
      justify-content: space-between;
    }
    
    #code-editor, .line-numbers {
      font-size: 12px;
      padding: 8px;
    }
    
    .line-numbers {
      padding: 8px 5px;
      min-width: 30px;
    }
    
    /* Shrink explorer elements */
    .title-bar {
      height: 30px;
      padding: 0 8px;
    }
    
    .item-content {
      font-size: 12px;
    }
    
    /* Make buttons more compact */
    .action-btn, .preview-btn {
      min-width: 22px;
      min-height: 22px;
      font-size: 12px;
    }
  }
  
  /* Extra small devices (portrait phones) */
  @media (max-width: 576px) {
    #mobile-explorer-toggle {
      display: flex;
    }
    
    .explorer-container {
      position: absolute;
      left: 0;
      top: 0;
      width: 80%;
      max-width: 300px;
      height: 100%;
      transform: translateX(-100%);
      z-index: 20;
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .explorer-container.show-mobile {
      transform: translateX(0);
    }
    
    /* Hide horizontal resizer on mobile */
    .h-resizer {
      display: none;
    }
    
    /* Make vertical resizer more touch-friendly */
    .resizer {
      height: 10px;
    }
    
    .resizer::after {
      font-size: 16px;
    }
    
    /* Adjust editor for small screens */
    .editor-container, .preview-container {
      /* Default to 50/50 split on mobile */
      height: 50% !important;
      min-height: 150px;
    }
    
    .workspace-container {
      /* Add padding for the mobile toggle button */
      padding-top: 10px;
    }
    
    /* Make editor tabs smaller */
    .editor-tab {
      padding: 3px 6px;
      min-width: 80px;
    }
    
    /* Shrink other UI elements */
    .preview-controls, .status-actions {
      gap: 5px;
    }
    
    .preview-btn, .action-btn {
      min-width: 20px;
      min-height: 20px;
      font-size: 12px;
    }
    
    /* Adjust editor font size */
    #code-editor, .line-numbers {
      font-size: 11px;
      padding: 6px;
    }
    
    .line-numbers {
      min-width: 25px;
      padding: 6px 3px;
    }
    
    /* Adjust modal for small screens */
    .modal {
      width: 95%;
    }
    
    .modal-header, .modal-body, .modal-footer {
      padding: 10px;
    }
    
    /* Adjust preview panel */
    .preview-header {
      height: 30px;
      padding: 3px 8px;
    }

    .actions {
        gap: 4px;
    }
      
    .action-btn {
        min-width: 20px;
        min-height: 20px;
        font-size: 12px;
        padding: 2px 4px;
    }
    .mobile-close-btn {
        display: block;
        position: absolute;
        right: 10px;
        top: 30px;
      }
      
      .title-bar {
        position: relative;
      }
  }
  
  /* Very small devices */
  @media (max-width: 320px) {
    .editor-tab {
      min-width: 60px;
      font-size: 11px;
    }
    
    .file-type-indicator {
      font-size: 8px;
      padding: 1px 3px;
    }
    
    .preview-btn, .action-btn {
      min-width: 18px;
      min-height: 18px;
      font-size: 10px;
    }
    
    .modal-btn {
      padding: 5px 10px;
      font-size: 12px;
    }
    
    #code-editor, .line-numbers {
      font-size: 10px;
      padding: 5px;
    }
    
    .editor-status-bar {
      font-size: 11px;
    }
  }