/* Add a modern font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Product+Sans:wght@400;700&display=swap');

body, html {
  width: 100vw;
  margin: 0;
  padding: 0;
  font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
  color: #696761;
  background: linear-gradient(to bottom, #fff, #f8f8f8);
  /* Remove any min-height or padding-top that could cause space above the banner */
  min-height: 0;
  padding-top: 0 !important;
  font-size: clamp(15px, 2vw, 18px);
}

header {
  background: #f5f5f5;
  color: #333;
  padding: 1vw 0;
  text-align: center;
  font-size: 1.5em;
  font-weight: 600;
  border-bottom: 0.1vw solid #ddd;
  box-shadow: 0 0.4vw 0.8vw rgba(0,0,0,0.05);
}

header .header-with-lang {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5vw 2vw 0.5vw 1.5vw;
  background: #fff3e0;
  border-bottom: 0.1vw solid #e0e0e0;
  min-height: 3.5vw;
}

.header-logo-img {
  height: 2.5em;
  max-height: 100%;
  margin-right: 0;
  vertical-align: middle;
}

header .header-logo-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

main {
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.section {
  max-width: 900px;
  width: 100%;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

h1, h2 {
  color: #333;
}

input[type="file"], input[type="text"], input[type="number"], button {
  padding: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  background-color: transparent;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

button:disabled,
button.disabled {
  background: #e0e0e0 !important;
  color: #aaa !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

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

/* Properties related to displaying images in a grid. Used in multiple pages */

/* Ensure .results fills the section */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.15em !important;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Force a constant number of columns (e.g., 4 on desktop, 2 on tablet, 1 on mobile) */
/* @media (min-width: 1200px) {
  .results {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (min-width: 800px) and (max-width: 1199px) {
  .results {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 500px) and (max-width: 799px) {
  .results {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 499px) {
  .results {
    grid-template-columns: 1fr;
  }
} */


.result {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  height: 100%;
  position: relative;
  max-width: 22vw;
  max-height: 32vh;
  width: 100%;
  height: 100%;
} 

.result .select-checkbox {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  width: 1.2em;
  height: 1.2em;
}

.result img {
  max-width: 100%;
  max-height: 22vw;
  object-fit: cover;
  width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 0;
  margin: 0;
  background: none;
  position: relative;
  z-index: 1;
}

.result p {
  font-size: 0.95rem;
  margin: 0.2em 0 0 0;
  text-align: center;
  word-break: break-word;
}

caption {
  display: none !important;
}

footer {
  background-color: #f5f5f5;
  color: #333;
  text-align: center;
  padding: 2vw;
  position: relative;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  box-sizing: border-box;
}

.footer-content {
  flex: 1;
  text-align: center;
  margin-right: 0;
}



@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Buttons in the top of the my images page */

.my-images-delete-btn {
  background: #d32f2f !important;
  color: #fff !important;
  font-weight: bold !important;
  border: 1.5px solid #b71c1c !important;
  box-shadow: 0 1px 4px rgba(211,47,47,0.08);
  transition: background 0.2s, color 0.2s;
}
.my-images-delete-btn:hover {
  background: #b71c1c !important;
  color: #fff !important;
}

.my-images-delete-btn:disabled {
  background: #e0e0e0 !important;
  color: #aaa !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.my-images-controls-row {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
}

.my-images-action-btn {
  padding: 0.4em 1.1em;
  font-size: 0.98em;
  border-radius: 6px;
  background: #f5f5f5;
  color: #333;
  min-width: 90px;
  min-height: 40px;
  font-weight: 500;
  margin: 0;
  border: 1.5px;
  margin-bottom: 1em;
  transition: background 0.2s, color 0.2s;
}
.my-images-action-btn:hover {
  background: #e0e0e0;
  color: #1976d2;
  border-color: #bdbdbd;
}

/* -------------------------- */

.navbar {
  background: #fff !important;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 0;
  font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
}

.menu {
  background: #fff !important;
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 900px;
  min-height: 64px;
  gap: 2rem;
  font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
}

.menu li {
  margin: 0;
}

.menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #696761 !important;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
  text-align: center;
  font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
  background: transparent;
}

.menu a:hover, .menu a:focus {
  background: #f0e7d8 !important;
  color: #b08a53 !important;
  box-shadow: 0 2px 8px rgba(176,138,83,0.08);
}

.search-fields-box {
  margin-bottom: 1.5rem;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.date-box {
  margin: 1rem 0 0.5rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e0e6ed;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.search-fields-box input[type="text"],
.search-fields-box input[type="number"],
.search-fields-box input[type="date"],
.search-fields-box select,
.search-fields-box input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  margin-bottom: 0.25rem;
  box-sizing: border-box;
  transition: border 0.2s;
}

.search-fields-box input[type="text"]:focus,
.search-fields-box input[type="number"]:focus,
.search-fields-box input[type="date"]:focus,
.search-fields-box select:focus {
  border: 1.5px solid #1976d2;
  outline: none;
}

.search-fields-box label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #333;
}

.search-fields-box strong {
  color: #1976d2;
}

.date-box label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #333;
}

.date-box strong {
  color: #1976d2;
}

.search-form button[type="button"] {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: background 0.2s, box-shadow 0.2s;
}
.search-form button[type="button"]:hover {
  background: #e0e0e0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}

.search-fields-outer {
  background: #f4f4f6;
  border-radius: 22px;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.search-field-group {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border: 2px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

.date-box.search-field-group {
  background: #f8f8f8;
  border: 2px solid #e0e0e0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.search-field-title {
  font-size: 1.12rem;
  font-weight: bold;
  color: #222;
  margin-bottom: 0.5rem;
  display: block;
}

.search-field-group select,
.search-field-group input[type="text"],
.search-field-group input[type="number"],
.search-field-group input[type="date"],
.search-field-group input[type="file"] {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid #cfd8dc;
  border-radius: 8px;
  font-size: 1.12rem;
  background: #fff;
  margin-bottom: 0.1rem;
  box-sizing: border-box;
  transition: border 0.2s;
}

.search-field-group select:focus,
.search-field-group input[type="text"]:focus,
.search-field-group input[type="number"]:focus,
.search-field-group input[type="date"]:focus {
  border: 2px solid #1976d2;
  outline: none;
}

.search-field-group label {
  font-weight: bold;
  margin-bottom: 0.25rem;
  color: #222;
}

.date-box label.search-field-title {
  color: #222;
}

.date-inline-fields {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: nowrap;
}

.date-inline-fields input[type="number"] {
  width: 4em;
  margin: 0 0.3em;
}

.date-inline-fields select {
  min-width: 5em;
  margin: 0 0.3em;
}

/* header style  */
.header-with-lang {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem 0.5rem 1.5rem;
  background: #fff3e0;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  min-height: 56px;
  color: #696761 !important;
}

/* Landing page styles moved from index.html */
.landing-hero {
  padding: 4rem 2rem;
  background: #fff3e0;
  position: relative;
  overflow: hidden;
}
.landing-hero-content {
  max-width: 80%;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}
.landing-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #5c5c55;
}
.landing-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #555;
}
.landing-columns {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}
.landing-columns.landing-3col {
  flex-direction: row;
}
.landing-column {
  flex: 1;
  min-width: 300px;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  position: relative;
  z-index: 5;
}
.landing-column h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #333;
}
.landing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.landing-list li {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
  position: relative;
}
.landing-list li:before {
  content: '⦿';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2rem;
  color: #4caf50;
  line-height: 1;
}
/* End landing page styles */

/* Make sure the gap is visible on all screens */
@media (max-width: 600px) {
  .search-fields-box {
    gap: 1.2rem;
    padding: 1rem 0.5rem;
  }
  #metadata-form .search-fields-box {
    padding: 1.2rem 0.5rem;
  }
}

@media (max-width: 900px) {
  .menu {
    max-width: 100vw;
    gap: 0.5rem;
    font-size: 1rem;
  }
  .menu a {
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
  }
}

/* --- Fix for API Documentation page --- */
.api-section {
  margin-bottom: 2.5em;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 2em 2em 1.5em 2em;
  border: 1px solid #e0e0e0;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}
.api-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 1.5em;
  color: #007BFF;
}
.api-method {
  font-weight: bold;
  color: #007BFF;
  margin-right: 0.5em;
}
.api-path {
  font-family: monospace;
  color: #333;
}
.api-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5em 0 1.5em 0;
  font-size: 1em;
}
.api-table th, .api-table td {
  border: 1px solid #ccc;
  padding: 0.5em 0.75em;
  text-align: left;
}
.api-table th {
  background: #f5f5f5;
}
.api-desc {
  margin-bottom: 0.5em;
  color: #444;
}

