
/* ================= Final HalmTDH Responsive Style ================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Rockwell' !important;
  background-color: #1074a2;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container-fluid.main-content {
  flex: 1 0 auto;
  padding: 20px;
  background-color: #1074a2;
  min-height: calc(100vh - 200px); /* Adjust this based on your nav + footer height */
}


/* main {
  max-height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
} */

.row.h-100 {
  height: auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
}

/* Navigation Bar */
.navbar {
  background-color: #1074a2;
}

.navbar-brand {
  font-size: 26px;
  font-weight: bold;
  color: white;
}

.navbar-nav {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.navbar-button {
  background-color: #068b96;
  color: white !important;
  border-radius: 12px;
  padding: 14px 0;
  margin: 5px 8px;
  font-size: 20px;
  font-weight: bold;
  border: none;
  transition: filter 0.2s;
  text-align: center;
  display: inline-block;
  position: relative;

  width: 100%;
  min-width: 120px;
  /* max-width: 160px; */
}

.navbar-button:after {
  background-color: #02b08a;
  border-radius: 16px;
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: -4px;
  z-index: -1;
}

.navbar-button:hover {
  filter: brightness(1.1);
}


.about-container {
  background-color: #0d93c4 !important;
  padding: 10px !important;
  border-radius: 20px;
  max-width: 960px;
  margin: 0 auto; /* center horizontally */
  color: black;
  /* max-height: 80%; */
}

.about-text {
  font-size: 18px;
  line-height: 1.7;
}


.references-container {
  background-color: #0d93c4;
  padding: 5px;
  border-radius: 8px;
  max-width: 960px;
  margin: 0px auto 0 auto;
  color: white;
  /* max-height: 20%; */
}

.references-container h2 {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 5px;
}

.references-list {
  list-style-type: disc;
  padding-left: 10px;
  font-size: 14px;
  line-height: 1.6;
}



/* Page Title */
.page-indicator {
  text-align: center;
  padding: 20px 0;
  background-color: #0d93c4;
  border-bottom: 2px solid #005f7f;
}

.page-indicator h1 {
  font-size: 36px;
  color: white;
  margin: 0;
}

/* Section Containers */
.crop-section,
.uploader-section,
.results-section {
  background-color: #0a93c3;
  border-radius: 15px;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.crop-section {
  /* margin-left: 10px; */
  flex: 0 0 25%;
  max-width: 25%;
  max-height: 100%;
}

.uploader-section {
  flex: 0 0 25%;
  max-width: 100%;
  align-items: center;
  position: relative;
  max-height: 90%;
}

.results-section {
  margin-right: 10px;
  flex: 0 0 25%;
  max-width: 25%;
  max-height: 100%;
}

.crop-section h2,
.uploader-section h2,
.results-section h2 {
  font-size: 24px;
  text-align: center;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Crop Radio Buttons */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 10px;
  margin-bottom: 5%;
}

.radio-group input[type="radio"] {
  transform: scale(1.5);
  margin-right: 10px;
}

.radio-group label {
  font-size: 18px;
}

.download-sample-wrapper {
  margin-top: auto;
  text-align: center;
}


.image-uploader-section {
  padding-right: 0px !important;
  padding-left: 0px !important;
}

/* Upload Area */
.image-placeholder {
  background-color: #0b4a6a;
  border: 2px dashed white;
  width: 75%;
  height: 360px;
  position: relative;
  margin-bottom: 20px;
  /* display: flex; */
  justify-content: center;
  align-items: center;
  overflow: visible;
}

#imagePlaceholder p {
  color: #ccc;
  font-size: 18px;
  position: absolute;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#previewCanvas {
  touch-action: none;
}

.zoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zoom-controls button {
  background-color: white;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  padding: 6px 12px;
  cursor: pointer;
}

/* Unified Button Styling (structure only) */
.button-19 {
  appearance: button;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  box-sizing: border-box;
  color: #FFFFFF;
  cursor: pointer;
  display: inline-block;
  font-family: 'Roboto Slab';
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .8px;
  line-height: 20px;
  margin: 0;
  outline: none;
  padding: 13px 16px;
  text-align: center;
  text-transform: uppercase;
  touch-action: manipulation;
  transform: translateZ(0);
  transition: filter .2s;
  user-select: none;
  position: relative;
  white-space: nowrap;
  width: auto;
}

.button-19:after {
  background-clip: padding-box;
  background-color: #1CB0F6;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  bottom: -4px;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
}

.button-19:hover:not(:disabled) {
  filter: brightness(1.1);
  -webkit-filter: brightness(1.1);
}

.button-19:disabled {
  cursor: auto;
}

.button-19:active {
  border-width: 4px 0 0;
  background: none;
}

#uploadBtn { background-color: #2b2b2b; }
#clearBtn { background-color: #ef584b; }
#countBtn { background-color: #00765c; }
.download-btn { background-color: #2b2c27; }
.download-sample-btn { background-color: #2b2c27;}
.navbar-button { background-color: #068b96; }

#uploadBtn::after {
  background-color: #444444;
}

#clearBtn::after {
  background-color: #ff7366;
}

#countBtn::after {
  background-color: #02b08a;
}

.download-btn::after {
  background-color: #777777;
}

.download-sample-btn::after {
  background-color: #777777;
}

.navbar-button::after {
  background-color: #02b08a;
}

/* Wrapper: fixed height and horizontal scroll if needed */
.results-scroll-wrapper {
  min-height: 400px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
  background-color: #0a93c3;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 5%;
}

/* Table: full width and columns distribute evenly */
.results-table {
  width: 100%;                  /* Force table to use full container width */
  table-layout: fixed;          /* Ensures equal column width distribution */
  border-collapse: collapse;
  font-size: 14px;
  color: white;
}

.results-table th,
.results-table td {
  width: auto;
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #0a93c3;
  word-wrap: break-word;        /* Wrap content if it's long */
}

.results-table thead {
  background-color: #0c4a6b;
  position: sticky;
  top: 0;
}


.results-table tbody tr:nth-child(even) {
  background-color: #0a93c3;
}

.results-table tbody tr:nth-child(odd) {
  background-color: #1573a0;
}

.results-table tbody tr:hover {
  background-color: #0c4a6b;
}

/* Arrows */
.nav-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ee7569;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 #a50302;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
}

