body {
.process-and-reset-buttons {
    display: flex;
    margin-bottom: 8px;
}

#process-data-button {
    width: 66.66%;
    height: auto;
    padding: 6px 10px;
}

#reset-settings-button {
    width: 33.33%;
    height: auto;
    line-height: normal;
    background-color: #f44336; /* Red */
    color: white;
    padding: 6px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
	margin-bottom: 8px;
	margin-left: 5px;
}

#reset-settings-button:hover {
    background-color: #da190b;
}
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 10px;
  font-family: Arial, sans-serif; /* Set default font to Arial */
}

.container {
  display: flex;
  width: 95%;
  max-width: 1800px;
  background-color: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  gap: 10px;
  align-items: flex-start;
  flex-wrap: nowrap; /* Prevent wrapping to maintain 2 columns */
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1; /* Take remaining width */
  min-width: 350px;
}

.bulk-and-output-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 540px; /* Fixed width to match output, no grow, no shrink */
}

#bulk-data-section {
  width: 100%; /* Take full width of the wrapper */
  box-sizing: border-box;
  margin-top: 0; /* Reset margin if it was part of .editor directly in .container */
}

.output-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

#data-table-container {
  /* Ensure this also respects the parent's width */
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
}

.editor {
  display: flex;
  flex-direction: column;
  margin-bottom: 3px;
  padding: 5px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.heading-input-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
}

.heading-input-row h2 {
  margin: 0;
  font-size: 0.85em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 5px;
}

.heading-input-row input[type="url"].url-input-with-preview {
  flex-grow: 0.5;
  flex-shrink: 1;
  min-width: 100px;
  max-width: 250px;
  padding: 3px;
  font-size: 0.75em;
  margin-bottom: 0;
  border-radius: 3px;
}

.heading-input-row input[type="url"]#post-url-input {
  flex-grow: 1;
  padding: 3px;
  font-size: 0.75em;
  margin-bottom: 0;
  border-radius: 3px;
}

.image-preview-box {
  width: 60px;
  height: 60px;
  border: 1px solid #ccc;
  margin-left: 5px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor h2 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 0.9em;
}

textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 0.7em;
  resize: vertical;
}

#render-button,
#webhook-button,
#process-data-button {
  padding: 6px 10px;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85em;
  margin-top: 8px;
}
#render-button {
  background-color: #007bff;
}
#webhook-button {
   background-color: #28a745;
   margin-left: 5px;
}
#no-check-button {
   background-color: #007bff;
   margin-left: 5px;
}
#process-data-button {
  background-color: #17a2b8;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

#render-button:hover {
  background-color: #0056b3;
}
#webhook-button:hover {
   background-color: #1e7e34;
}
#no-check-button:hover {
   background-color: #0056b3;
}
#process-data-button:hover {
  background-color: #138496;
}

.action-buttons {
   display: flex;
   margin-top: 5px;
   flex-wrap: wrap;
   gap: 10px;
   align-items: center;
}

.live-render-controls {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-left: auto;
}

.live-render-toggle {
   display: flex;
   align-items: center;
   gap: 6px;
   font-size: 0.8em;
   cursor: pointer;
   user-select: none;
}

.live-render-toggle input[type="checkbox"] {
   display: none;
}

.toggle-switch {
   width: 32px;
   height: 16px;
   background-color: #ccc;
   border-radius: 8px;
   position: relative;
   transition: background-color 0.3s;
}

.toggle-switch::before {
   content: '';
   position: absolute;
   top: 2px;
   left: 2px;
   width: 12px;
   height: 12px;
   background-color: white;
   border-radius: 50%;
   transition: transform 0.3s;
}

.live-render-toggle input[type="checkbox"]:checked + .toggle-switch {
   background-color: #007bff;
}

.live-render-toggle input[type="checkbox"]:checked + .toggle-switch::before {
   transform: translateX(16px);
}

.live-render-status {
   font-size: 0.7em;
   color: #666;
   min-width: 80px;
}

.live-render-status.active {
   color: #007bff;
}

