/* ────────────────────────────────────────────────────────────────
   nGeneDL – Version 0.6.9-dev | UI tweaks / Dev-only toggle support
   Control Panel = 50 % | Output Panel = 45 %

   © 2013-2025 Hyunsuk Frank Roh, MD. All rights reserved.
──────────────────────────────────────────────────────────────── */

/* General layout */
html,
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Control Section */
.control-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px;
  background-color: #f4f4f4;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
}

.control_title {
  margin-bottom: 10px;
}

/* Control Wrapper */
.control-wrapper {
  min-width: 1300px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.control-wrapper > div {
  margin-right: 10px;
}
.control-wrapper > div:last-child {
  margin-right: 0;
}

/* --- header layout -------------------------------------------------- */
.header-bar {
  display: flex;
  align-items: center;
  width: 100%;
  padding-left: 20px;   /* ← add left-hand padding for the title block */
}

/* “To Home” link on the right */
.home-link {
  margin-left: auto;    /* push to far right */
  padding-right: 35px;  /* ← add right-hand padding */
  font-weight: bold;
}

/* --------------------- 50 % Control Panel --------------------- */
.control-panel {
  border: 2px solid #007ba7;
  padding: 15px;
  border-radius: 15px;
  background-color: #e0f7fa;
  flex: 0 0 50%;
  max-width: 50%;
}

/* Parameters Block */
.parameters-block {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 10px;
  background-color: #ffffff;
  flex: 1;
}

.parameters-block input[type="range"] {
  width: 100%;
}

/* narrower learning-rate slider */
#learning_rate {
  width: 75%;
}

.parameters-columns {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.parameters-left,
.parameters-right {
  flex: 1;
  margin-right: 10px;
}
.parameters-right {
  margin-right: 0;
}

/* Button Groups */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* row layout already set by .horizontal-buttons; add full-width behaviour */
.full-width-row { width: 100%; }

.full-width-row > button {
  flex: 1 1 0;
}

/* row layout for this specific pair */
.horizontal-buttons { flex-direction: row !important; gap: 10px; }

/* lighter first button */
.btn-light        { background-color: #0095c9; }      /* lighter cerulean */
.btn-light:hover  { background-color: #0083b2; }

/* slightly darker second button */
.btn-dark         { background-color: #007ba7; }      /* darker than default */
.btn-dark:hover   { background-color: #005b8a; }


/* --------------------- 45 % Output Panel --------------------- */
.output-block {
  min-width: 500px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 2px solid #007ba7;
  border-radius: 15px;
  background-color: #e3f2fd;
  flex: 0 0 45%;
  max-width: 45%;
}

.log-console {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 10px;
  flex-grow: 1;
  overflow-y: auto;
  min-height: 600px;
}

/* Global Button & Input Tweaks */
button {
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #007ba7;          /* Cerulean */
  color: #ffffff;
}
button:hover { background-color: #006799; }
button:active { background-color: #00527a; }
input[type="number"] { width: 50px; }

/* Disabled selects visually dimmed */
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading Dialog */
#loading {
  background: #ffffff;
  padding: 30px 40px;
  border: 2px solid #007ba7;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  outline: none;
}
#loading h1 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
  color: #007ba7;
  text-align: center;
}
#loading::backdrop { background: rgba(0,0,0,0.45); }

/* Modal Dialog */
.modal-dialog {
  width: 80%;
  height: 90%;
  border: 2px solid #007ba7;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  box-sizing: border-box;
  display: none;
  z-index: 1000;
  overflow: hidden;
  border-radius: 10px;
}
iframe { width: 100%; height: 90%; }

/* ---------- Toggle switch ---------- */
.switch{position:relative;display:inline-block;width:34px;height:18px;vertical-align:middle;}
.switch input{opacity:0;width:0;height:0;}
.slider{
  position:absolute;cursor:pointer;background:#ccc;border-radius:34px;
  top:0;left:0;right:0;bottom:0;transition:background .4s;
}
.slider:before{
  content:"";position:absolute;height:14px;width:14px;left:2px;bottom:2px;
  background:#fff;border-radius:50%;transition:transform .4s;
}
input:checked + .slider{background:#2196F3;}
input:checked + .slider:before{transform:translateX(16px);}

/* Make textarea taller by default */
textarea.py-input {
  resize: vertical;
  min-height: 6rem;
}
