* {
  margin: 0%;
  padding: 0%;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar-toggler {
  outline: none !important;
  padding: 0 !important;
}

.navbar-brand img {
  width: 50px
}

.navbar {
  text-align: right;
}

.nav-link {
  color: #2a7c56 !important;
  font-weight: 600;
  margin-left: 30px;
}

.wrapper {
  margin: 20px;
  border-radius: 10px;
  padding-top: 20px;
  padding-bottom: 50px;
  box-shadow: 0 0 40px 2px rgba(37, 73, 214, 0.18);
}

.feature-box {
  padding-left: 30px;
  padding-right: 30px;
  padding-top: 0px;
  padding-bottom: 10px;
}

.btn-container {
  display: flex;
  justify-content: flex-end;
}

.button-info {
  text-align: left;
}

.feature-box h2 {
  margin-top: 10%;
  color: #72d4a6;
}

.feature-box p {
  margin: 40px auto;
  color: black;
}

.feature-img {
  max-width: 100%;
  max-height: 400px;
  height: auto;
  padding: 5px;
  object-fit: fill;
}

.feature-box a {
  text-decoration: none !important;
  background: #048757;
  border-radius: 10px;
  padding: 10px 20px;
  border: 2px solid #048757 !important;
  color: black;

}

.btn-One,
.btn.btn-One {
  background: #048757 !important;
  background-color: #048757 !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 10px;
  border: 2px solid #048757 !important;
}

/* Match Bootstrap .btn-sm size when used with Edit/Delete buttons */
.btn-sm.btn-One,
.btn.btn-sm.btn-One {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.btn-One:hover,
.btn.btn-One:hover {
  color: #222 !important;
  background: #fff !important;
  background-color: #fff !important;
}

.btn-Two {
  background: none !important;
  color: #000000;
  padding: 9px 20px;
  border-radius: 10px;
  width: 100%;
  border: 2px solid #048757 !important;
}

.btn-Two:hover {
  color: white !important;
  background: #048757 !important;
}

.btn-Three {
  background: #048757;
  color: #fff !important;
}

.btn-Three:hover {
  color: black !important;
  background: white;
}

.feature-box h4 {
  color: #72d4a6;
}

.green-text {
  color: #048757;
}

.green-bg {
  background: #048757 !important;
  color: #fff !important;
}

.feature-box input {
  background: transparent;
  border: none;
  border-bottom: 1px solid #000000;
  padding: 2px 5px;
}

.logo {
  object-fit: contain;
  height: 30px;
}

.feature-box textarea:focus, input:focus {
  background: transparent;
  border: 1px solid #048757;
}

.block {
  display: block;
  width: 100%;
  border: none;
  background-color: #048757;
  color: white;
  padding: 14px 20px;
  font-size: 16px;
  cursor: pointer;
  text-align: left !important;
}

.block:hover {
  background-color: green;
  color: black;
}

.column {
  float: left;
  width: 10.33%;
  padding: 2px;
}

/* Clearfix (clear floats) */
.row::after {
  content: "";
  clear: both;
  display: table;
}

/* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
@media screen and (max-width: 500px) {
  .column {
    width: 100%;
  }
}

.column img {
  width: 25%;
  padding: 2px;
  float: right;
}

ion-icon {
  font-size: 25px;
  float: inline-start !important;
}


.rounded-button {
  display: inline-flex !important;
  background: #fff;
  color: #0c0d0d !important;
  justify-content: center;
  align-items: center;
  border-radius: 50% !important;
  width: 50px !important;
  height: 50px !important;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s;

}

.rounded-button:hover {
  background: #9ff9cf;
}

body>footer {
  background: #d8f2d6; /* #5fe45340; */
  color: #048757;
  padding: 10px;
  text-align: center;
  top: 100%;
  position: sticky;
  bottom: 0;
}

.content {
  flex-grow: 1;
  flex-shrink: 0;
  flex-basis: auto;
}

footer a {
  display: inline-flex !important;
  text-align: center;
}

.userlog {
  display: inline;
  justify-items: end;
  margin-right: 0;
  float: right;
  margin-top: 20px;
  align-items: center;
  justify-content: center;

}

h4 {
  color: #048757 !important;
}

.carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 320px;
  /* Set the desired height for the carousel */
  overflow: hidden;
}

