/* ==========================================================================
   Xi Software — main styles
   - cleaned up duplicates
   - scoped chevron expander (no global ::before conflicts)
   - stable table spacing & readable defaults
   ========================================================================== */

/* --- Theme tokens -------------------------------------------------------- */
:root {
  --brand-primary: #93278f;
  --brand-accent:  #906bd7;
  --text-color:    #231f20;
  --bg:            #ffffff;
  --panel-bg:      #F8F8F8;
  --muted-border:  #cccccc;
}

/* --- Global base --------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { background-color: var(--bg); }

body {
  color: var(--text-color);
  font-family: sans-serif;
  line-height: 1.5;
  margin: 0;
  padding-left: 2em;
  padding-right: 2em;
  /* keep content above fixed footer */
  padding-bottom: 90px;
}

/* top accent bar */
section.container {
  border-top: 10px solid var(--brand-primary);
  margin: 0;
}

/* lists & links */
ul { list-style: none; padding: 0; margin: 0; }
li { margin: 5px 0; }
a:hover { text-decoration: underline; }

/* images */
img.logo { max-height: 40px; height: auto; width: auto; }

/* alerts & warnings */
.alert { border-radius: 0; }

.warning {
  color: #b30000;
  background-color: #fff0f0;
  border: 1px solid #b30000;
  padding: 0.5em 1em;
  margin: 1em 0;
  border-radius: 4px;
  font-weight: bold;
}

/* layout helpers */
.login-logo {
  padding-top: 20px;
  margin: 0 auto;
  float: right;
  clear: right;
}

.center-align {
  padding-top: 20px;
  margin: 0 auto;
  max-width: 900px;
  padding-bottom: 30px;
}

.center-content {
  padding: 10px 30px 20px 30px;
  margin: 0 auto;
  max-width: 900px;
  background-color: var(--panel-bg);
  overflow: auto;
}

/* footer */
.footer-basic {
  border-top: 10px solid var(--brand-primary);
  background-color: #d3d3d3;
  height: 80px;
  padding-left: 30px;
  padding-right: 30px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* headings */
h1 { margin-bottom: 20px; }
.error-title {
  font-size: 80px;
  font-weight: 700;
  color: var(--brand-accent);
}

/* right-side divider */
.right-side { border-left: 2px solid var(--brand-accent); }

/* responsive: drop divider on small screens */
@media only screen and (max-width: 480px) {
  .right-side { border: none; }
}

/* forms & inputs */
.form-control:focus,
.form-control:active {
  border: 2px solid var(--brand-primary); /* thinner to avoid layout shift */
  outline: none;
}

.btn.btn-default,
.btn.btn-default:active,
.btn.btn-default:focus {
  background-color: var(--brand-accent);
  border: none;
}
.btn.btn-default:hover { filter: brightness(1.05); }

.parsley-required { color: #ff0000; }

.block-label.checked {
  background-color: var(--brand-primary);
  color: #fff;
}

/* --- Tables (build list) ------------------------------------------------- */
.build-table {
  border-collapse: separate;          /* allow border-spacing to work */
  border-spacing: 0 0.25em;           /* small vertical gap between rows */
  width: 100%;
}
.build-table th,
.build-table td {
  padding: 0.5em 0.75em;
  vertical-align: top;
}
.build-table th {
  text-align: left;
  width: 160px;                       /* stable label column */
  white-space: nowrap;
}
code {                                 /* for MD5 etc. */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  word-break: break-all;              /* long hashes won’t overflow */
}

/* --- Expander (details/summary) with chevron ----------------------------- */
/* Use this HTML:
<details class="expander">
  <summary class="has-chevron" style="cursor:pointer;font-weight:bold;margin-top:1em;">
    <span class="chev" aria-hidden="true"></span>
    Advanced filters
  </summary>
  ...
</details>
*/
/* Hide native marker only inside .expander */
.expander > summary::marker { content: ""; }
.expander > summary::-webkit-details-marker { display: none; }

/* Make summary a flex row so chevron is never obscured by block styling */
.expander > summary.has-chevron {
  display: flex;              /* override resets */
  align-items: center;
  gap: 0.4em;
  padding-left: 0;
}

/* Chevron element */
.has-chevron .chev {
  width: 1em;
  display: inline-block;
  line-height: 1;
}
.has-chevron .chev::before {
  content: "▸";               /* right when closed */
  display: inline-block;
  transform-origin: 50% 45%;
  transition: transform .2s ease;
}

/* Rotate when open */
.expander[open] .has-chevron .chev::before {
  transform: rotate(90deg);   /* down when open */
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .has-chevron .chev::before { transition: none; }
}

.expander > summary.has-chevron {
  padding: .4em .5em;      /* larger target */
  border-radius: 6px;
}
.expander > summary.has-chevron:hover {
  background: rgba(0,0,0,.04);
}


/* --- Misc --------------------------------------------------------------- */
.license-type { margin-top: 20px; }

/* optional: improve focus visibility universally */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
