/* ==========================================================
   CATEGORY CREATE PAGE
   ========================================================== */

.category-page {
  width: 100%;
  padding: 24px 20px 35px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

/* ==========================================================
   MAIN CARD
   ========================================================== */

.category-card {
  width: 850px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #dfe4ea;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  box-sizing: border-box;
}

/* ==========================================================
   HEADER
   ========================================================== */

.category-header {
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf0e6;
  border-bottom: 1px solid #faf0e6;
  box-sizing: border-box;
}

.category-header-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.category-header-icon {
  font-size: 1.05rem;
  color: #0d6efd;
}

.category-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #172033;
}

.category-list-button {
  min-width: 55px;
  padding: 6px 15px;
  font-size: 0.8rem;
  border-radius: 5px;
  background-color: #00b7eb;
  border: none;
}
.category-list-button:hover {
  background-color: #00b7eb;
  border: none;
  transform: translateY(-2px);
}

/* ==========================================================
   FORM
   ========================================================== */

.category-form {
  width: 100%;
  padding: 7px 22px 3px;
  box-sizing: border-box;
}

/* ==========================================================
   FORM ROW
   ========================================================== */

.category-field {
  width: 100%;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #edf0f3;
  box-sizing: border-box;
}

.category-last-field {
  border-bottom: none;
}

/* ==========================================================
   LABEL
   ========================================================== */

.category-label {
  min-width: 0;
}

.category-label label {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 400;
  color: #263244;
  cursor: pointer;
}

/* ==========================================================
   INPUT WIDTHS
   ========================================================== */

.category-input {
  width: 380px;
  max-width: 100%;
}

.category-input-wide {
  width: 520px;
  max-width: 100%;
}

/* ==========================================================
   INPUT
   Bootstrap form-control-sm determines the height.
   ========================================================== */

.category-input .form-control {
  width: 100%;
  font-size: 0.84rem;
  color: #263244;
  background-color: #ffffff;
  border: 1px solid #d5dce5;
  border-radius: 4px;
  box-shadow: none;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.category-input .form-control::placeholder {
  color: #a5afbc;
}

.category-input .form-control:hover {
  border-color: #b9c4d1;
}

.category-input .form-control:focus {
  border-color: #78adf5;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.08);
  outline: none;
}

/* ==========================================================
   FOOTER
   ========================================================== */

.category-footer {
  width: 100%;
  min-height: 66px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafbfd;
  border-top: 1px solid #e8edf2;
  box-sizing: border-box;
}

.category-cancel-button {
  min-width: 80px;
  height: 34px;
  padding: 7px 16px;
  font-size: 0.82rem;
  border-radius: 4px;
}
.category-save-button {
  min-width: 80px;
  height: 34px;
  padding: 7px 16px;
  font-size: 0.82rem;
  border-radius: 4px;
  border: none;
  background-color: #bdda57;
}
.category-save-button:hover {
  border: none;
  background-color: #bdda57;
  transform: translateY(-2px);
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 991.98px) {
  .category-page {
    padding: 20px 15px 30px;
  }

  .category-card {
    width: 100%;
    max-width: 850px;
  }

  .category-field {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .category-input,
  .category-input-wide {
    width: 100%;
    max-width: 520px;
  }
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767.98px) {
  .category-page {
    padding: 10px;
  }

  .category-card {
    width: 100%;
  }

  /* HEADER */

  .category-header {
    height: 55px;
    padding: 0 12px;
  }

  .category-title {
    font-size: 0.92rem;
  }

  .category-header-icon {
    font-size: 0.98rem;
  }

  .category-list-button {
    min-width: 52px;
    padding: 5px 12px;
  }

  /* FORM */

  .category-form {
    padding: 5px 14px 3px;
  }

  .category-field {
    display: block;
    min-height: auto;
    padding: 2px 0;
  }

  .category-label {
    margin-bottom: 5px;
  }

  .category-label label {
    font-size: 0.82rem;
  }

  /* INPUT */

  .category-input,
  .category-input-wide {
    width: 100%;
    max-width: none;
  }

  /* FOOTER */

  .category-footer {
    min-height: auto;
    padding: 12px 14px;
  }
}

/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 400px) {
  .category-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .category-save-button,
  .category-cancel-button {
    width: 100%;
  }
}
