/* common.css */
/* Hide scrollbars on the whole page but keep scrolling enabled */
html, body {
  margin: 0;
  padding: 10px;
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;

  overflow: auto;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE and Edge */
  height: 100%;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;                /* Chrome, Safari */
}

:root {
  --ggtc-blue: #004a99;        /* მთავარი ლურჯი */
  --ggtc-dark-blue: #003366;   /* მუქი ლურჯი აქცენტებისთვის */
  --ggtc-light-blue: #e6f0ff;  /* ღია ლურჯი ფონი */
  --white: #ffffff;
  --text-color: #333333;
  --bg-color: #f4f7f6;         /* რბილი ნაცრისფერი ფონი */
  --border-color: #d1d9e6;
  --success: #27ae60;
}

/* მთლიანი გვერდის სტილი */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

/* GGTC მთავარი ჰედერი */
.ggtc-header {
  background: linear-gradient(135deg, var(--ggtc-blue) 0%, var(--ggtc-dark-blue) 100%);
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-bottom: 0;
}

.ggtc-header h1 {
  margin: 0;
  font-size: 2.4em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.ggtc-header p {
  margin: 10px 0 0;
  font-size: 1em;
  font-weight: 300;
  opacity: 0.85;
}


/* Navigation menu styled to match a container of 800px width */
nav {
  max-width: 800px;
  margin: 0 auto 10px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  border-radius: 8px;
  box-sizing: border-box;
}
nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
}
nav li {
  flex: 1;
  text-align: center;
}
nav a {
  display: block;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  padding: 6px 10px;
}
nav a.active,
nav a:hover {
  background-color: #ddd;
}

/* Container for pages with content (index.html & pressures.html) */
.container {
  max-width: 800px;
  margin: auto;
  background-color: #fff;
  padding: 20px;
  padding-top: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  margin-top: 10px;
  box-sizing: border-box;
}

/* Container for pages with content (index.html & pressures.html) */
.wide-container {
  max-width: 100%;
  margin: auto;
  background-color: #fff;
  padding: 20px;
  padding-top: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  margin-top: 10px;
}
.wide-container table {
  margin: 0 auto;
}
.container table {
  border-collapse: collapse;   /* collapse borders to remove gaps */
  border-spacing: 0;           /* remove spacing between cells */
}

/* Field groups (used in index.html and pressures.html) */
.field-group {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}
.field-group label {
  flex: 0.5;
  min-width: 100;
  white-space: nowrap;
}
.field-group input {
  flex: 0.5;
  min-width: 80px;
  padding: 5px;
}
.field-group span {
  flex: 2;
  font-size: 0.9em;
  color: #555;
}

/* Results container for index.html */
.results-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.results-column {
  flex: 1;
  min-width: 300px;
}

/* Simulator page specific styles */
/* Controls area constrained to 800px and centered */
#controls {
  max-width: 800px;
  margin: 0 auto 10px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  border-radius: 8px;
  box-sizing: border-box;
}
.controlButton {
  margin-right: 2px;
  margin-left: 0;
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
}

.controlButton:hover {
  background-color: #f0f0f0;
}

.controlButton.active {
  background-color: #4CAF50;
  color: white;
  border-color: #45a049;
}

.controlButton.active:hover {
  background-color: #45a049;
}

.controlButton.deactivated {
  background-color: #eee !important;
  color: #aaa !important;
  border-color: #ddd !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
}


/* Cytoscape container (canvas): full browser width */
#cy {
  width: 100%;
  height: 600px;
  display: block;
  background-color: #fff;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

/* Modal styles for help popup */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  overflow: auto; background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff; margin: 5% auto; padding: 20px;
  border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 8px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.close {
  color: #aaa; position: absolute; top: 10px; right: 20px;
  font-size: 28px; font-weight: bold; cursor: pointer;
}
.close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; }
.help-carousel {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px;
}
.help-carousel img {
  max-width: 320px; max-height: 220px; border: 1px solid #ccc; border-radius: 4px; background: #f9f9f9;
}
.carousel-btn {
  background: #eee; border: 1px solid #ccc; border-radius: 50%; width: 36px; height: 36px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.carousel-btn:hover { background: #ddd; }

/* Cookie Notice Styles */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2c3e50;
  color: white;
  padding: 15px 20px;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  font-size: 14px;
  line-height: 1.4;
}

