/* Document Upload Modal Styles */
.document-upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.document-upload-modal {
  background-color: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modal-appear 0.3s ease-out;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@keyframes modal-appear {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.document-upload-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background-color: #f6f8fa;
  border-bottom: 1px solid #e1e4e8;
}

.document-upload-header h2 {
  margin: 0;
  font-size: 18px;
  color: #24292e;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  color: #586069;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.close-button:hover {
  color: #24292e;
}

.document-upload-content {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(90vh - 60px); /* Adjust for header height */
  display: flex;
  flex-direction: column;
}

.document-upload-content p {
  margin-top: 0;
  margin-bottom: 20px;
  color: #586069;
}

.upload-form {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

/* Drag and drop styles */
.file-drop-area {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 130px;
  padding: 15px;
  border: 2px dashed #0366d6;
  border-radius: 6px;
  background-color: #f6f8fa;
  color: #0366d6;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.file-drop-area.drag-active {
  background-color: #e6f0ff;
  border-color: #0058cc;
}

.file-drop-area.has-files {
  min-height: 160px;
  align-items: stretch;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.drop-message {
  text-align: center;
}

.drop-message p {
  margin: 5px 0;
  font-weight: 500;
  color: #0366d6;
}

.drop-subtitle {
  font-size: 13px;
  color: #586069;
  font-weight: normal;
}

/* Selected files styles */
.selected-files {
  width: 100%;
}

.selected-files p {
  margin: 0 0 8px 0;
  font-weight: 500;
  color: #24292e;
}

.files-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 170px;
  overflow-y: auto;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
}

.file-item {
  padding: 8px 10px;
  border-bottom: 1px solid #e1e4e8;
  font-size: 14px;
  color: #24292e;
  position: relative;
}

.file-item:last-child {
  border-bottom: none;
}

.file-item.duplicate {
  background-color: #fff8f2;
  border-left: 3px solid #f66a0a;
}

.file-item.duplicate .file-name {
  color: #e36209;
}

.duplicate-indicator {
  font-size: 12px;
  font-style: italic;
  color: #d73a49;
  font-weight: normal;
}

/* File progress bar */
.file-progress {
  height: 4px;
  width: 100%;
  background-color: #e1e4e8;
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
  position: relative;
}

.file-progress .progress-bar {
  height: 100%;
  background-color: #0366d6;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.file-progress.success .progress-bar {
  background-color: #28a745;
}

.file-progress.error .progress-bar {
  background-color: #cb2431;
}

.file-progress.duplicate .progress-bar {
  background-color: #f66a0a;
}

.button-container {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cancel-button {
  padding: 8px 16px;
  background-color: #fafbfc;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  color: #24292e;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-button:hover {
  background-color: #f3f4f6;
}

.upload-button {
  padding: 8px 16px;
  background-color: #0366d6;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-button:hover {
  background-color: #035fc7;
}

.upload-button:disabled {
  background-color: #a5d0ff;
  cursor: not-allowed;
}

.error-message {
  padding: 10px;
  margin-bottom: 15px;
  color: #cb2431;
  background-color: #ffeef0;
  border: 1px solid #ffd1d5;
  border-radius: 6px;
}

.upload-status {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
}

.upload-status.success {
  color: #22863a;
  background-color: #e6ffed;
  border: 1px solid #c3e6cb;
}

.upload-status.error {
  color: #cb2431;
  background-color: #ffeef0;
  border: 1px solid #ffd1d5;
}

.upload-status.partial {
  color: #e36209;
  background-color: #fff8f2;
  border: 1px solid #ffdfb9;
}

.upload-status.duplicate {
  color: #e36209;
  background-color: #fff8f2;
  border: 1px solid #ffdfb9;
}

/* Document list styles */
.documents-list-section {
  margin-top: 30px;
  border-top: 1px solid #e1e4e8;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1;
}

.documents-list-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  color: #24292e;
}

.documents-loading {
  color: #586069;
  font-style: italic;
}

.no-documents {
  color: #586069;
  font-style: italic;
  padding: 10px 0;
}

.documents-container {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 10px;
  background-color: #f8f9fa;
}

.documents-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.documents-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.clear-all-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.clear-all-button:hover {
  background-color: #c82333;
}

.clear-all-button:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  background-color: #fff;
  min-height: 60px;
}

.document-info {
  flex: 1 1;
  min-width: 0;
  margin-right: 15px;
}

.document-name {
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.document-date {
  font-size: 12px;
  color: #586069;
  white-space: nowrap;
}

.delete-document-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  flex-shrink: 0;
  min-width: 80px;
}

.delete-document-button:hover {
  background-color: #c82333;
}

.delete-document-button:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
}

.delete-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-left: 8px;
}

.confirmation-buttons {
  display: flex;
  gap: 8px;
}

.confirm-delete-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.confirm-delete-button:hover {
  background-color: #c82333;
}

.cancel-delete-button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.cancel-delete-button:hover {
  background-color: #5a6268;
}

.delete-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 8px;
}

.delete-button:hover {
  background-color: #c82333;
}

