/* .s-ae-options are displayed in a dialog with a darker background and a triangle to show that they are sub-options
   for the option above */
form.aui fieldset.s-ae-options {
  position: relative;
  left: -20px; /* fragile: relies on dialog's form-body padding value */
  width: 100%;
  padding: 12px 20px 12px;
  background: #f3f3f3;
  margin-top: 4px;
  margin-bottom: 4px;
}

.s-ae-options-tri {
  /* triangle taking the color from the main option */
  position: absolute;
  border-top: 8px solid #fff;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  width: 0;
  height: 0;
  left: 159px; /* fragile: relies on dialog's form-body padding value and form.aui padding for values */
  top: 0;
}

/* Used in Attribute Editor to highlight nested parameters with a background */
form.aui fieldset.s-ae-options.s-lev-1 {
  background-color: #e7e7e7;
}

.s-ae-options-tri.s-lev-1 {
  border-top-color: #f3f3f3;
}

form.aui fieldset.s-ae-options.s-lev-2 {
  background-color: #d3d9ce;
}

.s-ae-options-tri.s-lev-2 {
  border-top-color: #e7e7e7;
}

form.aui fieldset.s-ae-options.s-lev-3 {
  background-color: #c0d1d1;
}

.s-ae-options-tri.s-lev-3 {
  border-top-color: #d3d9ce;
}

form.aui fieldset.s-ae-options.s-lev-max {
  background-color: #e6dcc3;
  border-top: 1px solid #bbb;
  border-bottom: 1px solid #bbb;
}

.s-ae-options-tri.s-lev-max {
  display: none;
}

.s-ae-container {
  display: inline-block;
  width: 100%;
  /* Taken from JIRA CSS (form.aui .aui-ss, .jiraform .aui-ss) */
  max-width: 250px;
}

.s-wide .s-ae-container {
  max-width: 340px;
}

#st-edit-column .s-col-opts-form .s-ae-container.configurable {
  padding-right: 30px;
  margin-right: -32px;
  box-sizing: border-box;
}

#st-edit-column .s-ae-container .s-inline-field-tail {
  display: none;
}

#st-edit-column .s-ae-container.configurable .s-inline-field-tail {
  display: inline-block;
}

#s-automation-edit > div > form.aui .st-col-opt-custom > .field-group,
#s-automation-edit > div > form.aui .s-ae-options > .field-group {
  padding: 0 10px 0 145px;
}

#s-automation-edit > div > form.aui .st-col-opt-custom > .field-group + .field-group,
#s-automation-edit > div > form.aui .s-ae-options > .field-group + .field-group {
  margin-top: 6px;
}

#s-automation-edit > div > form.aui .s-ae-options,
.st-col-edit .st-col-scroll > div > form.aui .s-ae-options {
  width: auto;
  left: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 6px;
}

#s-automation-edit form.aui :not(.s-formula-display) > textarea,
#structure form.aui.s-col-opts-form textarea {
  resize: vertical;
}

#s-automation-edit .atlassian-autocomplete .suggestions {
  /* fixes problem with textarea resize */
  top: 100% !important;
  margin-top: -4px;
}

.st-col-edit .st-col-scroll > form.aui .s-ae-options .s-ae-options-tri {
  left: 93px;
}

.st-col-edit .st-col-scroll > div > form.aui .s-ae-options > .field-group {
  padding: 0 10px 0 100px;
}

/* used in form.aui to place something (buttons) at the end of the line without breaking baseline alignment */
.s-inline-field-tail {
  /* base position of the element - at the end of the line, in the same inline context */
  position: relative;
  margin-left: 4px; /* gap to the input element */
  height: 1px; /* bigger height might affect how the input is positioned, if only I knew why... */
  width: 1px; /* override with a specific width if you need to make space for the included absolute elements */
  vertical-align: top;
  display: inline-block;
}

.s-inline-field-tail > div {
  position: absolute; /* otherwise it spoils the layout of the main element */
}

/* used when jquery toggling works badly */
.s-hidden {
  display: none;
}