/* --- Fix for Clear All Filters button --- */
#clear-all-filters-btn {
  background: #f5f5f5;
  border: 1px solid #ccc;
  color: #888;
  font-size: 1em;
  padding: 0.3em 1.2em;
  margin-left: 1em;
  margin-bottom: 0;
  cursor: pointer;
  box-shadow: none;
  font-weight: 400;
  text-decoration: underline dotted transparent;
  border-radius: 6px;
  min-width: unset;
  width: auto;
  line-height: 1.2;
  transition: color 0.2s, text-decoration-color 0.2s;
}
#clear-all-filters-btn:hover {
  color: #444;
  text-decoration-color: #aaa;
  text-decoration: underline;
}

/* --- Fix for Metadata Search Page layout --- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem 2.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
  .meta-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Fix for Pricing Page --- */
.pricing-hero {
  padding: 4rem 2rem;
  background: #fff3e0;
  text-align: center;
}
.pricing-title {
  font-size: 2.8rem;
  color: #5c5c55;
  margin-bottom: 0.5rem;
}
.pricing-subtitle {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 2.5rem;
}
.pricing-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}
.pricing-plan {
  flex: 1 1 320px;
  max-width: 350px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 2.5rem 2rem 2rem 2rem;
  margin: 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #f5e6d8;
}
.pricing-plan h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-size: 2.2rem;
  color: #4caf50;
  margin-bottom: 1rem;
  font-weight: bold;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  text-align: left;
  width: 100%;
}
.pricing-features li {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
  position: relative;
}
.pricing-features li:before {
  content: '✔';
  position: absolute;
  left: 0;
  color: #4caf50;
  font-size: 1.1rem;
}
.pricing-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
}
.pricing-actions a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  background: #4caf50;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.2s;
  margin-bottom: 0.2rem;
}
.pricing-actions a.secondary {
  background: #fff3e0;
  color: #b08a53;
  border: 1.5px solid #b08a53;
}
.pricing-actions a:hover {
  background: #388e3c;
  color: #fff;
}
.pricing-actions a.secondary:hover {
  background: #f0e7d8;
  color: #b08a53;
}
@media (max-width: 900px) {
  .pricing-columns {
    flex-direction: column;
    align-items: center;
  }
  .pricing-plan {
    max-width: 95vw;
    width: 100%;
  }
}