#prevBtn {
  left: 20px; /* just outside the border */
}

#nextBtn {
  right: 20px;
}

#prevBtn::before {
  content: "";
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

#nextBtn::before {
  content: "";
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

#dragBtn,
#selectBtn {
  right: 20px;
}

#dragBtn {
  background-color: #52534e;
  box-shadow: 0 4px 0 #262c28;
  top: 60%; /* 60px below #nextBtn */
}

#selectBtn {
  background-color: #52534e;
  box-shadow: 0 4px 0 #262c28;
  top: 70%; 
}

#selectBtn::before {
  background-color: #444444 !important;
}

.form-check {
  position: absolute !important;
  top: calc(70% + 50px); /* 50px below selectBtn's 70% */
  right: 8px;
  z-index: 10;
  font-size:14px;
}
.form-check-label {
  padding-top:5px;
  color: #30333f;
  font-weight: bold;
}



/* Position wrapper */
/* .select-btn-wrapper {
  position: relative;
  display: inline-block;
} */

/* Style the badge */
.new-badge {
  position: absolute;
  top: 63%; 
  right: 25px;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  animation: bounce 1s ease-in-out infinite;
}

/* Simple bounce animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}





/* Base Footer */
footer {
  background-color: #3498db;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
}

/* Stylized Visitor Button (Button-53 + Positioning) */
.visitor-counter {
  background-color: #ee7569;
  border: 0 solid #E5E7EB;
  box-sizing: border-box;
  color: #000000;
  display: flex;
  align-items: center;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 0.95rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1.5rem;
  padding: 0.85rem 1rem;
  position: absolute;
  right: 20px;
  top: 55%;
  transform: translateY(-50%) rotate(-2deg);
  text-align: center;
  text-decoration: none;
  width: auto;
  min-width: 100px;
  max-height: 65%;
  border-radius: 12px;
  user-select: none;
  cursor: default;
}

