/* Copyright (c) 2025 Geotag Photo Editor. All rights reserved. */

:root {
  --primary-color: #4285f4;
  --secondary-color: #34a853;
  --accent-color: #ea4335;
  --light-gray: #f5f5f5;
  --dark-gray: #333;
  --medium-gray: #757575;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: var(--dark-gray);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

header {
  text-align: center;
  margin-bottom: 5px;
  justify-content: center;
  text-align: center;
  background: #425679;
  padding: 15px;
}

a.site-title {
  background-color: transparent;
  font-size: 25px;
  font: 2em sans-serif;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  margin: 0px;
  padding: 0px;
}

.toptext {
  text-align: center;
  margin-bottom: 30px;
  justify-content: center;
  text-align: center;
}

h1 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 25px;
}

.description {
  color: var(--medium-gray);
  margin-bottom: 20px;
}

.app-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.upload-section,
.map-section,
.preview-section {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.map-section,
.preview-section {
  display: none;
}

.section-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
  position: relative;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background-color: rgba(66, 133, 244, 0.05);
}

.upload-area i {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.upload-area p {
  margin-bottom: 15px;
  color: var(--medium-gray);
}

.upload-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

.upload-btn:hover {
  background-color: #3367d6;
}

#imagePreview {
  max-width: 100%;
  max-height: 500px;
  margin-top: 15px;
  display: none;
  border-radius: 4px;
}

#photoCanvas {
  max-width: 100%;
  max-height: 500px;
  margin-top: 15px;
  border-radius: 4px;
}

.progress-container {
  width: 100%;
  background-color: #f1f1f1;
  border-radius: 4px;
  margin-top: 10px;
  display: none;
}

.progress-bar {
  width: 0%;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 4px;
  transition: width 0.3s;
}

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

.map-search {
  display: flex;
  gap: 10px;
}

#locationSearch {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.search-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-btn:hover {
  background-color: #2d9249;
}

.map-address-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

#map {
  height: 350px;
  width: 100%;
  border-radius: 8px;
  flex: 1;
  min-width: 300px;
}

.location-details {
  flex: 1;
  min-width: 300px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 500;
  color: var(--medium-gray);
}

.form-group input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.datetime-picker {
  margin-top: 5px;
}

#datetime {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 5px;
  flex-wrap: wrap;
  align-self: center;
}

.add-location-btn,
.download-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  display: flex;
  gap: 15px;
  margin-top: 5px;
  flex-wrap: wrap;
  align-self: center;
}

.add-location-btn {
  background-color: var(--primary-color);
  color: white;
}

.add-location-btn:hover {
  background-color: #3367d6;
}

.download-btn {
  background-color: var(--secondary-color);
  color: white;
  display: none;
  /* Hidden initially */
}

.download-btn:hover {
  background-color: #2d9249;
}

.preview-container {
  position: relative;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  max-width: 100%;
}

.text {
  margin-top: 20px;
  justify-content: center;
  max-width: 90%;
}

.image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

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

#editedImagePreview {
  max-width: 100%;
  max-height: 500px;
  border-radius: 8px;
  display: none;
}

.geotag-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px;
  font-family: Arial, sans-serif;
  pointer-events: none;
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.geotag-content {
  display: flex;
  align-items: center;
  gap: 15px;
  max-width: 100%;
}

.map-snapshot {
  width: 120px;
  height: 90px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-snapshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-snapshot-placeholder {
  color: #666;
  font-size: 12px;
  text-align: center;
  padding: 10px;
}

.geotag-info {
  flex: 1;
  min-width: 0;
}

.geotag-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geotag-address {
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.geotag-coords {
  font-size: 13px;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.geotag-timestamp {
  font-size: 13px;
  color: #ccc;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 800px) {
  .map-address-wrapper {
    flex-direction: column;
  }

  footer {
    font-size: 13px;
  }
}


#map {
  width: 100% !important;
  height: 300px !important;
  min-height: 250px;
}

.location-details {
  width: 100%;
}

.geotag-content {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.map-snapshot {
  width: 100px;
  height: 75px;
}

footer {
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  position: relative;
  bottom: 0;
  width: 100%;
}


nav {
  background: #070505;
  margin-top: 10px;
  justify-content: center;
  text-align: center;
}

nav a {
  display: inline-block;
  justify-content: center;
  text-align: center;
  padding: 5px 5px;
  color: #968a8a;
  font-size: 17px;
  text-decoration: none;
  background: #070505;
  font-family: Arial, sans-serif;
}

nav a:hover {
  color: rgb(66, 252, 9);
}

.responsive {
  width: 100%;
  height: auto;
}

