* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #f1f5f9;
}

button,
input,
select,
textarea {
  max-width: 100%;
  font: inherit;
}

button {
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
}

.input-field {
  width: 100%;
  min-height: 46px;

  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;

  padding: 0.75rem 0.875rem;

  font-size: 0.875rem;
  color: #0f172a;
  background-color: #ffffff;

  outline: none;

  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}

.input-field::placeholder {
  color: #94a3b8;
}

.input-field:focus {
  border-color: #6366f1;

  box-shadow:
    0 0 0 3px
    rgba(99, 102, 241, 0.14);
}

textarea.input-field {
  min-height: 110px;
}

.field-label {
  display: block;

  margin-bottom: 0.5rem;

  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;

  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 0.75rem;

  padding: 0.8125rem 1rem;

  background: #4f46e5;
  color: #ffffff;

  font-size: 0.875rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 0.2s,
    transform 0.2s,
    opacity 0.2s;
}

.primary-button:hover {
  background: #4338ca;
}

.primary-button:active {
  transform: scale(0.99);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.table-heading {
  padding: 1rem 1.5rem;

  text-align: left;
  white-space: nowrap;

  font-size: 0.75rem;
  font-weight: 700;

  color: #64748b;

  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:last-child {
  border-bottom: 0;
}

/* Evite modal la depase ekran */
#productModal,
#productDetailsModal {
  overscroll-behavior: contain;
}

/* Tablet */
@media (max-width: 1024px) {
  .table-heading {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .input-field {
    min-height: 48px;
    font-size: 16px;
  }

  /*
    16px enpòtan sou iPhone.
    Li anpeche Safari fè zoom otomatik
    lè user la klike nan input.
  */

  .field-label {
    font-size: 0.8rem;
  }

  .table-heading {
    padding: 0.875rem 1rem;
    font-size: 0.6875rem;
  }

  #productModal > div:last-child,
  #productDetailsModal > div:last-child {
    align-items: flex-end;
    padding: 0;
  }

  #productModal > div:last-child > div,
  #productDetailsModal > div:last-child > div {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;

    border-radius:
      1.5rem
      1.5rem
      0
      0;
  }
}

/* Telefòn trè piti */
@media (max-width: 360px) {
  .input-field {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .primary-button {
    padding-right: 0.875rem;
    padding-left: 0.875rem;
  }
}