.delete-button:disabled {
  background-color: #dc3545;
  opacity: 0.65;
  cursor: not-allowed;
}

.clear-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.confirm-clear-button {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.confirm-clear-button:hover {
  background-color: #c82333;
}

.cancel-clear-button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.cancel-clear-button:hover {
  background-color: #5a6268;
}

.clear-all-button:disabled {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

.file-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-details {
  margin-top: 8px;
  font-size: 12px;
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 8px;
}

.zip-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zip-summary {
  font-weight: 600;
  color: #28a745;
  margin-bottom: 4px;
}

.processed-files {
  color: #28a745;
}

.skipped-files {
  color: #ffc107;
}

.error-files {
  color: #dc3545;
}

.single-file-result {
  color: #28a745;
  font-weight: 500;
}

.processed-files strong,
.skipped-files strong,
.error-files strong {
  font-weight: 600;
  margin-right: 4px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .document-upload-overlay {
    padding: 20px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .document-upload-modal {
    width: 100%;
    max-width: none;
    max-height: none;
    min-height: calc(100vh - 40px);
    margin: 0;
    border-radius: 12px;
  }

  .document-upload-header {
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .document-upload-header h2 {
    font-size: 18px;
  }

  .close-button {
    font-size: 28px;
    padding: 4px;
    min-width: 32px;
    min-height: 32px;
  }

  .document-upload-content {
    padding: 20px;
    max-height: none;
  }

  .file-drop-area {
    min-height: 140px;
    padding: 20px;
  }

  .drop-message p {
    font-size: 16px;
  }

  .drop-subtitle {
    font-size: 14px;
  }

  .files-list {
    max-height: 200px;
  }

  .file-item {
    padding: 12px;
    font-size: 15px;
  }

  .button-container {
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: 24px;
  }

  .cancel-button,
  .upload-button {
    padding: 12px 20px;
    font-size: 16px;
    width: 100%;
  }

  .documents-container {
    max-height: 250px;
  }

  .document-item {
    padding: 16px;
    min-height: 70px;
  }

  .document-name {
    font-size: 15px;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    line-height: 1.3;
  }

  .document-date {
    font-size: 13px;
  }

  .delete-document-button {
    padding: 8px 16px;
    font-size: 15px;
    min-width: 90px;
    min-height: 40px;
  }

  .clear-all-button {
    padding: 8px 16px;
    font-size: 15px;
    min-height: 40px;
  }

  .confirm-delete-button,
  .cancel-delete-button {
    padding: 6px 14px;
    font-size: 15px;
  }

  .upload-details {
    font-size: 13px;
    padding: 12px;
  }
}

@media (max-width: 640px) {
  .document-upload-overlay {
    padding: 15px;
  }

  .document-upload-header {
    padding: 14px 16px;
  }

  .document-upload-header h2 {
    font-size: 17px;
  }

  .document-upload-content {
    padding: 16px;
  }

  .file-drop-area {
    min-height: 120px;
    padding: 16px;
  }

  .drop-message p {
    font-size: 15px;
  }

  .file-item {
    padding: 10px;
    font-size: 14px;
  }

  .document-item {
    padding: 14px;
    min-height: 65px;
  }

  .document-name {
    font-size: 14px;
  }

  .document-date {
    font-size: 12px;
  }

  .delete-document-button {
    padding: 6px 12px;
    font-size: 14px;
    min-width: 80px;
    min-height: 36px;
  }

  .clear-all-button {
    padding: 6px 12px;
    font-size: 14px;
    min-height: 36px;
  }
}

@media (max-width: 480px) {
  .document-upload-overlay {
    padding: 10px;
  }

  .document-upload-modal {
    border-radius: 8px;
  }

  .document-upload-header {
    padding: 12px 14px;
  }

  .document-upload-header h2 {
    font-size: 16px;
  }

  .close-button {
    font-size: 24px;
  }

  .document-upload-content {
    padding: 14px;
  }

  .file-drop-area {
    min-height: 100px;
    padding: 14px;
  }

  .drop-message p {
    font-size: 14px;
  }

  .drop-subtitle {
    font-size: 12px;
  }

  .file-item {
    padding: 8px;
    font-size: 13px;
  }

  .button-container {
    gap: 10px;
    margin-top: 20px;
  }

  .cancel-button,
  .upload-button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .document-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    min-height: auto;
  }

  .document-info {
    margin-right: 0;
    width: 100%;
  }

  .document-name {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .document-date {
    font-size: 11px;
  }

  .delete-document-button {
    padding: 4px 10px;
    font-size: 13px;
    min-width: 70px;
    min-height: 32px;
    align-self: flex-end;
  }

  .clear-all-button {
    padding: 4px 10px;
    font-size: 13px;
    min-height: 32px;
  }

  .confirm-delete-button,
  .cancel-delete-button {
    padding: 4px 10px;
    font-size: 13px;
  }

  .error-message,
  .upload-status {
    padding: 8px;
    font-size: 13px;
  }

  .upload-details {
    font-size: 11px;
    padding: 8px;
  }

  .documents-list-section h3 {
    font-size: 15px;
  }
} 