.carousel-images {
  display: flex;
  height: 100%;
  object-fit: contain;
}


.carousel-images img {
  height: 100%;
  object-fit: contain;
  /* Ensures the image covers the specified dimensions while maintaining aspect ratio */
  display: none;
}

.carousel-images img.active {
  display: block;
  background-color: #fff;
}

.carousel-button {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

.prev-button {
  left: 10px;
}

.next-button {
  right: 10px;
}

.thumbnails {
  margin-top: 4%;
  display: flex;
  overflow-x: auto;
  justify-content: center;

}

.thumbnails img {
  width: 80px;
  height: 80px;
  cursor: pointer;
  margin: 5px;
  justify-content: center;


}

.thumbnails img.active {
  border-color: #000;
  border: 1px solid #048757;
  box-shadow: 0 4px 8px #d8f2d6;
  background-color: #fff;
  /* Add this line for shadow */
  transition: box-shadow 0.3s ease-in-out;
  /* Add transition for a smooth effect */
}


.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active,
.dot:hover {
  background-color: #717171;
}

.social-icon {
  display: inline-flex !important;
  background: #fff;
  color: #0c0d0d !important;
  justify-content: center;
  align-items: center;
  border-radius: 50% !important;
  width: 50px !important;
  height: 50px !important;
  cursor: pointer;
  border: none;
  font-size: 28px;
  text-decoration: none;
  transition: background 0.2s;
}

.social-icon:hover {
  background: #048757;
  color: white !important;

}

.fa {
    font-size: 50px;
    cursor: pointer;
    user-select: none;
  }
  
  .fa:hover {
    color: rgb(25, 133, 79);
  }
  
  .counter {
    font-size: 20px;
    margin-left: 10px;
    vertical-align: middle;
  }

.cta-buttons {
    margin-top: 20px;
}
.cta-buttons button {
  background: #048757;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 10px;
  border: 2px solid #048757 !important;
}
.cta-buttons button:hover{
  color: black !important;
  background: white;
}

/* Admin page: spacing between content and containers */
.admin-page .admin-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
}
.admin-page .admin-topbar .container {
  margin-bottom: 0;
}
.admin-page .admin-topbar .navbar {
  flex-wrap: nowrap;
  justify-content: space-between;
}
.admin-page .admin-topbar-user {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.admin-page select,
.admin-page .form-select {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.admin-page .container.my-4 {
  margin-top: 0;
  margin-bottom: 2rem;
  flex: 1;
  padding-top: 3.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 2rem;
}
.admin-login-wrapper {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.5rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.admin-page .feature-box {
  padding-top: 0.5rem;
  padding-bottom: 1.25rem;
}
.admin-page .feature-box h4 {
  margin-bottom: 0.75rem;
  padding-top: 0.25rem;
}
.admin-page footer {
  padding-top: 1.25rem;
  padding-bottom: 1rem;
}
.admin-page footer .container {
  padding-top: 0;
}

/* PIP loading overlay during product fetch and link validation */
.pip-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease;
}
.pip-loading[hidden] {
  display: none !important;
}
.pip-loading-content {
  text-align: center;
  color: #fff;
}
.pip-spinner {
  width: 3rem;
  height: 3rem;
  border-width: 0.25em;
}
.pip-loading-text {
  font-size: 1rem;
  color: #fff;
}

/* Admin Products: compact usage/allowance cards */
.usage-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.usage-card {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
  min-width: 0;
}
.usage-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: #111;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}
.usage-card-meta {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 500;
}
.usage-card-meta .usage-count {
  color: #048757;
  font-weight: 600;
}
.usage-card-meta .usage-count.usage-zero {
  color: #2563eb;
}
.usage-card-meta .usage-count.usage-warn {
  color: #d97706;
}
.usage-card-meta .usage-count.usage-danger {
  color: #dc2626;
}
.usage-card-meta .usage-sep {
  color: #9ca3af;
  margin: 0 0.25rem;
}

/* Admin dashboard: stats cards row */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #e8ecea 0%, #dce5e1 100%);
  box-shadow: 0 0 20px 2px rgba(37, 73, 214, 0.08);
}
.admin-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: #048757;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.admin-stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
}
.admin-stat-label {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Admin dashboard: vertical sidebar + content layout */
.admin-layout {
  display: flex;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px 2px rgba(37, 73, 214, 0.08);
  min-height: 400px;
}
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #e8ecea 0%, #dce5e1 100%);
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  margin: 0 0.35rem;
  border-radius: 8px;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-nav-link i {
  font-size: 1.15rem;
  opacity: 0.9;
  flex-shrink: 0;
}
.admin-nav-link:hover {
  background: rgba(4, 135, 87, 0.1);
  color: #048757;
}
.admin-nav-link.active {
  background: #fff;
  color: #111;
  box-shadow: 30px 0 0 0 #fff, 0 4px 16px rgba(0, 0, 0, 0.24);
  border-left: 3px solid #048757;
  margin-left: 0;
  margin-right: 0;
  padding-left: calc(1rem - 3px);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.admin-nav-link.active i {
  opacity: 1;
  color: #048757;
}
.admin-content {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 0;
}
.admin-content .feature-box {
  padding: 1.25rem 1.5rem;
}

/* Link issues tab: table with colgroup for stable column widths, Link widest, no overlap */
.link-issues-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
.link-issues-table .link-issues-col-product { width: 16%; }
.link-issues-table .link-issues-col-gtin    { width: 14%; }
.link-issues-table .link-issues-col-link   { width: 32%; }
.link-issues-table .link-issues-col-date   { width: 12%; }
.link-issues-table .link-issues-col-count  { width: 7%; }
.link-issues-table .link-issues-col-clear  { width: 7%; }
.link-issues-table th,
.link-issues-table td {
  padding: 0.5rem 0.4rem;
  vertical-align: middle;
  overflow: hidden;
  box-sizing: border-box;
}
.link-issues-table .link-issues-product-cell {
  word-wrap: break-word;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}
.link-issues-table .link-issues-gtin-cell {
  word-break: break-all;
  white-space: normal;
  max-width: 0;
}
.link-issues-table .link-issues-link-cell {
  line-height: 1.35;
  max-height: 3em;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
}
.link-issues-table .link-issues-link-cell a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}
.link-issues-table .link-issues-date-cell {
  white-space: nowrap;
  max-width: 0;
}
.link-issues-table .link-issues-count-cell,
.link-issues-table .link-issues-clear-cell {
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
  .admin-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Back to top button – shown when page is scrolled (e.g. footer not in view) */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1020;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #048757;
  background: #fff;
  color: #048757;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.15s ease, color 0.15s ease;
}
.back-to-top:hover {
  background: #048757;
  color: #fff;
}
.back-to-top.back-to-top-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Admin Config: settings cards (OpenAI, Google Search) – theme background, status strip on right */
.config-settings-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #e8ecea 0%, #dce5e1 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 0 20px 2px rgba(37, 73, 214, 0.08);
  overflow: hidden;
}
.config-settings-card .config-card-inner {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}
.config-settings-card .config-card-inner .card-body {
  background: transparent;
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem;
}
.config-settings-card .config-card-status {
  width: 12px;
  min-width: 12px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 0 9px 9px 0;
}
.config-settings-card .config-card-status.status-valid {
  background: #198754;
}
.config-settings-card .config-card-status.status-invalid {
  background: #dc3545;
}
.config-settings-card .config-card-status.status-unknown {
  background: #6c757d;
}

/* Sponsor modal: logo placeholder when no logo */
.sponsor-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  max-width: 120px;
  border: 1px dashed rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
}
.sponsor-logo-placeholder[hidden] {
  display: none !important;
}

/* Scan page: ZXing camera + qrbox overlay */
#my-qr-reader {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 8px;
  background: #000;
}
#my-qr-reader video {
  display: block;
  width: 100%;
  height: auto;
}
#my-qr-reader .scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#my-qr-reader .scan-overlay .qrbox {
  width: 280px;
  height: 140px;
  border: 2px solid rgba(114, 212, 166, 0.9);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
}
#my-qr-reader .scan-error {
  padding: 1rem;
  color: #dc3545;
  text-align: center;
}
