/* Styles for the OCR section */

/* Main container styles */
  .ocr-container {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
  }
  
  /* Header section */
  .header-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }
  
  .header-section h1 {
    font-size: 23px;
    font-weight: bold;
    margin: 0 0 16px 0;
    color: #333;
  }
  
  .subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
  }
  
  /* Guide section */
  .guide-section {
    background-color: #f0f6ff;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
  }
  
  .guide-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 6px;
  }
  
  .info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #d3d4d6;
    color: #4a75e2;
    border-radius: 50%;
    font-style: normal;
    font-weight: bold;
    margin-right: 10px;
  }

  .info-icon-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #d3d4d6;
    color: #4a75e2;
    border-radius: 50%;
    font-style: normal;
    font-weight: bold;
    margin-right: 3px;
  }
  
  .guide-title {
    font-size: 18px;
    color: #4a75e2;
    margin: 0;
    flex-grow: 1;
    font-weight: 700;
  }
  
  /* Guide content */
  .guide-content {
    margin-top: 8px;
  }
  
  .guide-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 14px;
  }
  
  .guide-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    background-color: #4a75e2;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 10px;
    font-size: 13px;
    flex-shrink: 0;
  }
  
  .guide-item p {
    margin: 0;
    color: #4a75e2;
    font-size: 14px;
    padding-top: 2px;
  }
  
  /* Upload section */
  .upload-section {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
  }

  .upload-heading {
    font-size: 16px;
    margin: 0 0 10px 0;
    font-weight: 600;
    margin-bottom: 10px;
  }
  
  .upload-box {
    flex: 1;
    border: 2px dashed #4a75e2;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .upload-box:hover {
    border-color: #4a75e2;
    background-color: #f7f8fa;
  }
  
  .upload-box.drag-over {
    border-color: #4a75e2;
    background-color: #f7f8fa;
  }
  
  .upload-box.uploaded {
    border: 2px dashed #4a75e2;
    background-color: #f0f5ff;
  }
  
  .icon-container {
    margin-bottom: 12px;
  }
  
  .upload-icon, .document-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    position: relative;
  }
  
  .upload-icon:after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 18px; height: 18px;
    transform: translate(-50%, -50%);
    background-image: url("../images/upload-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }
  
  .document-icon:after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 18px; height: 18px;
    transform: translate(-50%, -50%);
    background-image: url("../images/document-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }
  
  .upload-box h3 {
    font-size: 16px;
    margin: 0 0 6px 0;
  }
  
  .upload-description {
    color: #666;
    margin: 0 0 8px 0;
    font-size: 14px;
  }
  
  .upload-status {
    font-size: 14px;
    color: #4a75e2;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .check-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    color: #4CAF50;
    position: relative;
  }

  .check-icon:before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 16px; height: 16px;
    transform: translate(-50%, -50%);
    background-image: url("../images/check-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }
  
  /* Status section */
  .status-section {
    display: flex;
    align-items: center;
    background-color: #f8fafc;
    padding: 7px 10px;
    border-radius: 4px;
  }
  
  .status-section .info-icon {
    min-width: 24px;
  }
  
  .status-section p {
    margin: 0;
    font-size: 12px;
    margin-left: 6px;
  }
  
  /* Action buttons */
  .action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  
  .skip-button, .retry-button {
    padding: 7px 18px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
  }
  
  .skip-button:hover, .retry-button:hover {
    background-color: #f9f9f9;
  }
  
  .process-button, .proceed-button {
    padding: 10px 30px;
    background-color: #4a75e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
  }
  
  .process-button:hover, .proceed-button:hover {
    background-color: #3a65d2;
  }
  
  .process-button:disabled {
    background-color: #a5b8e9;
    cursor: not-allowed;
  }
  
  /* Loading screen */
  .loading-screen {
    text-align: center;
  }
  
  .spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(74, 117, 226, 0.2);
    border-radius: 50%;
    border-top-color: #4a75e2;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 30px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  .loading-screen h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 15px 0;
  }
  
  .loading-screen p {
    font-size: 16px;
    color: #666;
    max-width: 500px;
    margin: 0 auto;
  }
  
  /* Results screen */
  .results-screen {
    padding: 20px;
  }
  
  .results-content {
    border: 1px solid #f0c05a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .results-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #333;
  }
  
  .success-message {
    background-color: #f0f7ff;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .success-message h3 {
    color: #5b7de7;
    margin: 0 0 5px 0;
    font-size: 16px;
  }

  .failure-message h3 {
    color: #d32f2f;
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
  }
  
  .success-message p {
    margin: 0;
    color: #5b7de7;
    font-size: 14px;
  }

  .failure-message p {
    margin: 0;
    color: #d32f2f;
    font-size: 14px;
  }
  
  .details-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .details-card {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
  }
  
  .details-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .details-header .icon {
    margin-right: 10px;
    font-size: 18px;
    color: #555;
  }
  
  .details-header h3 {
    font-size: 16px;
    margin: 0;
    color: #333;
  }
  
  .details-content {
    font-size: 14px;
  }
  
  .field-row {
    margin-bottom: 12px;
  }
  
  .field-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 3px;
  }
  
  .field-value {
    font-weight: 500;
    color: #333;
  }
  
  .box-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    background-color: white;
  }
  
  .box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }
  
  .box-title {
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
  }
  
  .box-dimensions {
    color: #777;
    font-size: 13px;
  }
  
  .box-chevron {
    color: #999;
    transition: transform 0.3s;
  }
  
  .box-chevron .expanded {
    transform: rotate(180deg);
  }
  
  .item-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
  }
  
  .item-table th {
    text-align: left;
    border-bottom: 1px solid #eee;
    padding: 8px 5px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
  }
  
  .item-table td {
    padding: 8px 5px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
  }
  
  /* Detailed box view */
  .details-expanded {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
  }
  
  .box-details h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
  }
  
  .box-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
  }
  
  .item-table-detailed {
    width: 100%;
    border-collapse: collapse;
  }
  
  .item-table-detailed th {
    text-align: left;
    background-color: #f0f0f0;
    padding: 10px;
    font-size: 14px;
  }
  
  .item-table-detailed td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }

  /* Loading Screen Styles */
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    text-align: center;
    margin: 200px auto;
  }

  .loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .spinner {
    margin-bottom: 30px;
  }

  .loading-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #333;
  }

  .loading-description {
    font-size: 16px;
    line-height: 1.5;
    color: #666;
    margin: 0;
    max-width: 500px;
  }

  /* Results Screen Styles */
  .results-container {
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  }

  .results-header {
    margin-bottom: 20px;
  }

  .results-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #333;
  }

  .success-banner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background-color: #F0F8FF;
    border-radius: 8px;
    gap: 10px;
    padding: 15px;
    margin-bottom: 25px;
  }

  .success-icon-div {
    flex-shrink: 0;
  }

  .checkmark-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border-radius: 50%;
    border: 2px solid #5b7de7; 
    position: relative;
    margin-top: 20px;
  }

  .checkmark-icon:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 6px;
    height: 12px;
    border-bottom: 2px solid #5b7de7;
    border-right: 2px solid #5b7de7;
    margin-top: -1px;
  }

  .success-message h3 {
    font-size: 18px;
    font-weight: 600;
    color: #5b7de7;
    margin: 0 0 5px;
  }

  .success-message p {
    font-size: 16px;
    margin: 0;
    color: #5b7de7;
    line-height: 1.5;
  }

  .extracted-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }

  .left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .right-column {
    display: flex;
    flex-direction: column;
    gap: 20px; 
  }

  .detail-section {
    background-color: #F8F9FB;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
  }

  .section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
  }

  .section-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #E6E9F0;
    border-radius: 5px;
    margin-right: 10px;
    position: relative;
  }

  .section-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #444;
  }

  .detail-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .detail-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
  }

  .detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
  }

  .detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
  }

  .document-icon:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-image: url("../images/document-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }

  .truck-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
  }

  .truck-icon:before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 20px; height: 20px;
    transform: translate(-50%, -50%);
    background-image: url("../images/truck-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }

  .boxes-list {
    margin-top: 20px;
  }

  .box-item {
    border: 1px solid #E6E9F0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
  }

  .box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #F8F9FB;
    cursor: pointer;
  }

  .box-title {
    display: flex;
    align-items: center;
  }

  .box-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
  }

  .box-icon:before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 20px; height: 20px;
    transform: translate(-50%, -50%);
    background-image: url("../images/box-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }

  .box-id {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-right: 10px;
  }

  .box-dimensions {
    font-size: 13px;
    color: #666;
  }

  .expand-icon {
    width: 16px;
    height: 16px;
    position: relative;
  }

  .expand-icon:before, .expand-icon:after {
    content: '';
    position: absolute;
    background-color: #666;
    transition: transform 0.3s ease;
  }

  .expand-icon:before {
    top: 7px;
    left: 0;
    width: 16px;
    height: 2px;
  }

  .expand-icon:after {
    top: 0;
    left: 7px;
    width: 2px;
    height: 16px;
  }

  .expand-icon.expanded:after {
    transform: rotate(90deg);
  }

  .box-content {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #E6E9F0;
  }

  .items-table {
    width: 100%;
    border-collapse: collapse;
  }

  .items-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #E6E9F0;
    background-color: #F8F9FB;
  }

  .items-table td {
    padding: 8px 12px;
    font-size: 13px;
    border-bottom: 1px solid #E6E9F0;
  }

  .items-table tr:last-child td {
    border-bottom: none;
  }

  .result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 25px 0;
    align-items: center; 
    border-top: 1px solid #e0e0e0; 
    padding: 20px 0;
  }

  .retry-button {
    background-color: white;
    border: 1px solid #ccc;
    color: #555;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .retry-button:hover {
    background-color: #f5f5f5;
  }

  .proceed-button {
    background-color: #4A7AFF;
    border: none;
    color: white;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .proceed-button:disabled {
    background-color: #bfc8de !important;
    color: #fff !important;
    cursor: not-allowed;
    border: none;
    opacity: 1;
  }

  .proceed-button:hover {
    background-color: #3968E6;
  }

  .file-actions button {
      margin-right: 10px;
      padding: 5px 10px;
      font-size: 14px;
      cursor: pointer;
  }

  .download-button {
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 4px;
  }

  .replace-button {
      background-color: #f44336;
      color: white;
      border: none;
      border-radius: 4px;
  }

  .money-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    position: relative;
  }

  .money-icon:before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 20px; height: 20px;
    transform: translate(-50%, -50%);
    background-image: url("../images/money-icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
  }

  .crossmark-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border-radius: 50%;
    border: 2px solid #d32f2f;
    position: relative;
  }

  .crossmark-icon:before,
  .crossmark-icon:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 2px;
    background-color: #d32f2f;
    border-radius: 2px;
  }

  .crossmark-icon:before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .crossmark-icon:after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .upload-section {
      flex-direction: column;
    }
    
    .upload-box {
      margin-bottom: 15px;
    }
    
    .details-section {
      flex-direction: column;
    }
    
    .details-card {
      width: 100%;
    }
    
    .action-buttons {
      flex-direction: column;
    }
    
    .skip-button, .retry-button, .process-button, .proceed-button {
      width: 100%;
      margin-bottom: 10px;
    }
  }