/* ========================================================================= */
/* ================================== Global =============================== */
/* ========================================================================= */

/* Brand Colours */
:root {
    --primary-colour:   #012233; /* Dark Blue */
    --secondary-colour: #618787; /* Light Blue */
    --text-colour:      #1d1d1d; /* Black */
    --accent-colour:    #f45d71; /* Accent */
    --white-colour:     #e0e0e0; /* Off-white */
    --dark-colour:      #121212; /* Off-black */
    --terminal-colour:  #00ff00; /* Bright Green */
}

body {
    font-family: 'Cabin', sans-serif;
    background-color: var(--secondary-colour);
    color: var(--white-colour);
    margin: 0;
}

h1, h3 {
    text-align: center;
}

.katex { 
    font-size: 1.5em !important; 
}
/* ========================================================================= */
/* =========================== Header Container ============================ */
/* ========================================================================= */
header {
  background-color: var(--secondary-colour);
  color: var(--primary-colour);
  padding: 20px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20%;
  flex-wrap: wrap;
}

/* Left Section */
.nav-left {
  align-items: center;
  display: flex;
  width: 40%;
  min-width: 220px;
}

.logo {
  height: 80px;
}

.site-title {
  font-size: 2em;
  font-weight: bold;
  letter-spacing: 3px;
}

/* Right Section */
.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;                     /* Space between Home and Contact */
  width: 60%;
}

.nav-links a {
  color: var(--primary-colour);
  text-decoration: none;
  font-size: 1em;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent-colour);                /* Simple hover effect */
}

/* ========================================================================= */
/* ================================== Content ============================== */
/* ========================================================================= */

.content {
    background: var(--dark-colour);
    padding: 20px 5%;
}

label {
  white-space: nowrap;
}

/* Button Styling */
button {
    margin: 10px 0;
    padding: 5px 10px;
    cursor: pointer;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
}

select {
  margin: 10px 0;
  padding: 5px 10px;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

button, select {
    min-height: 32px;
    font-size: 16px;
}

button:hover {
    background: #444;
}

textarea {
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 4px;
    resize: vertical;
    font-size: x-small;
    padding: 8px;
}

#embedding-table{
    margin: 10px 0;
    border: 1px solid #555;
    border-radius: 4px;
}


/* =========================== Layout Containers  ========================== */
.column-container {
    display: flex; /* Side by side */
    flex-wrap: wrap; /* Wrap at smaller page width */
    gap: 20px;
    margin-bottom: 10px;
}

/* ========================== Selector Containers  ========================== */

.selector-container {
  flex: 1;
  min-width: 360px;   /* Wrap when the selector container is 360px */
}

.input-container {
  display: flex;
  align-items: center;
  gap: 10px;          
  width: 100%;
}
.input-container select {
  flex-grow: 1;        /* Tells the dropdown to take up all remaining space */
}
.input-container button {
  flex-grow: 1;    /* Tells the button to take up all remaining space */
  flex-shrink: 0;      /* Prevents button from squishing if space is tight */
  white-space: nowrap; /* Keeps button text on one line */
}

/* ============================ Graph Containers  =========================== */

.source-block {
  flex: 1;
  min-width: 240px; /* Wraps when selector 360px, then source is (360+360)/3 */
}

.target-block {
  flex: 2;
  min-width: 360px; /* Wrap when double the source block 2*(360+360)/3 */
}

.sigma-graph {
  border: 1px solid #333;
  border-radius: 4px;
  background: #1e1e1e;
}

#graph-source {
    min-height: 360px;
}

#graph-target {
    min-height: 480px;
}

/* =========================== Layout Containers  =========================== */

#status {
  margin: 10px 0;
  font-family: monospace;
  background: #1e1e1e;
  color: var(--terminal-colour);
  padding: 10px;
  border: 1px solid #333;
  border-radius: 4px;
}

#emb-method{
  width: 100%; 
  max-width: 150px; 

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================== Embedding Output  ============================ */

#emb-output {
  margin: 10px 0;
  font-family: monospace;
  background: #1e1e1e;
  color: var(--secondary-colour);
  padding: 10px;
  border: 1px solid #333;
  border-radius: 4px;
}

#treemap {
  display: flex;
  width: 100%;
}

/* ========================================================================= */
/* =========================== Footer Container ============================ */
/* ========================================================================= */
footer {
    background-color: var(--primary-colour);
    padding: 20px 0;
    margin: 5% 0;
}

.foot-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20%;
}

/* Left Section */
.foot-left {
  padding: 20px 0;
  width: 35%;
  min-width: 240px;
}

/* Right Section */
.foot-right {
  padding: 20px 0;
  width: 35%;
  white-space: nowrap;
}

.foot-right h2 {
  margin: 0;
}

.info-block {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.address-text {
    flex-direction: column;
}