
/* NAME           : CUSTOM-MENU */
/* AUTHOR         : NIELS VAN DEN HOEK */
/* LAST MODIFIED  : 01-03-2026 */

:root {
    --text:#1a1a1a;
    --muted:#666;
    --bg:#fff;
    --border:#e8e8e8;
    --accent:#0f172a;
}

::-webkit-scrollbar {
    width: 10px; /* Vertical scrollbar width */
    height: 0px; /* Horizontal scrollbar height */
}

::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

:focus-visible {
    outline: 3px solid #ffb13d;
    outline-offset: 2px;
}

* { box-sizing: border-box }

html {
    scroll-behavior:smooth
}

body {
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    line-height:1.65;
    font-size: 1.2rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

main.container {
    padding: 0 6%;
}

fieldset {
    border: none;
    padding: 0;
}

legend, h2 {
    display: block;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

legend {
    margin-block-end: 0;
}

hr {
    width: 100%;
    margin: 50px 0 40px 0;
    border: none;
    height: 1px;
    background-color: #cecece;
}

textarea, button, input, .normative-diff > div {
    background-color: #cecece;
    border-radius: 5px;
    border: 1px solid #333;
    padding: 10px;
    font-size: 0.9rem;
}

textarea, input, .normative-diff > div {
    display: block;
    width: 100%;
}

button, select {
    font-size: 1.1rem;
}

button, a.test-runner {
    -webkit-appearance: none;
    -webkit-border-radius: 0;
    border: 1px solid grey;
    border-radius: 5px;
    background-color: lightgrey;
    color: black;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

select {
    border-radius: 5px;
    border: 1px solid #333;
    padding: 10px;
	margin: 0 6px 0 0;
}

ul, ol {
    padding: 0 0 0 20px;
}

label, .normative-diff > span {
    margin: 10px 0 4px 0;
    display: block;
}

h1 {
    margin: 50px 0;
}

/* Hover */

button.active_button, .audit-tools button:hover, button#btn_declare_state:hover, button#btn_reset_state:hover, button#btn_switch_stance:hover, button#btn_apply_context:hover, button#btn_clear_context:hover, a.test-runner:hover, button#review_commit:hover, button#reject_proposal:hover {
    background-color: #ffb13d;
    border: 1px solid grey;
    cursor: pointer;
}

button.activeButton {
    background-color: #ffb13d;
    border: 1px solid grey;	
	opacity: 1.0;
}

/* Switch Context */

.context-tools {
    margin: 20px 0 0 0;
    display: flex;
    gap: 10px;
}

span#context_status {
    display: block;
    margin: 10px 0 0 0;
    font-size: 0.9rem;
}

/* Governance Compare */

.governance-compare {
    margin: 30px 0;
}

.gov-pipeline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 40px 0;
}

.gov-node {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #cecece;
    color: #444444;
    font-size: 1rem;
}

.gov-norm {
    background: #5fa85f;
    border-color: #5fa85f;
}

.gov-cil {
    background: #e74c3c;
    border-color: #e74c3c;
}

.gov-exec {
    background: #5fa85f;
    border-color: #5fa85f;
}

/* Execution Pipeline */

.cil-pipeline {
  display: flex;
  gap: 12px;
}