#dev-warning-banner {
  width: 100%;
  background: #ff9800;
  color: #fff;
  padding: 0.75em 0.5em;
  text-align: center;
  font-weight: bold;
  position: relative;
  top: 0;
  left: 0;
  z-index: 1;
  font-size: 1.1em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  word-break: break-word;
  box-sizing: border-box;
  max-height: none;
  overflow: visible;
  margin: 0 0 1em 0;
}

#search-tabs .tab-btn {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1.1em 2.5em;
  min-width: calc(10vw + 50px);
  border: none;
  background: #f5f5f5;
  color: #333;
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
#search-tabs .tab-btn.active {
  background: #fff;
  color: #b08a53;
  border-bottom: 2px solid #fff;
  font-weight: 700;
}
#search-tabs .tab-btn:not(.active):hover {
  background: #f0e7d8;
  color: #b08a53;
}

#loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#loading-spinner .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Make the section containing .results full width and remove padding */
.section#search-section {
  max-width: 95vw;
  width: 100%;
  margin: 4vw auto;
  padding: 4vw 2vw;
  background: white;
  border-radius: 2vw;
  box-shadow: 0 0.8vw 1.6vw rgba(0,0,0,0.05);
  border: 0.1vw solid #e0e0e0;
  overflow: hidden;
}



.face-item {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: #f8f8f8;
  border-radius: 1em;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  margin: 0;
}

.face-item .face-img-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
}

.face-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 1em 1em 0 0;
  z-index: 0;
  background: #f3f3f3;
}

#global-lang-select-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

#lang-select-label {
  margin-right: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  vertical-align: middle;
}

#lang-flag-icon {
  width: 40px;
  height: 40px;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* Language Dropdown Styles */
