:root {
  --primary-color: #00A36C;
  --hover-color: #198450;
  --bg-color: #64e3A1;
  --bubble-bg: #ffffff;
  --font-size: 1.1rem;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  margin: 0;
  padding: 1rem;
  font-size: var(--font-size);
  color: #333;
}

h2, h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.bubble {
  background-color: var(--bubble-bg);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
  max-width: 100%;
}

label {
  font-weight: bold;
  margin-top: 0.5rem;
  display: block;
}

input[type="text"],
input[type="file"],
select {
  font-size: 1rem;
  padding: 0.6rem;
  margin-top: 0.3rem;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 0.6rem;
}

button {
  font-size: 1rem;
  padding: 0.8rem;
  margin-top: 1rem;
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
}

button:hover {
  background-color: var(--hover-color);
}

#cardIdDisplay, #status, #uploadStatus {
  font-size: 1rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  overflow-x: auto;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}

th {
  background-color: #e0e0e0;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Thumbnail images in table */
td img {
  max-width: 40px;
  max-height: 40px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

/* Search Bar */
#searchInput {
  font-size: 1rem;
  padding: 0.6rem;
  margin-top: 0.3rem;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 0.6rem;
}

/* Include Images Checkbox */
#includeImagesExport {
  margin-right: 0.5rem;
}

/* Auto-save Toast */
#autosaveToast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: #0078D4;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 1000;
}

#autosaveToast.show {
  opacity: 1;
}

/* Floating Image Popup */
.popup-hover {
  position: absolute;
  background: white;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  display: none;
  z-index: 2000; /* above table */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.popup-hover img {
  max-width: 400px;
  max-height: 400px;
  display: block;
}

.popup-hover .close-btn {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* Responsive Adjustments */
@media screen and (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  h2, h3 {
    font-size: 1.3rem;
  }

  input, select, button {
    font-size: 1rem;
  }

  table {
    font-size: 0.85rem;
  }

  .popup-hover img {
    max-width: 90vw;
    max-height: 70vh;
  }
}