.cil-pipeline .pipeline-arrow {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pipe-node {
    padding: 5px 12px;
    border-radius: 6px;
    border: 3px solid #2a2929;
    font-size: 1rem;
    background-color: #444;
    color: #fff;
}

.pipe-node.active {
    border-color: #3d9440;
    background-color: #4caf50;
}

.pipe-node.blocked {
    border-color: #ae2724;
    background-color: #e53935;
}

.pipe-node.review {
    border-color: #d88303;
    background-color: #ff9900;
}

/* CIL Status Badge */

.cil-status-badge {
  max-width: 100%;
  margin-top: 20px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  position: relative;
}

.cil-status-badge .green-status-badge,
.cil-status-badge .orange-status-badge,
.cil-status-badge .red-status-badge,
.cil-status-badge .blue-status-badge,
.cil-status-badge .purple-status-badge {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0.25;
  position: absolute;
}

.cil-status-badge.active-green .green-status-badge { background: #00aa00; opacity: 1; }
.cil-status-badge.active-orange .orange-status-badge { background: #ff9900; opacity: 1; }
.cil-status-badge.active-red .red-status-badge { background: #cc0000; opacity: 1; }
.cil-status-badge.active-blue .blue-status-badge { background: #0000ff; opacity: 1; }
.cil-status-badge.active-purple .purple-status-badge { background: #8136ff; opacity: 1; }

.cil-status-badge span {
  display: none;
  padding-left: 20px;
}

.cil-status-badge.active-green .green-badge-text,
.cil-status-badge.active-orange .orange-badge-text,
.cil-status-badge.active-red .red-badge-text,
.cil-status-badge.active-blue .blue-badge-text,
.cil-status-badge.active-purple .purple-badge-text {
  display: inline;
  margin: 0;
}

.cil-status-badge-v2 { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.cil-status-badge-v2 .badge-dot { width:10px; height:10px; border-radius:50%; background:#444; opacity:.35; }
.cil-status-badge-v2 .badge-text { opacity:.6; }
.cil-status-badge-v2[data-state="ALLOW"]  [data-state="ALLOW"],
.cil-status-badge-v2[data-state="REVIEW"] [data-state="REVIEW"],
.cil-status-badge-v2[data-state="ALLOW-CONTEXT"] [data-state="ALLOW-CONTEXT"],
.cil-status-badge-v2[data-state="ALLOW-STANCE"] [data-state="ALLOW-STANCE"],
.cil-status-badge-v2[data-state="BLOCK"]  [data-state="BLOCK"] { opacity:1; font-weight:700; }

/* Light States */

.lights {
    padding: 6px;
    background-color: black;
    display: inline-block;
    border-radius: 20px;
}

.lights > div {
    width: 80px;
    height: 26px;
    background-color: #444;
    margin: 10px;
    border-radius: 10px;
    opacity: 0.25;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.lights > div.active {
    opacity: 1;
    filter: brightness(1.1);
    color: #fff;
    font-weight: bold;
}

.lights .green_light { background-color: #00ff00; }
.lights .orange_light { background-color: orange; }
.lights .red_light { background-color: red; }
.lights .blue_light { background-color: blue; }
.lights .purple_light { background-color: #8136ff; }

/* Review Panel */

section.review-panel {
    margin: 60px 0 0 0;
    border: 1px solid #444;
    border-radius: 10px;
	background-color: #cecece;
}

.review-panel hr {
    background-color: #fff;
    margin: 30px 0 30px 0;
}

.review-panel-container textarea, .review-panel-container button, .review-panel-container input {
    background-color: #fff;
}

.review-panel-container input {
    width: auto;
	font-weight: 600;
    font-size: 1.2rem;
}

textarea#rw-message, button#review_commit, button#reject_proposal, textarea#audit_log {
    margin: 20px 0 0 0;
}

.audit-tools, .review-tools {
    margin: 20px 0 0 0;
    display: flex;
    gap: 10px;
}

.audit-filters > label {
    font-size: 1rem;
}

h3.review-header {
    background-color: #fff;
    margin: 1px;
    padding: 20px;
    border-radius: 0px;
}

.review-wrapper {
    padding: 0 20px 20px 20px;
    margin: 0;
}

.review-wrapper h4 {
    margin-bottom: 16px;
}

.current_state {
    display: inline-block;
}

.review-panel-lights {
    display: inline-block;
    float: right;
    margin: 30px 0;
}

.current_state > span {
    display: block;
}

.review-wrapper label {
    display: table;
    margin: 4px 0 4px 0;
}

#execution_lock {
    padding: 5px 10px;
    border-radius: 8px;
    background: #eee;
}

input#review_ack {
    margin: 0 10px 0 0;
}

input[type="checkbox"] {
    display: inline-block;
    width: 20px;
    height: 20px;
}

input[type="checkbox"]:checked {

}

/* AI scenario runner */

.scenario-runner-panel {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid #aaa;
  background: #d9d9d9;
}

.scenario-runner-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.scenario-runner-panel p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.scenario-runner-panel label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.scenario-runner-panel select,
.scenario-runner-panel textarea,
.scenario-runner-panel button {
  width: 100%;
  box-sizing: border-box;
}

.scenario-runner-panel select,
.scenario-runner-panel textarea {
  margin-bottom: 0.75rem;
}

.scenario-runner-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.scenario-runner-actions button {
  flex: 1;
}

#scenario_status {
  min-height: 72px;
  resize: vertical;
}

/* CIL Logo */

.logo-wrapper {
    width: 160px;
    height: 160px;
    display: inline-block;
    float: right;
}

.letter {
    width: 80px;
    height: 80px;
    float: left;
    display: flex;
    justify-content: center;
    align-items:center;
    font-size: 3.6rem;
    font-weight: 900;
    color: #333;
}

.letter.logo-top-left {
    border-bottom: 1px solid #333;
    border-right: 1px solid #333;
}
.letter.logo-top-right {
    border-bottom: 1px solid #333;
}
.letter.logo-bot-left {
    border-right: 1px solid #333;
}

/* Footer */

.footer {
    border-top: 1px solid #cecece;
    width: 100%;
    height: auto;
    margin: 40px 0;
    padding: 30px 0 0 0;
}

#footer-left, #footer-right {
    width: 100%;
    font-size: 1.0rem;
    color: #666666;
}

#footer-right {
    margin-top: 40px;
}

#footer-right a {
    display: inline-block;
}

.backTo {
    margin-top: 1.5rem;
    font-weight: 700;
}
.backTo a {
    color: var(--muted);
    text-decoration: none;
}
.backTo a:hover {
    text-decoration: underline;
}


@media only screen and (max-width: 800px) {
    
    h1 {
        font-size: 2.2rem;
    }
    
    main.container {
        padding: 0 20px;
    }
    
    .cil-pipeline, .gov-pipeline {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-direction: column;
    }
    
    .pipe-node, .gov-node {
        width: 100%;
        text-align: center;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }
}

@media only screen and (min-width: 1300px) {
    html,
    body {
        margin: 0;
        min-height: calc(var(--vh, 1vh) * 100);
        overflow: hidden;
    }

    h1 {
        margin: 0 0 50px 0;
    }

    main.container {
        max-width: 2000px;
        min-height: calc(var(--vh, 1vh) * 100);
        margin: 0 auto;
    }

    section.cil-panel {
        width: 56%;
        height: calc((var(--vh, 1vh) * 88) - 260px);
        display: inline-block;
        float: left;
        overflow-y: auto;
        margin: 60px 0 0 0;
        padding: 0 40px 0 4px;
        box-sizing: border-box;
    }

    section.review-panel {
        width: 36%;
        height: calc((var(--vh, 1vh) * 88) - 260px);
        display: inline-block;
        float: right;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .footer {
        width: 100%;
        height: 260px;
        display: inline-block;
        clear: both;
        box-sizing: border-box;
    }

    #footer-left,
    #footer-right {
        width: 50%;
        display: inline-block;
        float: left;
        box-sizing: border-box;
    }

    #footer-right a {
        float: right;
    }
}
