body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.description {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.file-input-container {
    width: 100%;
    text-align: center;
}

.file-input-label {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-input-label:hover {
    background-color: #2980b9;
}

input[type="file"] {
    display: none;
}

.submit-button {
    padding: 12px 36px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #27ae60;
}

.file-list {
    margin-top: 20px;
    min-height: 50px;
    width: 100%;
    padding: 10px;
    border: 2px dashed #bdc3c7;
    border-radius: 5px;
    text-align: center;
}

.requirements {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.requirements ul {
    margin: 10px 0;
    padding-left: 20px;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.invalid {
    border-color: #e74c3c;
}

.download-section {
    margin-top: 20px;
    text-align: center;
    display: none;
}

.download-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.download-link:hover {
    background-color: #2980b9;
}

.download-link.disabled {
  background-color: #cccccc;
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
    display: none;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s ease;
}

.progress-animated {
    background: linear-gradient(
        90deg,
        #2ecc71 0%,
        #3498db 25%,
        #2ecc71 50%,
        #3498db 75%,
        #2ecc71 100%
    );
    background-size: 200% 100%;
    animation: progress-animation 1.5s infinite linear;
}

@keyframes progress-animation {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.processing {
    display: none;
    text-align: center;
    color: #666;
    margin-top: 20px;
    font-weight: 500;
}

.map-container {
    margin-top: 20px;
    display: none;
    border-radius: 5px;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 5px;
}

.map-marker-info {
    padding: 10px;
    max-width: 250px;
}

.map-marker-info img {
    display: block;
    margin: 10px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gm-style .gm-style-iw-c {
    padding: 12px !important;
}

.tabs {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 12px 24px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.tab-button.active {
    background-color: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.dropzone {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
}

.dropzone.dragover {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.dropzone-content p {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.requirements {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
}

.requirements ul {
    margin: 10px 0;
    padding-left: 20px;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.invalid {
    border-color: #e74c3c;
}

.download-section {
    margin-top: 20px;
    text-align: center;
    display: none;
}

.download-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.download-link:hover {
    background-color: #2980b9;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
    display: none;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s ease;
}

.processing {
    display: none;
    text-align: center;
    color: #666;
    margin-top: 20px;
}

.map-container {
    margin-top: 20px;
    display: none;
    border-radius: 5px;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 400px;
    border-radius: 5px;
}

.map-marker-info {
    padding: 10px;
    max-width: 250px;
}

.map-marker-info img {
    display: block;
    margin: 10px auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gm-style .gm-style-iw-c {
    padding: 12px !important;
}

.tabs {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 12px 24px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.tab-button.active {
    background-color: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.processed-image-card {
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-header {
  background-color: #f8f9fa;
  padding: 10px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.image-container {
  padding: 10px;
  text-align: center;
}

.processed-image {
  max-width: 100%;
  max-height: 300px;
}

.image-info {
  padding: 15px;
}

.location-info {
  margin-bottom: 10px;
}

.text-info {
  margin-bottom: 10px;
}

.extracted-text {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.9rem;
  border-left: 3px solid #007bff;
  margin-top: 5px;
}

.date-time {
  display: flex;
  justify-content: space-between;
  color: #6c757d;
}

/* Coordinate Edit Card Styles */
.coordinate-edit-card {
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.coordinate-edit-card .card-header {
  background-color: #f8f9fa;
  padding: 10px 15px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.status-badge {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 12px;
  background-color: #f0f0f0;
}

.status-badge.pending {
  background-color: #ffc107;
  color: #212529;
}

.status-badge.confirmed {
  background-color: #28a745;
  color: white;
}

.thumbnail-container {
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.image-thumbnail {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.coordinate-edit-form {
  padding: 15px;
}

.extracted-text {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.9rem;
  border-left: 3px solid #007bff;
  margin-top: 5px;
}

.address-display {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  margin-top: 5px;
  font-size: 0.9rem;
}

/* Modal styles for full-size image */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: auto;
  max-width: 90%;
  max-height: 80vh;
}

#imageCaption {
  margin: auto;
  display: block;
  width: 80%;
  text-align: center;
  color: white;
  padding: 10px 0;
  height: 150px;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
}

.image-thumbnail {
  cursor: pointer;
  transition: opacity 0.3s;
}

.image-thumbnail:hover {
  opacity: 0.8;
}

/* Error highlighting for invalid coordinates */
.error-highlight {
  border: 2px solid #e74c3c;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

#batch-download-button-container {
  background-color: #f8fff8;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #28a745;
  margin-top: 30px;
  box-shadow: 0 2px 10px rgba(40, 167, 69, 0.15);
  animation: fadeIn 0.5s ease-out;
}

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

#batch-download-button-container .btn {
  transition: all 0.3s ease;
  padding: 10px 24px;
}

#batch-download-button-container .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Show on map button */
.show-on-map-btn {
  padding: 5px 10px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.2s;
  margin-left: 10px;
}

.show-on-map-btn:hover {
  background-color: #5a6268;
}

.show-on-map-btn i {
  margin-right: 3px;
}

/* Animation for updated address */
@keyframes highlight {
  0% { background-color: #fff; }
  30% { background-color: #d1ecf1; }
  100% { background-color: #f8f9fa; }
}

.address-updated {
  animation: highlight 1.5s ease;
}

/* Coordinate input validation */
.coordinate-input-error {
  border-color: #dc3545;
}

.coordinate-input-success {
  border-color: #28a745;
}

/* Add coordinate info tooltip */
.coordinate-tooltip {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #6c757d;
  cursor: help;
}

.form-group-coordinate {
  position: relative;
}

/* Date time input styling */
.form-group-datetime {
  position: relative;
}

.date-input,
.time-input,
.timezone-input {
  font-size: 0.9rem;
  padding: 6px 8px;
}

.timezone-input::placeholder {
  color: #adb5bd;
  font-size: 0.85rem;
}

/* Animation for updated date/time fields */
@keyframes highlight-field {
  0% { background-color: #fff; }
  30% { background-color: #d1ecf1; }
  100% { background-color: #fff; }
}

.field-updated {
  animation: highlight-field 1.5s ease;
}

/* Watermark Editor Styles */
.watermark-editor-container {
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.watermark-edit-item {
  border: 1px solid #dee2e6;
  margin-bottom: 15px;
}

.watermark-edit-item .card-header {
  background-color: #f8f9fa;
  padding: 10px 15px;
}

.watermark-edit-item .image-thumbnail {
  max-width: 100%;
  max-height: 180px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.watermark-edit-item .image-thumbnail:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.watermark-edit-item .thumbnail-container {
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.watermark-text-editor {
  font-family: monospace;
  font-size: 0.9rem;
  resize: vertical;
  white-space: pre;
}

.watermark-text-editor:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Adding animation for field updates */
@keyframes highlight-watermark-edit {
  0% { background-color: #fff; }
  30% { background-color: #d1ecf1; }
  100% { background-color: #fff; }
}

.field-updated {
  animation: highlight-watermark-edit 1.5s ease;
}

/* Improve the preview container layout */
#watermarkPreviewContainer .card-header {
  padding: 12px 20px;
}

#watermarkPreviewContainer .card-body {
  padding: 20px;
}

#watermarkPreviewContainer .card-footer {
  padding: 12px 20px;
  background-color: #f8f9fa;
}

/* Style for the control buttons */
#confirmWatermarkEdits {
  transition: all 0.3s ease;
}

#confirmWatermarkEdits:hover {
  background-color: #0069d9;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(38, 143, 255, 0.5);
}

#cancelWatermarkPreview {
  transition: all 0.3s ease;
}

#cancelWatermarkPreview:hover {
  background-color: #5a6268;
}