@import url('https://fonts.googleapis.com/css2?family=Chivo+Mono:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;700&display=swap');
/* @import url('https://fonts.googleapis.com/css2?family=Kodchasan:wght@400;500;700&display=swap'); */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined');

:root {
  --md-ref-typeface-brand: 'IBM Plex Sans Thai', 'IBM Plex Sans', Arial,
    sans-serif;
  --md-ref-typeface-plain: 'IBM Plex Sans Thai', 'IBM Plex Sans', Arial,
    sans-serif;
  --md-sys-color-primary: rgb(76 102 43);
  --md-sys-color-surface-tint: rgb(76 102 43);
  --md-sys-color-on-primary: rgb(255 255 255);
  --md-sys-color-primary-container: rgb(205 237 163);
  --md-sys-color-on-primary-container: rgb(53 78 22);
  --md-sys-color-secondary: rgb(88 98 73);
  --md-sys-color-on-secondary: rgb(255 255 255);
  --md-sys-color-secondary-container: rgb(220 231 200);
  --md-sys-color-on-secondary-container: rgb(64 74 51);
  --md-sys-color-tertiary: rgb(56 102 99);
  --md-sys-color-on-tertiary: rgb(255 255 255);
  --md-sys-color-tertiary-container: rgb(188 236 231);
  --md-sys-color-on-tertiary-container: rgb(31 78 75);
  --md-sys-color-error: rgb(186 26 26);
  --md-sys-color-on-error: rgb(255 255 255);
  --md-sys-color-error-container: rgb(255 218 214);
  --md-sys-color-on-error-container: rgb(147 0 10);
  --md-sys-color-background: rgb(249 250 239);
  --md-sys-color-on-background: rgb(26 28 22);
  --md-sys-color-surface: rgb(249 250 239);
  --md-sys-color-on-surface: rgb(26 28 22);
  --md-sys-color-surface-variant: rgb(225 228 213);
  --md-sys-color-on-surface-variant: rgb(68 72 61);
  --md-sys-color-outline: rgb(117 121 108);
  --md-sys-color-outline-variant: rgb(197 200 186);
  --md-sys-color-shadow: rgb(0 0 0);
  --md-sys-color-scrim: rgb(0 0 0);
  --md-sys-color-inverse-surface: rgb(47 49 42);
  --md-sys-color-inverse-on-surface: rgb(241 242 230);
  --md-sys-color-inverse-primary: rgb(177 209 138);
  --md-sys-color-primary-fixed: rgb(205 237 163);
  --md-sys-color-on-primary-fixed: rgb(16 32 0);
  --md-sys-color-primary-fixed-dim: rgb(177 209 138);
  --md-sys-color-on-primary-fixed-variant: rgb(53 78 22);
  --md-sys-color-secondary-fixed: rgb(220 231 200);
  --md-sys-color-on-secondary-fixed: rgb(21 30 11);
  --md-sys-color-secondary-fixed-dim: rgb(191 203 173);
  --md-sys-color-on-secondary-fixed-variant: rgb(64 74 51);
  --md-sys-color-tertiary-fixed: rgb(188 236 231);
  --md-sys-color-on-tertiary-fixed: rgb(0 32 30);
  --md-sys-color-tertiary-fixed-dim: rgb(160 208 203);
  --md-sys-color-on-tertiary-fixed-variant: rgb(31 78 75);
  --md-sys-color-surface-dim: rgb(218 219 208);
  --md-sys-color-surface-bright: rgb(249 250 239);
  --md-sys-color-surface-container-lowest: rgb(255 255 255);
  --md-sys-color-surface-container-low: rgb(243 244 233);
  --md-sys-color-surface-container: rgb(238 239 227);
  --md-sys-color-surface-container-high: rgb(232 233 222);
  --md-sys-color-surface-container-highest: rgb(226 227 216);
  --oy-modal-content-max-height: 90vh;
  --oy-modal-content-padding: min(10vw, 24px);
}

body {
  font-family: var(--md-ref-typeface-plain);
}

/* h2 {
  font-size: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  padding: 0;
  margin: 0;
} */

.oy-appbar-wrapper {
  background: white;
  /* border-bottom: 1px solid var(--md-sys-color-outline); */
  height: 120px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.oy-appbar-wrapper.scrolled {
  background: var(--md-sys-color-surface-container-highest);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16); /* More prominent shadow */
  /* border-bottom: 1px solid var(--md-sys-color-outline); */
}

.oy-appbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 8px;
}

.oy-card {
  background: var(--md-sys-color-surface-container-low);
  /* border: 1px solid var(--md-sys-color-outline); */
  border-radius: 8px;
  margin-bottom: 16px;
  opacity: 0.95;
  padding: 16px;
}

.oy-card.tertiary {
  background: rgb(from var(--md-sys-color-tertiary-container) r g b / 0.25);
  /* opacity: 0.75; */
}