/* With this: */
#lang-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: none;
  min-width: 180px;
  z-index: 9999;
  padding: 0.25rem 0;
  width: 200px;
}

#lang-dropdown.show {
  display: block;
}

#lang-dropdown .lang-dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  cursor: pointer;
  gap: 0.5rem;
  transition: background 0.2s;
}

#lang-dropdown .lang-dropdown-item:hover {
  background: #f0f0f0;
}

#lang-dropdown .lang-dropdown-item.selected {
  font-weight: bold;
  background: #f5f5f5;
}

#lang-dropdown .lang-flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}


/* ---------------------------- */


#global-lang-select-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  padding: 8px 12px;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

#lang-dropdown {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 8px 0;
  min-width: 180px;
  z-index: 1001;
  display: none;
}

#lang-dropdown div {
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

#lang-dropdown div:hover {
  background: #f5f5f5;
}

#lang-flag-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.sign-in-btn {
  margin-left: 0.5em;
  padding: 0.5em 1.5em;
  font-size: 1rem;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.sign-in-btn:hover {
  background: #388e3c;
}
.user-greeting {
  margin-left: 0.2em;
  font-weight: bold;
  color: #4caf50;
  display: inline-block;
  vertical-align: middle;
}

/* Profile/account button in header */
.profile-link-btn {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  vertical-align: middle;
  cursor: pointer;
  height: auto;
  width: auto;
  gap: 0.3em;
}
.profile-link-btn .profile-icon-img {
  width: 1.7em;
  height: 1.7em;
  display: block;
  object-fit: contain;
  margin: 0;
  padding: 0;
}
.profile-link-btn .user-greeting {
  margin-left: 0;
  font-weight: bold;
  color: #4caf50;
  font-size: 1.3em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* Utility classes for display and spacing */
.flex {
  display: flex !important;
}
.flex-center {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.gap-1rem {
  gap: 1rem !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1_5rem {
  margin-bottom: 1.5rem !important;
}
.mt-24px {
  margin-top: 24px !important;
}
.p-16px {
  padding: 16px !important;
}
.bg-f9 {
  background: #f9f9f9 !important;
}
.rounded-8px {
  border-radius: 8px !important;
}
.box-shadow-light {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}
.font-1_1rem {
  font-size: 1.1rem !important;
}
.hidden { display: none !important; }

/* AI warning banner style */
.ai-warning {
  color: #b26a00;
  background: #fff3e0;
  border-radius: 8px;
  padding: 0.75em 1.5em;
  margin-bottom: 1.2em;
  font-weight: bold;
  text-align: center;
  display: none;
}
.ai-warning.active, .ai-warning[style*="display:block"] {
  display: block !important;
}

/* Upload result box */
.upload-result {
  margin-top: 24px;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  font-size: 1.1rem;
}

/* Spinner override for upload page */
#loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#loading-spinner .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: auto;
}

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

/* Pricing page price span */
.pricing-price span {
  font-size: 1rem;
  color: #888;
  font-weight: 400;
}

/* Pagination controls for label faces */
.pagination-controls {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Utility for hiding elements */
.d-none { display: none !important; }

/* Utility for showing elements */
.d-block { display: block !important; }

.logo-landing {
  width: 14vw;
  margin: 1rem auto 1.2rem auto;
  display: block;
}

.sign-out-btn {
  background: none;
  color: #888;
  border: none;
  border-radius: 0;
  padding: 0 8px;
  margin-left: 0.5em;
  cursor: pointer;
  font-size: 0.5em;
  text-decoration: underline dotted transparent;
  transition: color 0.2s, text-decoration-color 0.2s;
  display: inline-block;
  vertical-align: middle;
}
.sign-out-btn:hover {
  color: #b26a00;
  text-decoration-color: #b26a00;
  background: none;
}

.banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  min-width: 320px;
  max-width: 90vw;
  padding: 1.5em 2.5em;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  background: #fffbe7;
  color: #333;
  opacity: 0.98;
  pointer-events: auto;
  transition: opacity 0.2s, top 0.2s, transform 0.2s;
}

.banner.error {
  background: #ffeaea;
  color: #b20000;
  border: 1.5px solid #b20000;
}

.banner.success {
  background: #eaffea;
  color: #1a7f1a;
  border: 1.5px solid #1a7f1a;
}

.ai-search-lang-note {
  color: #888;
  font-size: 0.95em;
  margin-top: 0.2em;
  display: none;
}

.image-checkbox {
  width: 1.0em;
  height: 1.0em;
  transform: scale(1.3);
  accent-color: #4caf50;
}

/* Toggle switch for Allow duplicated control */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .2s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #4caf50;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

#upload-progress-container {
  display: none;
  margin: 1em 0;
}
#upload-progress-label {
  margin-bottom: 0.3em;
  font-weight: 500;
}
#upload-progress-bar {
  width: 100%;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
  height: 18px;
}
#upload-progress-bar-inner {
  height: 100%;
  width: 0;
  background: #4caf50;
  transition: width 0.2s;
  position: relative;
  overflow: visible;
  min-width: 0;
}
#upload-progress-bar-inner::after {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.15) 100%);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite linear;
  pointer-events: none;
  z-index: 2;
}
@keyframes shimmer {
  100% {
    transform: translateX(200%);
  }
}