.live-render-status.inactive {
   color: #999;
}
.webhook-status-area {
  margin-top: 5px;
  font-size: 0.75em;
  padding: 5px;
  border: 1px dashed transparent;
}
.webhook-status-area p {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  font-size: 1em;
  text-transform: none;
  text-shadow: none;
  color: #333;
}
.webhook-status-area p a {
  color: #007bff;
}

.output-area h2 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 1.0em;
}

#render-output {
  width: 540px;
  height: 540px;
  border: 1px solid #ccc;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#render-output img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.editor-options {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
  padding: 3px;
  border: 1px solid #eee;
  border-radius: 3px;
}

.option-group,
.compact-form-row {
  display: flex;
  align-items: center;
  margin-bottom: 1px;
  width: 100%;
}

.option-group {
  flex-wrap: wrap;
  gap: 4px;
}

.compact-form-row {
  flex-wrap: nowrap;
  gap: 3px;
}

.option-pair {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 0 1 auto;
  margin-right: 2px;
}
.option-pair:last-child {
  margin-right: 0;
}

.editor-options label {
  margin-bottom: 0;
  margin-right: 2px;
  font-size: 0.7em;
  white-space: nowrap;
  padding: 0;
}

.editor-options input[type="text"],
.editor-options input[type="number"],
.editor-options select {
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 0.7em;
  box-sizing: border-box;
  line-height: 1;
  height: auto;
  min-width: 30px;
}

.option-group .option-pair input,
.option-group .option-pair select,
.compact-form-row .option-pair input,
.compact-form-row .option-pair select {
  flex: 0 1 auto;
  min-width: 35px;
}

.option-group .option-pair select,
.compact-form-row .option-pair select {
  min-width: 45px;
}

#bg-scale,
#logo-pos-vertical-offset,
#logo-pos-horizontal-offset,
#circle-pos-vertical-offset,
#circle-pos-horizontal-offset,
#circle-border-radius {
  width: 45px;
  min-width: 35px;
  flex-basis: 45px;
}

#circle-border-thickness {
  /* New rule for border thickness input */
  width: 50px !important; /* Adjusted width to 50px */
  min-width: 30px !important; /* Adjusted min-width */
  display: inline-block !important; /* Ensure it respects width */
}

#circle-width,
#circle-height {
  width: 50px;
  flex-basis: 50px;
  min-width: 40px;
}
#circle-object-position,
#bg-object-position {
  min-width: 50px;
  flex-basis: 55px;
}

/* Text Settings specific compactness */
.editor:has(h2:contains("Text Settings")) .editor-options .compact-form-row {
  gap: 2px !important;
}
.editor:has(h2:contains("Text Settings")) .editor-options .option-pair {
  gap: 1px !important;
  margin-right: 2px !important;
}
.editor:has(h2:contains("Text Settings")) .editor-options .option-pair:last-child {
  margin-right: 0 !important;
}
.editor:has(h2:contains("Text Settings")) .editor-options label {
  font-size: 0.65em !important;
}
.editor:has(h2:contains("Text Settings")) .editor-options input,
.editor:has(h2:contains("Text Settings")) .editor-options select {
  font-size: 0.65em !important;
  padding: 1px !important;
}
#text-vertical-anchor,
#text-horizontal-anchor {
  min-width: 40px !important;
  flex-basis: 45px !important;
}
#text-align {
  min-width: 70px !important;
  flex-basis: 75px !important;
}
#text-vertical-offset,
#text-horizontal-offset {
  min-width: 45px !important;
  width: 50px !important;
  flex-basis: 50px !important;
}
#text-width,
#text-font-size {
  min-width: 45px !important;
  width: 50px !important;
  flex-basis: 50px !important;
}