/* Outline effect like Button-53 */
.visitor-counter::after {
  content: '';
  position: absolute;
  border: 1px solid #000000;
  bottom: 4px;
  left: 4px;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
  border-radius: 12px;
  z-index: -1;
}

.visitor-counter:hover::after {
  bottom: 2px;
  left: 2px;
}

/* Animate only the count number */
@keyframes slideInFromTop {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.count-animate {
  display: inline-block;
  animation: slideInFromTop 0.6s ease-out;
}






/* Responsive Fixes */
/* Responsive Fixes */
@media (max-width: 992px) {
  .row.h-100 {
    flex-direction: column;
    align-items: stretch;
  }

  .crop-section,
  .uploader-section,
  .results-section {
    max-width: 100%;
  }

  .image-placeholder {
    width: 90%;
    height: 280px;
  }

  .button-19 {
    width: 100%;
    font-size: 14px;
  }
}

@media (max-width: 992px) {
  .navbar-button {
    width: 100% !important;
    display: block;
    text-align: center;
    margin: 10px 0;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
}


@media (max-width: 994px) {
  .nav-arrow {
    width: 36px;
    height: 36px;
  }

  #prevBtn {
    left: 5px;  /* ✅ inside left edge of parent container */
  }

  #nextBtn {
    right: 5px;  /* ✅ inside right edge of parent container */
  }

  #prevBtn::before,
  #nextBtn::before {
    width: 12px;
    height: 12px;
  }


  #dragBtn, #selectBtn {
    right: 5px;
  }

  #dragBtn::before,
  #selectBtn::before {
    width: 12px;
    height: 12px;
  }
  .new-badge{
    top: 60%;
    right: 5px;
  }


  .form-check {
    top: calc(70% + 40px); /* slightly closer */
    right: 5px;
    font-size: 12px;
  }
}


@media (max-width: 768px) {
  .nav-arrow {
    width: 36px;
    height: 36px;
  }

  #prevBtn {
    left: 0px;  /* ✅ inside left edge of parent container */
  }

  #nextBtn {
    right: 0px;  /* ✅ inside right edge of parent container */
  }

  #prevBtn::before,
  #nextBtn::before {
    width: 12px;
    height: 12px;
  }

  #dragBtn, #selectBtn {
    right: 0px;
  }
  .new-badge{
    top: 60%;
    right: 0px;
  }

  .form-check {
    top: calc(70% + 30px); /* even closer */
    right: 0px;
    font-size: 8px;
  }

  .form-check-label {
    padding-top:10px;
  }

}









@media (max-width: 1430px) {
  .form-check {
    top: calc(70% + 50px); /* even closer */
    right: 6px;
  }

  .form-check-label {
    padding-top:5px;
    font-size: 12px;
  }
}



@media (max-width: 1350px) {
  .form-check {
    top: calc(70% + 50px); /* even closer */
    right: 5px;
  }

  .form-check-label {
    padding-top:0px;
    font-size: 10px;
  }
}


@media (max-width: 1150px) {
  .form-check {
    top: calc(70% + 50px); /* even closer */
    right: 2px;
  }

  .form-check-label {
    padding-top:0px;
    font-size: 10px;
  }
}

@media (max-width: 1150px) {
  .form-check {
    top: calc(70% + 50px); /* even closer */
    right: 2px;
  }

  .form-check-label {
    padding-top:0px;
    font-size: 10px;
  }
}


@media (max-width: 1075px) {
  .form-check {
    top: calc(70% + 50px); /* even closer */
    right: 2px;
  }

  .form-check-label {
    padding-top:0px;
    font-size: 9px;
  }
}


@media (max-width: 992px) {
  .form-check {
    top: calc(70% + 30px); /* even closer */
    right: 2px;
  }

  .form-check-label {
    padding-top:5px;
    font-size: 8px;
  }
}