/* Styles specific to the PDF Manage Pages tool */

.drop-area {
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background-color: #f7fbf7;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .drop-area:hover, .drop-area.active {
    background-color: #e8f5e9;
  }
  
  .drop-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .icon {
    font-size: 36px;
    color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 15px;
  }
  
  .drop-message p {
    color: #555;
    font-size: 16px;
    margin-bottom: 5px;
  }
  
  .supported-formats {
    color: #777;
    font-size: 12px;
    margin-top: 5px;
  }
  
  .manage-pages-container {
    display: flex;
    flex-direction: column;
    min-height: 600px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    align-items: center;
  }
  
  .tool-group {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-right: 15px;
    margin-right: 15px;
    border-right: 1px solid #eee;
  }
  
  .tool-group:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
    margin-left: auto;
  }
  
  .tool-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .tool-btn:hover {
    background-color: #f5f5f5;
  }
  
  .tool-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .tool-btn.danger-btn {
    border-color: #f44336;
    color: #f44336;
  }
  
  .tool-btn.danger-btn:hover {
    background-color: #fde9e8;
  }
  
  .tool-btn svg {
    flex-shrink: 0;
  }
  
  .info-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
  }
  
  .pages-grid-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
  }
  
  .pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .page-item {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
    cursor: grab;
    transition: all 0.2s ease;
  }
  
  .page-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  }
  
  .page-item.selected {
    border-color: #4CAF50;
  }
  
  .page-item.sortable-ghost {
    opacity: 0.4;
  }
  
  .page-item.sortable-chosen {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }
  
  .page-thumbnail {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    overflow: hidden;
  }
  
  .page-thumbnail canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  
  .page-info {
    padding: 8px 10px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .page-number {
    font-size: 14px;
    color: #555;
    font-weight: 500;
  }
  
  .page-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
  }
  
  .actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #ddd;
  }
  
  .result-container {
    margin: 20px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
  }
  
  .result-info {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
  }
  
  .result-info p {
    color: #2e7d32;
    margin: 0;
  }
  
  .result-summary {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #333;
  }
  
  .preview-container {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
  }
  
  .preview-container iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
  
  .actions-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
  }
  
  /* Loading indicator */
  .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
  }
  
  .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    .toolbar {
      flex-direction: column;
      align-items: stretch;
    }
    
    .tool-group {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid #eee;
      padding-right: 0;
      padding-bottom: 10px;
      margin-right: 0;
      margin-bottom: 10px;
    }
    
    .pages-grid {
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 15px;
    }
    
    .page-thumbnail {
      height: 180px;
    }
    
    .actions-container {
      flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
      width: 100%;
    }
  }