/* Styles specific to the PDF Annotation tool */

.custom-color-picker {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
  }
  
  #colorPicker {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
  }
  
  #colorPicker::-webkit-color-swatch-wrapper {
    padding: 0;
  }
  
  #colorPicker::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
  }
  
.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;
  }
  
  .annotation-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    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: 5px;
    align-items: center;
    padding-right: 10px;
    margin-right: 10px;
    border-right: 1px solid #eee;
  }
  
  .tool-group:last-child {
    border-right: none;
  }
  
  .tool-btn, .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .tool-btn:hover, .action-btn:hover {
    background-color: #f5f5f5;
  }
  
  .tool-btn.active {
    background-color: #e8f5e9;
    border-color: #4CAF50;
    color: #4CAF50;
  }
  
  .pen-width-control {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .width-label {
    font-size: 14px;
    color: #555;
  }
  
  .width-options {
    display: flex;
    gap: 4px;
  }
  
  .width-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    padding: 0;
  }
  
  .width-option::after {
    content: "";
    position: absolute;
    width: 60%;
    height: var(--size);
    background-color: #333;
    border-radius: 50px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  
  .width-option[data-width="2"]::after {
    --size: 2px;
  }
  
  .width-option[data-width="4"]::after {
    --size: 4px;
  }
  
  .width-option[data-width="6"]::after {
    --size: 6px;
  }
  
  .width-option[data-width="8"]::after {
    --size: 8px;
  }
  
  .width-option.active {
    border-color: #4CAF50;
  }
  
  .color-picker {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .color-label {
    font-size: 14px;
    color: #555;
  }
  
  .color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }
  
  .color-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #ddd;
    cursor: pointer;
  }
  
  .color-option.active {
    border: 2px solid #4CAF50;
  }
  
  .tool-status {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 0 10px;
    font-size: 12px;
    color: #666;
    gap: 10px;
  }
  
  .reset-tool-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    cursor: pointer;
  }
  
  .reset-tool-btn:hover {
    background-color: #e0e0e0;
  }
  
  .document-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
  }
  
  .page-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
  }
  
  .page-btn, .zoom-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #555;
    cursor: pointer;
  }
  
  .page-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
  }
  
  #pageInfo, #zoomLevel {
    font-size: 14px;
    color: #555;
  }
  
  .canvas-container {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    background-color: #e0e0e0;
    position: relative;
  }
  
  #pdfCanvas {
    position: absolute;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: #fff;
  }
  
  #annotationCanvas {
    position: absolute;
    z-index: 2;
  }
  
  .canvas-wrapper {
    position: relative;
    margin: 0 auto;
  }
  
  .text-input-panel {
    position: absolute;
    width: 300px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .text-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
  }
  
  .text-input-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
  }
  
  .close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #777;
    cursor: pointer;
  }
  
  .close-btn:hover {
    color: #333;
  }
  
  #annotationText {
    width: 100%;
    height: 120px;
    border: none;
    resize: none;
    padding: 15px;
    font-size: 14px;
    outline: none;
  }
  
  .text-input-controls {
    display: flex;
    gap: 5px;
    padding: 0 15px 10px;
  }
  
  #textSize {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
  }
  
  .text-style-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
  }
  
  .text-style-btn.active {
    background-color: #e8f5e9;
    border-color: #4CAF50;
  }
  
  #addTextBtn {
    width: calc(100% - 30px);
    margin: 0 15px 15px;
  }
  
  .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;
  }
  
  .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;
  }
  
  /* Tooltip for tool info */
  .tool-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border-radius: 4px;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.5s;
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    .toolbar {
      flex-direction: column;
      align-items: flex-start;
    }
    
    .tool-group {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid #eee;
      padding-bottom: 10px;
      margin-bottom: 10px;
    }
    
    .annotation-container {
      height: calc(100vh - 150px);
    }
    
    .text-input-panel {
      width: 90%;
      max-width: 300px;
    }
    
    .actions-container {
      flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
      width: 100%;
    }
  }