/* Document Components CSS */

/* Upload form styling */
.upload-form {
    margin-top: 16px;
    width: 100%;
    max-width: 506px;
    margin-bottom: 12px;
  }
  
  .upload-box {
    margin-top: 16px;
    background: var(--green-neardark, #022114);
    border-radius: 12px;
    width: 100%;
    transition: all 0.2s ease;
    position: relative;
    height: 150px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }
  
  .upload-box.drag-over {
    background-color: rgba(13, 35, 24, 0.8);
    border-color: rgba(32, 111, 78, 0.6);
    transform: scale(1.01);
  }
  
  .upload-box-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  
  .upload-icon {
    width: 24px;
    height: 24px;
  }
  
  .upload-text {
    text-align: center;
    color: var(--text-primary);
  }
  
  .upload-text p {
    margin: 0 0 8px 0;
    font-size: 12px;
    opacity: 0.9;
  }
  
  .upload-text span {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
  }
  
  .browse-btn {
    background-color: transparent;
    color: var(--accent-blue-strong, #15d2d2);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    font-weight: 500;
    font-family: "Golos Text";
  }
  
  .file-format-info {
    color: var(--green-midg, #79A995) !important;
    font-size: 12px !important;
    margin-top: 12px;
    font-family: "Golos Text" !important;
    font-style: normal !important;;
    font-weight: 400 !important;
    line-height: normal !important;
    opacity: 1 !important;
  }
  
  /* Upload progress styling */
  #upload-progress {
    width: 90%;
    margin-top: 16px;
    display: flex;
    justify-content: center;
  }
  
  .progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
  }
  
  .progress-fill {
    height: 100%;
    background-color: var(--foster-green);
    width: 0;
    transition: width 0.3s ease;
  }
  
  .progress-text {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
  }
  
  /* Uploaded files summary styling */
  .uploaded-files-summary {
    margin-bottom: 16px;
    background: rgba(32, 111, 78, 0.1);
    border: 1px solid rgba(32, 111, 78, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .uploaded-files-summary:hover {
    background: rgba(32, 111, 78, 0.15);
    border-color: rgba(32, 111, 78, 0.25);
  }
  
  .summary-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  
  .summary-count {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
  }
  
  .summary-action {
    color: var(--text-muted);
    font-size: 13px;
  }
  
  .summary-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
  }
  
  .uploaded-files-summary:hover .summary-arrow {
    transform: translateX(2px);
    color: var(--text-primary);
  }
  
  /* Modal styles */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
  }
  
  .modal-content {
    position: relative;
    background-color: var(--bg-secondary);
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  }
  
  .modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
  }
  
  .modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
  }
  
  .modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
  }
  
  /* Document list styles */
  .documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .document-item {
    background-color: rgba(10, 35, 24, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s;
  }
  
  .document-item:hover {
    background-color: rgba(10, 35, 24, 0.7);
  }
  
  .document-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .document-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(32, 111, 78, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
  }
  
  .document-details {
    flex-grow: 1;
  }
  
  .document-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
  }
  
  .document-meta {
    display: flex;
    gap: 12px;
    color: var(--text-muted);
    font-size: 13px;
  }
  
  .document-actions {
    display: flex;
    gap: 8px;
  }
  
  .document-expand-btn {
    background-color: rgba(32, 111, 78, 0.1);
    color: var(--text-primary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .document-expand-btn:hover {
    background-color: rgba(32, 111, 78, 0.2);
  }
  
  .document-expand-btn.expanded svg {
    transform: rotate(180deg);
  }
  
  .document-remove-btn {
    background-color: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .document-remove-btn:hover {
    background-color: rgba(255, 100, 100, 0.2);
  }
  
  .document-content {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.2);
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 13px;
    color: var(--text-muted);
    max-height: 300px;
    overflow-y: auto;
  }
  
  .content-loading {
    color: var(--text-muted);
    font-style: italic;
  }
  
  .content-text {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
  }
  
  .content-text p {
    margin: 0 0 16px 0;
  }
  
  .content-text p:last-child {
    margin-bottom: 0;
  }
  
  .content-error {
    color: #ff6b6b;
    font-style: italic;
  }
  
  /* Document action buttons */
  .content-save-btn,
  .document-ocr-btn,
  .document-analyze-btn {
    background-color: rgba(32, 111, 78, 0.1);
    color: var(--text-primary);
    border: none;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
  }
  
  .content-save-btn:hover,
  .document-ocr-btn:hover,
  .document-analyze-btn:hover {
    background-color: rgba(32, 111, 78, 0.2);
  }
  
  /* Scrollbar styles */
  .document-content::-webkit-scrollbar {
    width: 8px;
  }
  
  .document-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
  }
  
  .document-content::-webkit-scrollbar-thumb {
    background: rgba(32, 111, 78, 0.3);
    border-radius: 4px;
  }
  
  .document-content::-webkit-scrollbar-thumb:hover {
    background: rgba(32, 111, 78, 0.4);
  }
  
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
  .spinner {
    animation: spin 1s linear infinite;
  }
  
  /* Download template link styling */
  .download-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  
  .download-icon {
    margin-right: 4px;
  }
  
  /* Mobile/desktop text display based on screen size */
  .desktop-text {
    display: none;
    font-family: "Golos Text";
    color: var(--accent-blue-strong, #15D2D2);
    font-weight: 400;
    font-size: 12px;
    font-style: normal;
    opacity: 1 !important;
  }
  
  .mobile-text {
    display: inline;
    font-family: "Golos Text";
    color: var(--accent-blue-strong, #15D2D2);
    font-weight: 400;
    font-size: 12px;
    opacity: 1 !important;
  }
  
  /* Media query for screens 640px and above */
  @media screen and (min-width: 641px) {
    .download-icon {
      display: none;
    }
  
    .mobile-text {
      display: none;
    }
  
    .desktop-text {
      display: inline;
    }
  }
  
  .upload-content-desktop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  
  .upload-content-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .upload-icon-mobile {
    width: 16px;
    height: 16px;
    pointer-events: none;
  }
  
  .upload-text-mobile {
    color: var(--green-verylightg, #DEE9E4);
    font-family: "Golos Text";
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: 0.12px;
    pointer-events: none;
  }
  
  @media (max-width: 640px) {
    .upload-box {
      height: 50px;
      background: var(--green-darkg, #115C3D);
      border-radius: 12px;
      padding: 6px 8px;
      cursor: pointer;
    }
  
    .upload-content-desktop {
      display: none;
    }
  
    .upload-content-mobile {
      display: flex;
      width: 100%;
      height: 100%;
      min-height: 38px;
    }
  
    .upload-box-content {
      width: 100%;
      height: 100%;
      display: flex !important;
      align-items: center;
      justify-content: center;
    }
  }
   
  .upload-content-mobile-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
  }
  
  .upload-box.uploading-mobile {
    height: 100px !important;
  }  