@font-face {
  font-family: ggsr;
  src: url("./fonts/GoogleSans-Regular.ttf");
  font-display: swap;
}

@font-face {
  font-family: ggsm;
  src: url("./fonts/GoogleSans-Medium.ttf");
  font-display: swap;
}

*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: ggsr;
  font-size: 14px;
}

body {
  background-color: #f4f7fc;
  touch-action: manipulation;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: ggsm;
  font-weight: 500;
}

select {
  background: #fff;
}

input:focus,
select:focus {
  outline-color: #005C29 !important;
}

table {
  display: table !important;
  border-collapse: collapse;
}

input[type="radio"] {
  background-color: #fff;
  border-radius: 10px;
  cursor: pointer;
  display: inline-block;
  height: 15px;
  margin-right: 15px;
  position: relative;
  width: 15px;
  min-width: 15px;
  -webkit-appearance: none;
  border: 1px solid #a2a0a0;
}

input[type="radio"]:after {
  border-radius: 25px;
  content: "";
  display: block;
  height: 6px;
  left: 4px;
  position: relative;
  top: 4px;
  width: 6px;
}

input[type="radio"]:checked:after {
  background-color: #005C29;
}

input[type="checkbox"] {
  background-color: #fff;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 18px;
  position: relative;
  width: 18px;
  -webkit-appearance: none;
  border: 1px solid #005C29;
  position: relative;
}

input[type="checkbox"]:checked {
  background-color: #005C29;
}

input[type="checkbox"]:after {
  content: "";
  line-height: 0;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

input[type="checkbox"]:checked:after {
  content: "\2713";
  color: #fff;
}

.btn_disabled {
  color: rgb(138, 138, 138) !important;
  background-color: #f5f5f5 !important;
  pointer-events: none;
}

.not-found {
  text-align: center;
  margin-top: 50px;
}

.not-found img {
  width: 100%;
  height: 200px;
}

input[type="search"]::-webkit-search-cancel-button::before {
  content: "\00d7";
  color: #999;
  font-size: 14px;
  line-height: 1;
  margin-right: 5px;
}

.hide {
  display: none !important;
}

.show {
  display: block !important;
}

.clearfix:after {
  content: "";
  visibility: hidden;
  display: block;
  height: 0;
  clear: both;
}

.info-icon {
  color: #fff;
  position: relative;
  margin-right: 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #005C29;
  min-width: 15px;
  height: 15px;
  border-radius: 10px;
}

.info-icon:before {
  color: #fff;
  font-weight: bold;
  content: "i";
  text-align: center;
  font-weight: bold;
  font-size: 0.85rem;
}

.alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background-color: #28a745;
  color: #fff;
  z-index: 9999;
  animation: slide-up 0.5s ease-in-out;
}
.success {
  background-color: #28a745;
}
.warning {
  background-color: rgb(239, 162, 18);
}
.error {
  background-color: #f60f22;
}
.message {
  font-size: 18px;
}

@keyframes slide-up {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#topBtn {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 8px;
  z-index: 1000;
  font-size: 16px;
  border: none;
  outline: none;
  background-color: #9e9e9e;
  color: white;
  cursor: pointer;
  border-radius: 999px;
  opacity: 0.5 !important;
  width: 45px;
  height: 45px;
  padding: 5px;
  -webkit-transition: all 0.5s ease-in-out;
  -moz-transition: all 0.5s ease-in-out;
  -ms-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
}

#topBtn > span {
  display: block;
}

#topBtn > span + span {
  text-transform: uppercase;
}

#topBtn:hover {
  opacity: 1;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
}

@keyframes load {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-card {
  height: 120px;
  width: 100%;
  margin-top: 8px;
  border-radius: 6px;
  transition: all 200ms ease-in-out !important;
  position: relative;
  background-color: #eaeaea;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
  overflow: hidden;
}
.skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: load 1s infinite;
}

/* hide input number button */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

/* #header */
.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 4px 15px;
  gap: 30px;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-customer {
  padding: 4px 15px;
  background-color: #fff;
  position: sticky;
  text-align: right;
}

#header a img {
  width: 140px;
}

#header nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 30px;
  text-decoration: none;
  text-transform: uppercase;
  color: #005C29;
  font-weight: bold;
  font-size: 1.1rem;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

