/**
* FORM RUNNING VIEW
*/

body {
  background: #fff;
  overflow: hidden;
}

/* Page Wrapper */
.content-wrap {
  height: 100%;
  min-height: 0;
}

.content-inner {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: auto;
}

.has-navigation .content-inner {
  height: calc(100vh - 72px);
}

@media screen and (min-width: 60em) {

  .content-inner,
  .has-navigation .content-inner {
    height: 100vh;
  }
}

/* Form Output */
.form-container {
  width: 100%;
  height: 100%;
  font-family: 'roboto light', sans-serif; /* Set default font on form content specifically */
}

/* Form Actions (Sidebar Menu) */
.action-list button {
  max-width: 100%;
  padding: 1em 1.5em;
  margin-bottom: 1em;
  background-color: var(--color-blue);
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.action-list button[disabled] {
  opacity: .25;
  cursor: default;
}

.action-list button:not([disabled]):hover {
  filter: brightness(110%);
}

button.action-form {
  background-color: var(--color-blue);
}

button.action-dialog {
  background-color: var(--color-blue);
}

button.action-operation {
  background-color: var(--color-orange);
}

button.action-transition {
  background-color: var(--color-green);
}

/* Loading State */
.form-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  opacity: 0.85;
  backdrop-filter: blur(10px);
  transition: opacity .3s ease;
}

.loading-state {
  display: flex;
  align-items: center;
  font-size: 2em;
  font-weight: 600;
}

.loading-state .loader {
  display: block;
  font-size: 1.5em;
  width: 1em;
  height: 1em;
  border: 8px solid #ddd;
  border-top: 8px solid #444;
  border-radius: 50%;
  margin-right: .5em;
  animation: spin 1s linear infinite;
}

/* Error */
.run-error {
  text-align: center;
}

/* Custom Dialog */
.custom-dialog {
  display: flex;
  position: absolute;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.custom-dialog .dialog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.75);
  opacity: 0;
  transition: opacity .2s ease;
}

.custom-dialog .dialog-message {
  position: relative;
  padding: 1.5em;
  background: #fff;
  border-radius: .5em;
  opacity: 0;
  overflow: hidden;
}

.custom-dialog .dialog-message p {
  font-size: 1.2em;
  margin: 0 0 .5em;
}

.custom-dialog button {
  padding: .75em 1.5em;
  margin: .75em .75em 0 0;
  background: #ddd;
  color: #000;
  border: none;
  border-radius: 100em;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: filter .2s ease;
}

.custom-dialog button:hover {
  filter: brightness(105%);
}

.custom-dialog button.confirm-button {
  background: var(--color-neutral);
  color: #fff;
}

/* Dialog entrance animation */
.custom-dialog.open .dialog-overlay {
  opacity: 1;
}

.custom-dialog.open .dialog-message {
  animation: fade-up .25s ease forwards;
}

/* Dialog loading animation */
.custom-dialog.is-loading {
  pointer-events: none;
}

.custom-dialog.is-loading .dialog-message::before,
.custom-dialog.is-loading .dialog-message::after {
  content: '';
  position: absolute;
  z-index: 1;
}

.custom-dialog.is-loading .dialog-message::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, .9);
}

.custom-dialog.is-loading .dialog-message::after {
  top: 50%;
  left: 50%;
  width: 1em;
  height: 1em;
  margin-top: -0.5em;
  margin-left: -0.5em;
  font-size: 2.5em;
  border: .2em solid #ddd;
  border-top-color: var(--accent-dark);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
