/* Review page styles */
.review-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.review-header {
  margin-bottom: 20px;
  text-align: center;
}

.review-header h2 {
  color: var(--primary-color);
  margin-bottom: 5px;
}

.review-header p {
  color: #777;
  margin: 0;
}

.review-container {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 20px;
}

.receipt-preview {
  margin-bottom: 20px;
}

.receipt-preview h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.receipt-image {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  background-color: #f9f9f9;
}

.receipt-image img {
  max-width: 100%;
  height: auto;
}

.receipt-text {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
  color: #333;
}

.extracted-data {
  margin-bottom: 20px;
}

.extracted-data h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.data-section {
  margin-bottom: 20px;
}

.data-section h4 {
  color: #555;
  font-size: 1rem;
  margin-bottom: 10px;
  font-weight: 500;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.data-table,
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.data-table th,
.items-table th {
  text-align: left;
  padding: 8px;
  background-color: #f5f5f5;
  color: #555;
  font-weight: 500;
}

.data-table td,
.items-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.data-table th {
  width: 150px;
}

.items-table {
  font-size: 0.9rem;
}

.items-table th {
  text-align: center;
}

.items-table td {
  text-align: center;
}

.items-table td:nth-child(2) {
  text-align: left;
}

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

.edit-button,
.confirm-button,
.cancel-button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.edit-button {
  background-color: #f0f0f0;
  color: #555;
}

.edit-button:hover {
  background-color: #e0e0e0;
}

.confirm-button {
  background-color: var(--primary-color);
  color: white;
}

.confirm-button:hover {
  background-color: var(--primary-dark);
}

.cancel-button {
  background-color: #f8f8f8;
  color: #777;
}

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

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .receipt-preview {
    float: left;
    width: 40%;
    padding-right: 20px;
  }

  .extracted-data {
    float: right;
    width: 60%;
  }

  .review-container::after {
    content: "";
    display: table;
    clear: both;
  }
}
