/* Search Form */
.search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .search-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .form-group label {
    font-size: 13px;
    margin: 4px 0px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 8px 10px;
    font-size: 13px;
  }

  .search-form .action-buttons {
    margin: 15px 0 0 0;
    justify-content: center;
  }

  .info-row label {
    flex: none;
    width: 100%;
  }

  .info-row input {
    width: 100%;
  }

  .payment-terms {
    flex-direction: column;
  }

  .variant-item {
    padding: 12px;
    margin: 12px 0;
  }

  .storage-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .storage-item .assign {
    width: 100%;
    text-align: left;
  }

  .select-option {
    width: 100%;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 767px) {
  .search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
  }

  .info-row {
    flex-wrap: wrap;
  }

  .payment-terms {
    flex-wrap: wrap;
  }

  .select-option {
    width: 100%;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .search-form {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.search-form .action-buttons {
  margin: 20px 0px 0px 0px;
}

.items.search-form {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr 1fr 0.7fr 1fr 1fr 0.2fr;
  gap: 10px;
  margin-top: 10px;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .items.search-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 767px) {
  .items.search-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .items.search-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .items.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
  }
}

/* Form Group */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.checkbox {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin: 10px 20px;
}

.form-group.checkbox input {
  width: fit-content;
  height: fit-content;
  margin: 10px;
}

.search-form .action-buttons {
  justify-content: end;
}

.form-group label {
  font-weight: 500;
  color: var(--primary-text-color);
  font-size: 14px;
  margin: var(--spacing-sm) 0px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--tran-02);
  color: var(--primary-text-color);
  background: var(--secondary-text-color);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.form-group.amount input {
  text-align: right;
}

.number {
  display: flex;
  gap: 10px;
}

.form-group.address input,
.form-group.address select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Tab Components */
.supplier-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin-top: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.info-row label {
  flex: 0 0 150px;
  font-weight: 600;
  color: #333;
}

.info-row input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 15px;
  background-color: #fafafa;
}

.info-row input:focus {
  outline: none;
  border-color: #007bff;
  background-color: #fff;
}

input.editable {
  background-color: #fff7e6;
  border: 1px solid #f0ad4e;
}

.payment-terms {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  align-items: flex-end;
}

.shell.supplier-details {
  height: 700px;
}

/* Variant Group */
.variant-header,
.variant-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--primary-text-color);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.variant-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fbfbfb;
  padding: 16px;
  margin: 16px 0;
}

.items {
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fbfbfb;
  padding: 16px;
  margin: 16px 0;
}

.variant {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  .variant {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 767px) {
  .variant {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .variant {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  .variant {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  .variant {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .search-form {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.storage-item {
  border: 1px dashed #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  padding: 16px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.storage-item .form-group {
  flex: 1;
}

.storage-item .assign {
  text-align: right;
  min-width: 80px;
}

.select-option {
  width: 300px;
  margin: 10px 0px;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 1rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.summary-items::-webkit-scrollbar {
  width: 6px;
}

.summary-items::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 3px;
}

.summary-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.summary-item p {
  margin: 2px 0;
  font-size: 0.9rem;
}

.summary-item .item-name {
  font-weight: 600;
  font-size: 1rem;
}

.summary-item .item-details {
  color: #666;
  font-size: 0.85rem;
}

.summary-items .empty {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}