#search-input {
  background: url("../static/icons/search.svg") no-repeat;
  background-position: 8px 8px;
  width: 400px;
  padding: 10px 8px 10px 40px;
  border-radius: 40px;
  border: 1px solid #bebdbd;
}
/* #header */

#account-btn {
  cursor: pointer;
  position: relative;
  margin-left: auto;
}

#account-menu-toggle {
  position: absolute;
  top: 40px;
  right: 0px;
  background-color: #fff;
  box-shadow: 2px -2px 6px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

#account-menu-toggle a {
  display: flex;
  align-items: center;
  min-width: 170px;
  padding: 10px;
  gap: 10px;
  transition: 0.1s ease-in-out;
  color: #000;
  text-decoration: none;
  justify-content: flex-start;
}

#account-menu-toggle a:hover,
#account-menu-toggle a.active {
  color: #089b63;
  background-color: #e3fff4;
}

#account-menu-toggle a:hover img,
#account-menu-toggle a.active img {
  filter: invert(52%) sepia(34%) saturate(3126%) hue-rotate(121deg)
    brightness(90%) contrast(101%);
}

#account-menu-toggle a img {
  width: 20px;
  max-width: 20px;
  height: 20px;
}

.account-info {
  padding: 5px 10px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  background-color: #005C29;
}

#switch-account-btn {
  margin-left: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  transition: background-color .1s ease-in-out;
  margin-top: 5px;
  display: flex;
  align-items: center;
  background-color: #005C29;
  color: #fff;
  gap: 5px;
}

#switch-account-btn img {
  width: 20px;
  height: 20px;
  filter: invert(360);
}

#switch-account-btn:hover {
  background-color: #089b63;
  color: #fff;
}

.mobile-header {
  background-color: #fff;
  padding: 12px 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #eee;
}

.mobile-header-title {
  display: flex;
  align-items: center;
}

.mobile-header-title h1 {
  margin: 0;
  font-size: 20px;
  margin-left: 5px;
  line-height: 0;
}

.confirm-wrapper-div {
  position: fixed;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
}

.confirm-div {
  width: calc(100% - 20px);
  max-width: 500px;
  min-height: 90px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 10px;
  padding: 15px;
  max-height: 70vh;
  overflow: auto;
  text-align: justify;
}

.confirm-wrapper-div .confirm-btn-group {
  margin-left: auto;
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.confirm-wrapper-div .confirm-btn-group button {
  color: #fff;
  width: 80px;
  padding: 15px;
  border: none;
  outline: none;
  font-family: ggsm;
  background-color: #bebdbd;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.1s ease-in-out;
  line-height: 0;
}

.confirm-wrapper-div .confirm-btn-group button:first-child {
  background-color: #005C29;
  color: #fff;
  border: 1px solid #00a365;
}

.confirm-wrapper-div .confirm-btn-group button:first-child:hover {
  background-color: #00cb7d;
}

.confirm-wrapper-div .confirm-btn-group button:nth-child(2):hover {
  background-color: #c8c8c8;
}

.loading {
  border: 2px solid #fff;
  border-radius: 100%;
  border-top: 5px solid transparent;
	animation: load-animate infinite linear 1s;
  display: inline-block;
}

button:has(.loading) {
  pointer-events: none;
  opacity: 0.9;
}

@keyframes load-animate {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(180deg);
    opacity: 0.35;
  }
  
  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  /* width */
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  /* Track */
  ::-webkit-scrollbar-track {
    background: #dadada;
    border-radius: 5px;
  }

  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: #00a365;
    transition: 0.1s ease-in-out;
    border-radius: 5px;
  }

  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: #005C29;
  }
}

@media (max-width: 1200px) {
  .header-content {
    gap: 10px;
  }
  .header-content nav.desktop-only {
    display: none;
  }
}

@media (max-width: 768px) {
  .confirm-div {
    padding: 10px;
  }

  #account-menu-toggle {
    top: 40px;
    right: initial;
    left: 0px;
  }

  .header-content {
    gap: 10px;
    padding: 10px 15px;
  }

  .header-content {
    flex-direction: column;
  }

  .header-search {
    width: 100%;
    flex-direction: row-reverse;
    align-items: center;
  }

  #search-input,
  .search-input {
    width: 100% !important;
  }
}
