/* BuyGuard for WooCommerce Admin Styles */

/* General styles */
.buyguard-rules-container,
.buyguard-rule-form-container {
  margin: 20px 0;
}

/* Notice styles */
.buyguard-form-notice,
.buyguard-notice {
  margin: 15px 0;
}

/* Status indicators */
.buyguard-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
}

.buyguard-status-active {
  background-color: #dff0d8;
  color: #3c763d;
}

.buyguard-status-inactive {
  background-color: #f2dede;
  color: #a94442;
}

/* Rules table */
.buyguard-rules-table {
  margin-top: 15px;
}

.buyguard-rules-table th {
  font-weight: 600;
}

.buyguard-rules-table td {
  vertical-align: middle;
  padding: 10px;
}

.buyguard-rules-table .row-actions {
  display: flex;
  gap: 5px;
  position: static !important; /* Override WP admin style to always show action buttons */
}

/* Form styles */
.buyguard-rule-form .form-table th {
  width: 200px;
  padding: 15px 10px 15px 0;
}

.buyguard-rule-form .form-table td {
  padding: 15px 10px;
}

.buyguard-rule-form .description {
  margin: 5px 0 0;
  color: #666;
  font-style: italic;
}

.buyguard-rule-form .required {
  color: #dc3232;
}

/* Select2 customizations */
.select2-container {
  width: 100% !important;
  max-width: 400px;
}

.select2-container--default .select2-selection--multiple {
  border-color: #8c8f94;
}

.select2-container--default.select2-container--focus
  .select2-selection--multiple {
  border-color: #2271b1;
}

/* Datepicker customizations */
.buyguard-datepicker {
  width: 150px;
}

/* No rules message */
.buyguard-no-rules {
  margin: 20px 0;
  padding: 20px;
  background-color: #f8f8f8;
  border-left: 4px solid #ddd;
}

/* Media queries for responsive design */
@media screen and (max-width: 782px) {
  .buyguard-rule-form .form-table th {
    width: 100%;
    padding-bottom: 0;
  }

  .buyguard-rule-form .form-table td {
    padding-top: 5px;
  }

  .buyguard-rules-table {
    display: block;
    overflow-x: auto;
  }
}
