/* Global Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Arial', sans-serif;
  background-color: #eef2f7;
  padding: 30px;
}

/* Container */
.container {
  max-width: 780px; /* a bit wider so 3 columns fit nicely */
  margin: auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Headings */
h2 { color: #333; margin-bottom: 20px; }

/* Form Elements */
label {
  font-weight: bold;
  margin: 0;            /* grid handles spacing */
  display: block;
}

/* Don’t force buttons to full width globally */
input, select, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 13px;
}

textarea { height: 150px; max-height: 400px; resize: vertical; }

/* Buttons */
.btn {
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  padding: 10px 14px;
  border-radius: 5px;
}

.btn:disabled { background-color: #ccc !important; cursor: not-allowed !important; opacity: 0.6; }
.btn:hover { background: #0056b3; }

/* Overlay */
#overlay {
  position: fixed; inset: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}
.overlay-content {
  background-color: white; padding: 20px; border-radius: 8px; text-align: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#overlay.hidden { display: none; }

/* 3-column row: label | select | button */
.field-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

/* Make the select fill the middle column */
.field-row select { width: 100%; }

/* Keep row buttons auto-sized and aligned */
.field-row .btn { width: auto; margin: 0; }

/* Optional small variant */
.btn.btn-sm { padding: 8px 12px; font-size: 12px; }

.field-row .status {
  grid-column: 1 / -1;
  margin-top: 4px;
  font-size: 12px;
  color: #555;
  min-height: 1.2em;    
  white-space: nowrap;
  overflow: hidden;
  visibility: hidden;
  text-overflow: ellipsis;
}

.field-row .status.is-visible { visibility: visible; }

#overlay.blocker { background-color: transparent; cursor: wait; }
#overlay.blocker .overlay-content { display: none; }  /* hide modal box while blocking */

/* optional: show wait cursor everywhere */
body.busy, body.busy * { cursor: wait !important; }