/***** Footer (orange bar with white text) *****/
.footer {
  position: static;
  padding: 1rem 0;
  background: var(--brand-primary);
  color: #fff;
}
.footer a { color: #fff; text-decoration: underline; }

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  /* Normec Agrocontrol orange */
  --brand-primary: #ff7300;
  --brand-primary-dark: #e66800;
  --brand-primary-contrast: #ffffff;
  --surface-bg: #f1f1f1;
  --surface-card: #ffffff;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: var(--surface-bg);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  overflow-x: hidden; /* avoid horizontal scroll when inner elements overflow */
}

/***** Media that should scale in container *****/
img, table { max-width: 100%; height: auto; }
.container, .container-fluid { overflow-x: hidden; }

/***** Navbar theming (orange header with white text) *****/
.navbar.bg-primary { background-color: var(--brand-primary) !important; }
.navbar.bg-primary .navbar-brand,
.navbar.bg-primary .nav-link { color: #fff !important; }
.navbar.bg-primary .nav-link.active,
.navbar.bg-primary .nav-link:hover,
.navbar.bg-primary .nav-link:focus { color: #fff !important; text-decoration: underline; text-underline-offset: 2px; }
.navbar.bg-primary .navbar-toggler { border-color: rgba(255,255,255,.4); }
.navbar.bg-primary .navbar-toggler-icon { filter: none !important; }
/* Ensure 3 stripes (hamburger) are white across browsers */
.navbar .navbar-toggler-icon,
.navbar-dark .navbar-toggler-icon,
.navbar.bg-primary .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/***** Primary button matching portal *****/
.btn-primary {
  color: #fff !important;
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  border-radius: 50px !important;
}
.btn-primary:hover {
  background-color: var(--brand-primary-dark) !important;
  color: #fff !important;
  border-color: var(--brand-primary-dark) !important;
}

/***** Layout spacing *****/
.container, .container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 992px) {
  .container, .container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/***** Content shell *****/
.content-shell {
  background-color: var(--surface-card);
  border-radius: 1rem;
  box-shadow: 0 5px 15px #0000001a;
  padding: 1.5rem;
  overflow-x: hidden;
}
@media (min-width: 576px) {
  .content-shell { padding: 1.75rem; }
}
@media (min-width: 992px) {
  .content-shell { padding: 2rem; }
}

/***** Responsive form fixes *****/
label, .form-label { display: block; margin-bottom: .25rem; }
.form-control, .form-select, .input-group { width: 100%; max-width: 100%; }
.form-check-input { width: 1.15rem; height: 1.15rem; }
/* prevent columns from shrinking inputs too much */
.col, [class^="col-"] input.form-control, [class*=" col-"] input.form-control,
[class^="col-"] select.form-select, [class*=" col-"] select.form-select {
  min-width: 0;
}
/* stack label and input on very small screens */
@media (max-width: 576px) {
  .form-floating > label { font-size: .9rem; }
  .form-floating > .form-control, .form-floating > .form-select { width: 100%; }
}
/* custom containers from portal-like styles */
@media (max-width: 768px) {
  .ac-custom-form { width: 100%; margin: 1rem 0; }
  .ac-relative-container { flex-direction: column; border-radius: 20px; }
  .ac-hero-image { position: relative; left: 0; width: 100%; height: 180px; border-radius: 20px 20px 0 0; }
}

/***** Decorative hr used on index page *****/
.ac-hr { border: 0; height: 0; border-top: 1px dashed rgba(0,0,0,.35); display: block; width: 100%; max-width: 100%; }

/***** Row click styling *****/
.ac-row-click { cursor: pointer; }
.ac-row-click:hover { background-color: rgba(0,0,0,.03); }

/***** Agrocontrol-like utilities (namespaced) *****/
h2.ac-strong {
  margin-bottom: 40px;
  font-weight: 700;
}
.ac-row-center {
  display: flex;
  justify-content: center;
  margin-top: 5%;
}
.btn-primary:hover {
  background-color: var(--brand-primary-dark) !important;
  color: #fff !important;
  border-color: var(--brand-primary-dark) !important;
}
.ac-loader-login {
  position: absolute;
  top: 0;
  left: 0;
  width: 65% !important;
  height: 100%;
  z-index: 1000;
  background-color: #0000004d;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
}
.ac-relative-container {
  box-shadow: 0 5px 15px #0000001a;
  position: relative;
  display: flex;
  border-radius: 30px;
  background-color: #fff;
  width: 1000px;
  max-width: 100%;
  min-height: 430px;
}
.ac-center-content {
  display: block;
  position: relative;
  left: 45%;
  top: 45%;
}
.ac-custom-form {
  display: flex;
  flex-direction: column;
  width: 30%;
  background-color: #fff;
  margin: 5% 0 0 4%;
}
.ac-form-shaking {
  position: relative;
  animation: ac-shake-horizontally .2s ease-out 2;
}
@keyframes ac-shake-horizontally {
  0% { left: 0; }
  25% { left: 15px; }
  75% { left: -15px; }
  100% { left: 0; }
}
.ac-hero-image {
  display: flex;
  justify-content: center;
  position: absolute;
  align-items: start;
  left: 40%;
  width: 60%;
  height: 100%;
  overflow: hidden;
  transition: all .6s ease-in-out;
  border-radius: 100px 30px 30px 100px;
  z-index: 1000;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.ac-loader-wrapper {
  position: absolute;
  top: 50%;
  padding-left: 42% !important;
  z-index: 1000;
}
.ac-container {
  overflow-wrap: break-word;
  background-color: #e3e3e3;
  box-shadow: 0 5px 15px #0000001a;
  border-radius: 10px;
  overflow-y: auto;
  max-height: 60dvh;
  scrollbar-width: thin;
}
.ac-content {
  box-shadow: 0 5px 15px #0000001a;
  border-radius: 5px;
  background-color: #fff;
}
.ac-date { margin-left: auto; }
.ac-product { width: 100%; }
.ac-status { width: 50%; }
.ac-sample-card-title { margin-bottom: .1rem !important; }
.ac-sample-card-padding { padding: .125rem .25rem !important; }
.ac-clickable { cursor: pointer; box-shadow: 0 5px 15px #0000001a; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Navbar button for login/logout */
.ac-nav-btn {
  color: #fff !important;
  background-color: var(--brand-primary-dark) !important;
  border-color: transparent !important;
  border-radius: 9999px;
  padding: .375rem .75rem;
}
.ac-nav-btn:hover, .ac-nav-btn:focus {
  background-color: #cc5a00 !important; /* slightly darker orange */
  color: #fff !important;
  text-decoration: none;
}

/* Ensure navbar text is white */
.navbar .navbar-text { color: #fff !important; }