/* Plate Manager Styles */

.plate-manager-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.plate-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.plate-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.plate-item {
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: #f8f9fa;
  transition: all 0.2s;
}

.plate-item:hover {
  background: #e9ecef;
  cursor: pointer;
}

.plate-item.active {
  background: #d1ecf1;
  border-color: #0c5460;
}

.plate-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.plate-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.plate-item-stats {
  margin-bottom: 0.5rem;
}

.plate-item-actions {
  display: flex;
  gap: 0.5rem;
}

/* ── Well Grid ── */

.well-grid-container {
  overflow-x: auto;
  margin-top: 1rem;
}

/* Outer wrapper: flex column so legend sits below */
.well-grid {
  display: inline-block;
  border: 2px solid #495057;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

/* Each row is a flex line of fixed-width cells */
.wg-row {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
}
.wg-row:last-child { margin-bottom: 0; }

/* ── Header cells ── */
.wg-corner,
.wg-col-hdr,
.wg-row-hdr {
  background: #495057;
  color: #fff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* 96-well sizes */
.well-grid--96 .wg-corner  { width: 24px; height: 20px; }
.well-grid--96 .wg-col-hdr { width: 58px; height: 20px; font-size: .65rem; }
.well-grid--96 .wg-row-hdr { width: 24px; min-height: 50px; font-size: .7rem; }

/* 384-well sizes (narrower cells to keep grid manageable) */
.well-grid--384 .wg-corner  { width: 20px; height: 16px; }
.well-grid--384 .wg-col-hdr { width: 36px; height: 16px; font-size: .5rem; }
.well-grid--384 .wg-row-hdr { width: 20px; min-height: 34px; font-size: .55rem; }

/* ── Well cells ── */
.wg-cell {
  background: #f3f4f6;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: filter .15s, transform .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  padding: 2px 1px;
  text-align: center;
  line-height: 1.2;
}

.wg-cell:hover { filter: brightness(.92); transform: scale(1.04); }

/* 96-well cell */
.well-grid--96 .wg-cell { width: 58px; min-height: 50px; }

/* 384-well cell */
.well-grid--384 .wg-cell { width: 36px; min-height: 34px; }

/* Filled: colour comes from inline style */
.wg-cell--filled {
  color: #fff;
  border-width: 2px;
  font-weight: 600;
}
.wg-cell--filled:hover { filter: brightness(.88); transform: scale(1.04); }

/* Text inside filled cells */
.wg-pos {
  opacity: .8;
  display: block;
}
.wg-name {
  display: block;
  word-break: break-all;
  font-weight: 700;
}

/* 96-well text sizes */
.well-grid--96 .wg-pos  { font-size: .52rem; }
.well-grid--96 .wg-name { font-size: .62rem; margin-top: 1px; }

/* 384-well text sizes */
.well-grid--384 .wg-pos  { font-size: .38rem; }
.well-grid--384 .wg-name { font-size: .44rem; margin-top: 1px; }

/* Highlight animation (on add) */
.wg-cell--highlight {
  animation: wg-pulse 1s ease-out;
}
@keyframes wg-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59,130,246,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* ── Colour legend ── */
.wg-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-left: 2px;
  font-size: .78rem;
}
.wg-legend__label {
  color: #6c757d;
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  width: 100%;
}
.wg-legend__item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #343a40;
}
.wg-legend__swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Plate Info Panel */

.plate-info-panel {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.plate-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #dee2e6;
}

.plate-info-item:last-child {
  border-bottom: none;
}

.plate-info-label {
  font-weight: 600;
  color: #495057;
}

.plate-info-value {
  font-size: 1.1rem;
  color: #212529;
}

/* Button Styles */

.plate-action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.plate-export-btn {
  background: #17a2b8;
  border-color: #17a2b8;
}

.plate-export-btn:hover {
  background: #138496;
  border-color: #117a8b;
}

/* Responsive: tighten sidebar on mobile */
@media (max-width: 768px) {
  .plate-manager-container { padding: 1rem; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* DNA Designer Layout */
.dna-designer-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 300px;
  min-width: 300px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.main-content {
  flex: 1;
  background: #f8f9fa;
  overflow: hidden;
}

.application-window {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.controls-panel {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.visualization-panel {
  flex: 1;
  position: relative;
  background: #ffffff;
  padding: 15px;
}

.threejs-scene {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

/* Bootstrap Overrides for DNA Designer */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar Navigation Styling */
.sidebar .nav-link {
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateX(2px);
}

.sidebar .nav-link.active {
  background: #0d6efd !important;
}

/* Action Tabs Styling */
.nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  font-weight: 500;
  padding: 12px 20px;
}

.nav-tabs .nav-link.active {
  background: white;
  color: #0d6efd;
  border-bottom: 3px solid #0d6efd;
}

.nav-tabs .nav-link:hover {
  color: #0d6efd;
  border-color: transparent;
}

/* Form Enhancements */
.form-control:focus, .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.form-control-color {
  width: 60px;
  height: 38px;
  padding: 2px;
}

/* Button Enhancements */
.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

/* Authentication Section */
.sidebar-auth {
  background: rgba(0, 0, 0, 0.1);
}

.avatar {
  font-size: 1.2rem;
}

/* Analysis Cards */
.card {
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
}

/* Authentication Pages */
.auth-page {
  min-height: 100vh;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #212529 0%, #343a40 55%, #0d6efd 160%);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  border-radius: 14px;
}

/* Assembly Catalog */
.assembly-card .card-header h6 {
  min-width: 0;
}

/* Cards in the catalog grow with their column, so rows stay even */
.assembly-card.h-100:hover {
  transform: translateY(-2px);
}

/* Documentation Page */
.docs-container {
  height: 100vh;
}

.docs-content section {
  scroll-margin-top: 1rem;
}

.docs-content h4 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 1rem;
}

.docs-content code {
  background: #f1f3f5;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: #d63384;
}

.docs-code {
  background: #212529;
  color: #e9ecef;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  overflow-x: auto;
}

.docs-toc {
  position: sticky;
  top: 1rem;
}

.docs-toc .list-group-item-action {
  border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
    min-width: 250px;
  }
  
  .nav-tabs .nav-link {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}