.duplicate-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(220, 0, 0, 0.55);
  color: #fff;
  font-weight: bold;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 3;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
  letter-spacing: 0.05em;
}

/* Image view modal */

/* Base modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: rgba(50, 50, 50, 0.9);
}

/* Modal image/content wrapper */
.modal-image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 60vh;
}

/* Shared modal content styles */
.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  margin: 0 auto 8px auto;
  display: block;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Modal close button */
.modal .close,
.modal-close {
  position: absolute;
  top: 1vw;
  right: 2vw;
  font-size: 3vw;
  color: white;
  cursor: pointer;
}

/* Modal actions section */
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 18px;
  margin-top: 18px;
}
.modal-actions > * {
  margin-top: 0;
}

/* Base button style for modal action buttons */
.modal-action-btn,
.modal-download-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 120px;
  font-size: 1.05em;
  border-radius: 8px;
  padding: 0 18px;
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  vertical-align: middle;
}
.modal-action-btn img,
.modal-download-btn img {
  height: 1.2em;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
}
.modal-action-btn:hover {
  background: #e0e0e0;
  color: #1976d2;
  border-color: #bdbdbd;
}
.modal-action-btn:disabled,
.modal-action-btn[disabled] {
  background: #e0e0e0 !important;
  color: #aaa !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}
.modal-delete-btn {
  background: #d32f2f !important;
  color: #fff !important;
  border: 1.5px solid #b71c1c !important;
  font-weight: bold !important;
}
.modal-delete-btn:hover {
  background: #b71c1c !important;
  color: #fff !important;
}
/* Optional: for icon beside buttons */
.modal-delete-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin-right: 8px;
}


/* Edit metadata button */

#save-metadata-btn, #undo-metadata-btn {
  height: 36px;
  min-width: 80px;
  max-width: 180px;
  font-size: 1em;
  border-radius: 6px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  vertical-align: middle;
  margin: 0;
}
#save-metadata-btn img, #undo-metadata-btn img {
  height: 1.1em;
  width: auto;
  margin-right: 6px;
  vertical-align: middle;
  display: inline-block;
}
#save-metadata-btn:hover, #undo-metadata-btn:hover {
  background: #e0e0e0;
  color: #1976d2;
  border-color: #bdbdbd;
}
#save-metadata-btn:disabled, #undo-metadata-btn:disabled {
  background: #e0e0e0 !important;
  color: #aaa !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}
#metadata-actions-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  width: 100%;
}

#metadata-edit-thumbnail {
  max-width: 18vw;
  max-height: 18vw;
  margin-bottom: 1.5rem;
  margin-right: 2rem;
  float: left;
  display: block;
}
#metadata-edit-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  display: block;
}
@media (max-width: 700px) {
  #metadata-edit-thumbnail {
    float: none;
    margin-right: 0;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 40vw;
    max-height: 40vw;
  }
}

/* Allow metadata edit section to expand fully */
.section#metadata-edit-section {
  width: 80%;
  max-width: 80%;
  box-sizing: border-box;
}

.metadata-disabled-field {
  background: #f0f0f0 !important;
  color: #aaa !important;
  border-color: #ddd !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
  pointer-events: none !important;
}