.oy-card-list {
  list-style: none;
  /* margin: 0; */
  padding: 0 8px;
  /* overflow-y: auto; */
  /* height: calc(100vh - 170px); */
}

.oy-form {
  margin: 0 auto;
  width: 320px;
}

.oy-image-counter {
  /* border: 1px solid var(--md-sys-color-outline);
  border-radius: 9999px; */
  color: var(--md-sys-color-on-surface-variant);
  display: none;
  /* font-size: 0.75em; */
  margin-top: 8px;
  text-align: center;
}

.oy-image-preview-container {
  align-items: center;
  display: none;
  justify-content: center;
  position: relative;
  height: calc(
    var(--oy-modal-content-max-height) - 2 * var(--oy-modal-content-padding) -
      3.16em - 3em - 76px - 16px - 28px - 8px - 40px
  );
}

.oy-image-preview {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.oy-image-preview-button {
  background: var(--md-sys-color-surface-container-lowest);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 9999px;
  opacity: 0.95;
}

.oy-image-preview-add-button {
  background: var(--md-sys-color-secondary-container);
  border-radius: 12px;
  bottom: -10px;
  color: var(--md-sys-color-on-secondary-container);
  position: absolute;
  right: -10px;
}

.oy-image-preview-delete-button {
  position: absolute;
  right: -10px;
  top: -10px;
}

.oy-image-preview-next-button {
  position: absolute;
  right: -10px;
}

.oy-image-preview-prev-button {
  position: absolute;
  left: -10px;
}

.oy-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.oy-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  gap: 16px;
}

.oy-modal-content {
  background: var(--md-sys-color-surface);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  padding: var(--oy-modal-content-padding);
  min-width: 240px;
  max-height: var(--oy-modal-content-max-height);
}

.oy-modal-info-box {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
}

.oy-modal-info-box p {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.75em;
  margin: 4px 0;
}

.oy-place-holder-image {
  align-items: center;
  display: flex;
  justify-content: center;
  border: 2px dashed var(--md-sys-color-outline);
  border-radius: 12px;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  height: 150px;
  width: 100%;
}

.oy-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  min-width: 160px;
  padding: 10px 16px;
  /* margin-right: 8px; */
}

.oy-select-wrapper {
  position: relative;
}

.oy-select-wrapper::after {
  content: 'v';
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.6em;
}

.oy-spacer {
  height: 8px;
}

.oy-spacer-horizontal {
  width: 8px;
}

.oy-name {
  width: 75%;
}

.oy-space-between-center {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.oy-tabs {
  display: flex;
  justify-content: space-between;
  margin: 0px 8px;
  border-radius: 4px;
  box-shadow: none;
  background-color: var(--md-sys-color-surface-dim);
  padding: 4px 2px;
}

.oy-tabs-button {
  width: 100%;
  border-radius: 4px;
  border: solid 1px var(--md-sys-color-outline);
  margin: 0px 2px;
  outline: none;
  font-weight: 500;
  justify-items: center;
  padding-top: 8px;
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-primary-fixed-variant);
}

.inactive {
  background-color: var(--md-sys-color-surface-bright);
  border: none;
  color: var(--md-sys-color-on-primary-fixed-variant);
  justify-items: center;
}

.button-amount {
  font-size: 0.8em;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 500;
  min-width: 20px;
  height: 20px;
  padding: 0px 3px;
  border-radius: 9999px;
  transition: all 0.3s ease-in-out;
  color: white;
  margin-left: 2px;
  background-color: var(--md-sys-color-primary); /* Darker variant */
  color: var(--md-sys-color-on-primary);
}

.inactive .count-badge {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.status {
  border-radius: 24px;
  padding: 4px 12px;
  font-weight: 200;
  font-size: small;
}

.pending {
  /* background-color: var(--md-sys-color-tertiary-container); */
  background-color: #deb71d;
  opacity: 0.75;
}

.paid {
  background-color: var(--md-sys-color-primary-container);
}

.oy-bank-account {
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: 8px;
  padding: 4px 8px;
}

.oy-expand-center {
  padding: 8px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 2s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.disabled-link {
  pointer-events: none; /* Disables all mouse and touch events */
  cursor: default; /* Changes cursor to a standard arrow */
  color: #999; /* Dims the color */
}

.store-dropdown {
  font-family: inherit;
  font-size: 1em;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #333;
  margin-right: 8px;
  min-width: 160px;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

/* Snackbar styles */
#oy-snackbar {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: var(--md-sys-color-on-surface-variant);
  color: #fff;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1em;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#oy-snackbar.show {
  opacity: 1;
  pointer-events: auto;
}

#transfer-info {
  text-align: left;
  margin-bottom: 16px;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 8px;
  padding: 12px 16px;
}

#place-holder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px;
  border: 2px dashed var(--md-sys-color-outline);
  border-radius: 12px;
  color: var(--md-sys-color-outline);
  font-size: 1em;
  cursor: pointer;
}