/* Gradient Overlay specific compactness */
.editor:has(h2:contains("Gradient Overlay Settings")) .editor-options .compact-form-row {
  gap: 2px !important;
  flex-wrap: nowrap !important;
}
.editor:has(h2:contains("Gradient Overlay Settings")) .editor-options .option-pair {
  gap: 1px !important;
  margin-right: 2px !important;
  flex: 0 1 auto !important;
}
.editor:has(h2:contains("Gradient Overlay Settings")) .editor-options .option-pair:last-child {
  margin-right: 0 !important;
}
.editor:has(h2:contains("Gradient Overlay Settings")) .editor-options label {
  font-size: 0.65em !important;
}
.editor:has(h2:contains("Gradient Overlay Settings")) .editor-options input,
.editor:has(h2:contains("Gradient Overlay Settings")) .editor-options select {
  font-size: 0.65em !important;
  padding: 1px !important;
  min-width: 25px !important;
  flex-basis: auto !important;
}
#gradient-height,
#gradient-vertical-offset {
  width: 35px !important;
  min-width: 30px !important;
}
#gradient-opacity {
  width: 60px !important;
  min-width: 50px !important;
  flex-basis: 60px !important;
}
#gradient-vertical-anchor {
  min-width: 45px !important;
}

/* QR Code Settings specific compactness */
.editor:has(h2:contains("QR Code Settings")) .editor-options .compact-form-row {
  gap: 2px !important;
  flex-wrap: nowrap !important;
}
.editor:has(h2:contains("QR Code Settings")) .editor-options .option-pair {
  gap: 1px !important;
  margin-right: 2px !important;
  flex: 0 1 auto !important;
}
.editor:has(h2:contains("QR Code Settings")) .editor-options .option-pair:last-child {
  margin-right: 0 !important;
}
.editor:has(h2:contains("QR Code Settings")) .editor-options label {
  font-size: 0.65em !important;
}
.editor:has(h2:contains("QR Code Settings")) .editor-options input,
.editor:has(h2:contains("QR Code Settings")) .editor-options select {
  font-size: 0.65em !important;
  padding: 1px !important;
  min-width: 25px !important;
  flex-basis: auto !important;
}
#qr-vertical-anchor,
#qr-horizontal-anchor {
  min-width: 45px !important;
}
#qr-vertical-offset,
#qr-horizontal-offset {
  width: 70px !important;
  min-width: 60px !important;
  flex-basis: 70px !important;
}

.option-pair.full-width-text-input {
  flex-wrap: wrap;
  width: 100%;
  margin-top: 3px;
}
.option-pair.full-width-text-input label {
  width: 100%;
  margin-bottom: 1px;
  font-size: 0.75em !important;
}
.option-pair.full-width-text-input textarea,
.option-pair.full-width-text-input input[type="text"] {
  width: 100%;
  flex-grow: 1;
  min-height: auto;
  font-size: 0.75em !important;
  padding: 2px 3px !important;
}

/* Split Pic Settings specific nowrap */
#split-pic-settings-section .editor-options .compact-form-row {
  flex-wrap: nowrap !important;
}

#full-text-input {
  min-height: calc(2 * 1em + 2 * 2px + 2 * 1px);
  resize: vertical;
}

/* Split Pic Settings specific input width */
#split-pic-settings-section .editor-options .compact-form-row .option-pair input[type="url"] {
  width: 120px; /* Adjust as needed */
}

#split-pic-settings-section .editor-options .compact-form-row .option-pair input[type="number"] {
  width: 50px; /* Adjust as needed */
}

/* Bulk Data Input Section */
#bulk-data-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  font-size: 0.75em;
}
/* #data-table-container is now a direct child of .bulk-and-output-wrapper */
/* It will take 100% width of that wrapper, which is 540px */
#data-table-container {
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  width: 100%; /* Ensure it takes full width of its parent */
  box-sizing: border-box;
}
#data-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7em;
}
#data-table-container th,
#data-table-container td {
  border: 1px solid #ddd;
  padding: 4px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
#data-table-container th:first-child,
#data-table-container td:first-child {
  max-width: 30px;
  white-space: normal;
}
#data-table-container th {
  background-color: #f2f2f2;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Layout Presets Section */
#layout-presets-section {
  margin-top: 10px;
}
.preset-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.preset-options div {
  margin-bottom: 3px;
  margin-right: 10px;
  display: flex;
  align-items: center;
}
.preset-options label {
  margin-left: 4px;
  font-size: 0.8em;
  white-space: nowrap;
}
#font-select option.core-paint-font {
  font-family: "CorePaintB3W01-Regular", sans-serif !important;
}