.cookie-notice-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.cookie-notice-text {
  flex: 1;
  min-width: 300px;
}

.cookie-notice-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.cookie-btn-accept {
  background: #27ae60;
  color: white;
}

.cookie-btn-accept:hover {
  background: #229954;
}

.cookie-btn-decline {
  background: #95a5a6;
  color: white;
}

.cookie-btn-decline:hover {
  background: #7f8c8d;
}

.cookie-notice a {
  color: #3498db;
  text-decoration: underline;
}

.cookie-notice a:hover {
  color: #2980b9;
}

.cookie-notice.hidden {
  display: none;
}

@media (max-width: 768px) {
  .cookie-notice-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-notice-text {
    min-width: auto;
  }
  
  .cookie-notice-buttons {
    justify-content: center;
  }
}

/* Collapsible container styles */
.collapsible-container {
  max-width: 800px;
  margin: auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  margin-top: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.collapsible-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 10px 20px;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  text-align: center;
}

.collapsible-header:hover {
  background-color: #e9ecef;
}

.collapsible-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  flex: 1;
  text-align: center;
}

.collapsible-toggle {
  font-size: 18px;
  font-weight: bold;
  color: #666;
  transition: transform 0.3s ease;
  margin-left: 10px;
}

.collapsible-header.collapsed .collapsible-toggle {
  transform: rotate(-90deg);
}

.collapsible-content {
  padding: 20px;
  padding-top: 10px;
  transition: all 0.3s ease;
  overflow: hidden;
  text-align: center;
}

.collapsible-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.collapsible-content.expanded {
  max-height: none;
  opacity: 1;
}

/* Center align all content within collapsible containers */
.collapsible-content * {
  text-align: center;
}

.collapsible-content table {
  margin: 0 auto;
  text-align: center;
  font-size: 0.85em;
  border-collapse: collapse;   /* collapse borders to remove gaps */
  border-spacing: 0;           /* remove spacing between cells */
}

.collapsible-content table th,
.collapsible-content table td {
  text-align: center;
  font-size: 0.85em;
}

.collapsible-content div {
  text-align: center;
}

/* Override styles for formula containers to make them look like normal containers */
.collapsible-container .collapsible-content p,
.collapsible-container .collapsible-content table,
.collapsible-container .collapsible-content table th,
.collapsible-container .collapsible-content table td {
  text-align: left;
  font-size: 1em;
}

.collapsible-container .collapsible-content table {
  margin-left: 0;
  border-collapse: collapse;   /* collapse borders to remove gaps */
  border-spacing: 0;           /* remove spacing between cells */
}

.collapsible-container .collapsible-content em {
  text-align: left;
}

/* Specific styling for edges and nodes info tables */
#info-edges table,
#info-nodes table {
  font-size: 0.8em;
}

#info-edges table th,
#info-edges table td,
#info-nodes table th,
#info-nodes table td {
  font-size: 0.8em;
  padding: 4px 8px;
}

/* Special styling for script container */
.script-content {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: flex-start;
}

.script-content textarea,
.script-content pre {
  width: 50%;
  text-align: left; /* Keep code readable with left alignment */
}

.script-content textarea {
  font-family: monospace;
}

.script-content pre {
  margin: 0;
  font-family: monospace;
  white-space: pre-wrap;
  border: 1px solid #ccc;
  padding: 4px;
  background: #f9f9f9;
  text-align: left; /* Keep code readable with left alignment */
}

/* Simple modern link styles */
.modern-link {
  display: inline-block;
  color: #2563eb;
  text-decoration: none;
  padding: 5px 5px;
  margin: 2px 2px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f9fa;
  transition: all 0.2s;
}

.modern-link:hover {
  color: #1d4ed8;
  background: #e3f2fd;
  border-color: #3b82f6;
}

/* Language switcher (fixed corner, outside main container) */
.lang-switcher {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2000;
  background: rgba(255,255,255,0.95);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.lang-switcher select {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 6px;
  background: #fff;
}

/* ფუტერი */
footer {
  margin-top: 50px;
  padding: 30px;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: #666;
}

/* Responsive adjustments for collapsible containers */
@media (max-width: 768px) {
  .collapsible-header {
    padding: 10px 15px;
  }
  
  .collapsible-content {
    padding: 10px 15px 15px 15px;
  }
  
  .script-content {
    flex-direction: column;
  }
  
  .script-content textarea,
  .script-content pre {
    width: 100%;
  }

}

