.bulk-select-wrapper {
  text-align: center;
  width: 40px;
}

.bulk-select-cell {
  padding: 5px;
  text-align: center;
}

.bulk-select-all-wrapper {
  margin-bottom: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.bulk-select-all-wrapper label {
  font-weight: bold;
  margin-left: 5px;
}

.view-orders table {
  width: 100%;
}

.view-orders .bulk-select-wrapper input[type="checkbox"] {
  margin: 0;
}

/* Dialog content wrappers */
.wfs-payment-confirm-content,
.wfs-balance-error-content,
.wfs-balance-insufficient-content {
  padding: 10px 15px 20px 15px;
}

/* Balance info boxes in dialogs */
.balance-info {
  padding: 15px;
  margin: 15px 0;
  border-radius: 5px;
  border: 2px solid;
}

.balance-info p {
  margin: 5px 0;
}

.balance-status-green {
  background-color: #e8f5e9;
  border-color: #5ed464;
  color: #2e7d32;
}

.balance-status-yellow {
  background-color: #fff3cd;
  border-color: #ffc107;
  color: #856404;
}

.balance-status-red {
  background-color: #f2baba;
  border-color: #ff7c7c;
  color: #721c24;
}

.center-text {
  text-align: center;
}

.red-text {
  color: #721c24;
}

.dialog-buttons {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 15px 0;
  text-align: center;
}

.dialog-buttons button {
  margin: 0 5px;
}

.selected-nodes {
  display: none;
}

/* Hide bulk operations when not allowed */
.bulk-select-wrapper.hidden,
.bulk-select-all-wrapper.hidden {
  display: none !important;
}

/* Main bulk operations form - compact layout */
.bulk-operations-form {
  margin-bottom: 20px;
  padding: 0;
  background: none;
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
}

/* Fieldset styling - fixed height of 130px */
.bulk-operations-form > fieldset {
  margin: 0;
  padding: 0;
  border: 1px solid #4a90a4;
  border-radius: 4px;
  background-color: #fff;
  width: 220px;
  min-width: 220px;
  flex: 0 0 220px;
  line-height: 1;
  height: 120px;
}

/* Blue header styling - reduced padding for spans */
.bulk-operations-form fieldset legend {
  width: 100%;
  margin: 0;
  margin-bottom: 0 !important;
  padding: 4px 8px;
  background-color: #4a90a4;
  color: white;
  font-size: 12px;
  font-weight: normal;
  text-align: center;
  border: none;
  border-radius: 3px 3px 0 0;
  box-sizing: border-box;
  line-height: 1.2;
}

/* Target span labels inside legend - minimal padding */
.bulk-operations-form fieldset legend span {
  padding: 12px 0 5px 0 !important;
  margin: 0 !important;
}

/* Form content area - zero padding and margins */
.bulk-operations-form fieldset .fieldset-wrapper {
  padding: 0 6px 2px 6px;
  margin: 0 !important;
  padding-top: 0 !important;
  line-height: 1;
}

/* Select dropdown - no margins, positioned tight to legend */
.bulk-operations-form select {
  width: 100%;
  margin: 0 !important;
  margin-top: 0 !important;
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background-color: #fff;
  line-height: 1.2;
  height: 26px;
}

/* Submit button - no margins, reduced padding */
.bulk-operations-form input[type="submit"] {
  width: 100%;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #4a90a4 !important;
  cursor: pointer !important;
  transition: all 0.2s ease;
  background-color: #89baff !important;
  color: #000000 !important;
  font-weight: bold;
  margin: 0 !important;
  margin-top: 2px !important;
  line-height: 1.2;
  height: 26px;
}

.bulk-operations-form input[type="submit"]:hover:not(:disabled) {
  background-color: #46b8da;
  border-color: #46b8da;
}

.bulk-operations-form input[type="submit"]:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Hide form labels */
.bulk-operations-form label {
  display: none;

/* Processing overlay */
.wfs-bulk-ops-processing-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wfs-bulk-ops-throbber {
  background-color: rgba(40, 40, 40, 0.95) !important;
  padding: 30px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
  text-align: center !important;
  min-width: 250px !important;
  position: relative !important;
  z-index: 1000000 !important;
}

.wfs-bulk-ops-throbber .ajax-progress-fullscreen {
  position: static;
  background: none;
}

.wfs-bulk-ops-throbber .throbber {
  display: inline-block;
  width: 40px;
  height: 40px;
  margin: 0 auto 15px auto;
  border: 4px solid #555;
  border-top: 4px solid #4a90a4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.wfs-bulk-ops-throbber .message {
  font-size: 18px;
  font-weight: bold;
  color: aliceblue;
  margin-top: 10px;
}
}

/* Aggressive reset for all form elements */
.bulk-operations-form * {
  box-sizing: border-box;
}

.bulk-operations-form .form-item {
  margin: 0 !important;
  padding: 0 !important;
}

.bulk-operations-form .form-select {
  margin: 0 !important;
}

.bulk-operations-form .form-submit {
  margin: 0 !important;
}

/* Force remove Drupal default spacing */
.bulk-operations-form fieldset > .fieldset-wrapper > * {
  margin-top: 0 !important;
}

.bulk-operations-form fieldset > .fieldset-wrapper > *:first-child {
  margin-top: 0 !important;
}

/* Mobile responsive layout */
@media (max-width: 767px) {
  .bulk-operations-form {
    flex-direction: column;
  }

  .bulk-operations-form > fieldset {
    width: 100%;
    min-width: 100%;
    flex: 1 1 100%;
    height: auto;
  }
}

/* Tablet layout - 2 per row */
@media (min-width: 768px) and (max-width: 991px) {
  .bulk-operations-form > fieldset {
    width: calc(50% - 2.5px);
    min-width: calc(50% - 2.5px);
    flex: 0 0 calc(50% - 2.5px);
  }
}

/* Desktop layout - 3 per row, very tight spacing */
@media (min-width: 992px) {
  .bulk-operations-form {
    justify-content: flex-start;
    gap: 5px;
  }

  .bulk-operations-form > fieldset {
    width: 220px;
    min-width: 220px;
    flex: 0 0 220px;
  }
}

/* Ensure form is hidden initially */
.bulk-operations-form[style*="display: none"] {
  display: none !important;
}

/* Drupal fieldset wrapper - zero top padding */
.bulk-operations-form fieldset > .fieldset-wrapper {
  padding: 0 6px 2px 6px !important;
  padding-top: 0 !important;
}

/* Remove default fieldset styling */
.bulk-operations-form fieldset {
  border: 1px solid #4a90a4;
  border-radius: 4px;
  margin: 0;
  padding: 0;
}

/* Ensure proper legend positioning */
.bulk-operations-form fieldset legend {
  position: relative;
  top: 0;
  left: 0;
  float: none;
  margin-left: 0;
}

