table.cart th,
table.cart td {
  padding: 0.975em 0.975em 0 !important;
}

.required {
  color: red;
  margin-left: 5px;
}

.quote-field-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.select-field {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

select[multiple] {
  min-height: 120px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 4px;
}

.file-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-restrictions {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
}

.select2-container--classic .select2-selection--multiple {
  border: 1px solid #ddd !important;
  border-radius: 4px;
  min-height: 38px;
}

.select2-container--classic
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 3px 8px;
  margin: 4px;
}

.select2-container--classic .select2-search--inline .select2-search__field {
  margin-top: 4px;
  min-height: 28px;
}

.quote-fields-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 20px 0;
}

.quote-field-first {
  grid-column: 1;
}
.quote-field-last {
  grid-column: 2;
}

.quote-field-wide {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .quote-fields-container {
    grid-template-columns: 1fr;
  }

  .quote-field-first,
  .quote-field-last,
  .quote-field-wide {
    grid-column: 1;
  }
}

.quote-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999999;
}

.quote-popup-content {
  position: relative;
  background: white;
  width: 90%;
  max-width: 900px;
  margin: 5% auto;
  padding: 20px;
  border-radius: 5px;
  max-height: 90vh;
  overflow-y: auto;
}

.quote-popup table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.quote-popup th,
.quote-popup td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

.quote-popup thead th {
  background-color: #f5f5f5;
}

.quote-title {
  margin-bottom: 20px;
}

.custom-fields-section {
  margin-top: 30px;
}

.close-popup {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

.quote-total {
  font-weight: bold;
}

.single-product-quote button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.add-to-quote-button.button {
  border: none;
  text-align: center;
  cursor: pointer;
  border: 1px solid #ddd;
  padding: calc(0.6180469716em - 1px) calc(1.41575em - 1px);
}

.add-to-quote-button.text {
  background: none;
  color: inherit;
  border: none !important;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  margin-left:10px;
}



@media screen and (max-width: 767px) {

    .woocommerce-orders-table.shop_table_responsive thead tr {
        display: block;
        margin-bottom: 15px;
    }

    .woocommerce-orders-table.shop_table_responsive thead th {
        display: block;
        text-align: left;
        padding: 8px 0;
    }

    .woocommerce-orders-table.shop_table_responsive tbody td {
        display: block;
        text-align: right;
        padding: 8px 0;
    }

    .woocommerce-orders-table.shop_table_responsive tbody td::before {
        content: attr(data-title);
        float: left;
        font-weight: 700;
    }
}


.woocommerce-notice-wrapper {
  margin-bottom: 2em;
}

.woocommerce-notice-wrapper .woocommerce-error {
  margin: 0;
  padding: 1em 2em 1em 3.5em;
  background-color: #e74c3c;
  color: #fff;
  border-radius: 3px;
  position: relative;
}

.woocommerce-notice-wrapper .woocommerce-error::before {
  content: "\f071";
  font-family: 'Font Awesome 5 Free';
  position: absolute;
  left: 1.5em;
  top: 50%;
  transform: translateY(-50%);
}

.woocommerce-notice-wrapper .woocommerce-error a {
  color: #fff;
  text-decoration: underline;
}


@media screen and (min-width: 1200px) {
  .quote-popup-content {
      width: 80%;
      margin: 3% auto;
  }
  
  .quote-fields-container {
      gap: 30px;
  }
}

@media screen and (max-width: 1199px) {
  .single-product-quote.add-to-quote-button.inline {
      bottom: 75px;
      margin-right: 50px;
  }
  
  .shop-quote.add-to-quote-button.below {
      margin-left: 45px;
  }
}

@media screen and (max-width: 991px) {
  .quote-popup-content {
      width: 95%;
      margin: 2% auto;
      padding: 15px;
  }
  
  .quote-fields-container {
      gap: 15px;
  }

}

@media screen and (max-width: 767px) {
  .quote-fields-container {
      grid-template-columns: 1fr;
  }
  
  .quote-field-first,
  .quote-field-last,
  .quote-field-wide {
      grid-column: 1;
  }
  
  select[multiple] {
      min-height: 100px;
  }
  
  .quote-popup table {
      display: block;
      overflow-x: auto;
  }
  
  .quote-popup th,
  .quote-popup td {
      min-width: 120px;
  }
}


@media screen and (max-width: 480px) {
  .quote-popup-content {
      width: 98%;
      margin: 1% auto;
      padding: 10px;
  }
  
  .file-upload-wrapper {
      width: 100%;
  }
  
  .checkbox-wrapper,
  .radio-item {
      padding: 5px;
  }
  
  .select2-container--classic .select2-selection--multiple {
      min-height: 34px;
  }
  
  .close-popup {
      right: 10px;
      top: 5px;
  }
}

@media screen and (max-width: 387px) {
  .add-to-quote-button.button {
      margin-top: 13px;
  }
}

@media screen and (min-width: 768px) and (max-width: 957px) {
  .add-to-quote-button.button {
      margin-top: 13px;
  }
}

.add-to-quote-button:hover {
  background-color: var(--hover-bg) !important;
  color: var(--hover-color) !important;
  transition: all 0.3s ease;
}

.request-quote-for-price:hover {
  background-color: var(--hover-bg) !important;
  color: var(--hover-color) !important;
  transition: all 0.3s ease;
}

.ext-update-quote:hover {
  background-color: var(--hover-bg) !important;
  color: var(--hover-color) !important;
  transition: all 0.3s ease;
}



@media (max-width: 930px) and (min-width: 768px) {
  .quote-table-container table.quote-items-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
  }

  .quote-table-container table.quote-items-table th,
  .quote-table-container table.quote-items-table td {
      padding: 8px;
      text-align: center;
  }

  .quote-table-container table.quote-items-table th,
  .quote-table-container table.quote-items-table td {
      white-space: nowrap;
  }

  .quote-table-container table.quote-items-table th.product-thumbnail,
  .quote-table-container table.quote-items-table td.product-thumbnail,
  .quote-table-container table.quote-items-table th.product-remove,
  .quote-table-container table.quote-items-table td.product-remove {
      display: none;
  }

  .quote-table-container table.quote-items-table th,
  .quote-table-container table.quote-items-table td {
      font-size: 12px;
  }

  .quote-table-container table.quote-items-table td {
      white-space: normal;
      overflow-wrap: break-word;
  }

  .quote-table-container table.quote-items-table td input[type="number"] {
      max-width: 60px;
      font-size: 12px;
  }

  .quote-table-container .actions .button {
      /* width: 100%; */
      box-sizing: border-box;
      padding: 10px;
      font-size: 14px;
      text-align: center;
      margin-top: 10px;
  }

  .quote-table-container .request-quote-for-price {
      /* width: 100%; */
      box-sizing: border-box;
      padding: 10px;
      font-size: 14px;
      text-align: center;
      margin-top: 10px;
      float: none;
  }
}
