body {
    font-family: sans-serif;
    background-color: #f9f9f9;
    padding: 0.5rem;
    margin: 0;
    color: #333;
}

/* Don’t constrain width on phones—let it fill */
#interview_specifications {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0 0rem;
}

h1 {
    text-align: center;
    color: #222;
}

label {
    display: block;
    margin-bottom: 0.0rem;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.section-title {
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #555;
}

.error {
  display: block;
  width: 100%;
  background-color: #fdecea;   /* softer, more muted red */
  color: #611a15;              /* darker text */
  border-left: 5px solid #f5c6cb;  /* accent border */
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  font-family: sans-serif;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);  /* subtle depth */
}

.alert.info {
  padding: .75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-top-color: transparent;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: .25rem;
  color: #004085;
  background-color: #cce5ff;
  border-color: #b8daff;
  margin-bottom: 40px;
}

/*******
 Buttons
********/

.btn {
    text-decoration: none;          /* remove underline */
    display: inline-block;
    padding: 0.6rem 1.2rem;
    margin-bottom: 0.5rem;          /* space between stacked buttons */
    line-height: 1;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color .2s ease;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    box-sizing: border-box;
}

.btn--primary {
    background: #007bff;
    color: #fff;
}
.btn--primary:hover {
    background: #0056b3
}

.btn--danger {
    background: #f8d7da;
    color: #a00;
}
.btn--danger:hover {
    background: #f1b0b7
}


/*****
 Cards
******/

.card {
    display: flex;
    flex-direction: column;
    background: #f0f8ff;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.card-header {
    display: flex;
    flex-direction: row;           /* side-by-side */
    align-items: flex-start;       /* buttons and title at the top */
    justify-content: space-between;/* push title & controls to the edges */
}

/* let the title take all leftover space, but be able to shrink+wrap */
.card-title {
    font-weight: bold;
    flex: 1 1 auto;
    min-width: 0;                  /* critical to allow shrinking in a flexbox */
    margin-right: 1rem;            /* gap between title & buttons */
    word-break: break-word;        /* long words will break safely */
}

.card-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.card-summary {
    font-style: italic;
    color: #444;
}

.card-badges {
    margin-top: 0.5rem;
}

.context-label {
    background-color: #007bff;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.5rem;
}

.context-value {
    white-space: pre-wrap;
    font-style: italic;
    color: #444;
}

.label-badge {
    background-color: #007bff;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.5rem;
}

.card-context-key-badges {
    margin-bottom: 0.5rem;
}

.card-context-key-badges .context-key-badge {
    background-color: grey;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.5rem;
}

.terminate-badge, .goto-badge, .on-failure-badge, .await-badge {
    background-color: black;
    color: white;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-right: 0.5rem;
}

/******
 Modals
*******/

.modal {
  display: none;              /* when it's enabled, this becomes 'flex' */
  justify-content: center;
  align-items: flex-start;    /* anchor modal-content at the top */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  padding: 1rem;              /* give some breathing room at the top */
  box-sizing: border-box;
  background-color: rgba(0,0,0,0.5);
  overflow-y: auto;           /* allow the overlay to scroll */
}

.modal-content .context-key-label {
    font-weight: normal;
}


.modal-content { background: white; padding: 1rem; border-radius: 8px; width: 90%; max-width: 400px; }
.modal-content div { margin-bottom: 0.75rem; }
.modal-content label { display: block; margin-bottom: 0.25rem; font-weight: bold; }
.modal-content input[type="text"], .modal-content textarea, .modal-content select, .modal-content input[type="number"] { width: 100%; padding: 0.5rem; box-sizing: border-box; }
#plan { width: 100%; height: 200px; font-family: monospace; margin-top: 1rem; }


.control-buttons { margin-bottom: 1rem; }
.control-buttons button { margin-right: 0.5rem; }


/* AT TABLET & UP: add a max-width and center the page */
@media (min-width: 640px) {
  body {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
  }
}

/* LAYOUT HEADER HORIZONTALLY on desktop */
@media (min-width: 768px) {
  .card-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .card-controls button {
    width: auto;      /* let buttons size to content */
  }
}
