/* static/css/stress-analysis-tool.css */
/* Sustained Stress Tool – Clean, professional, on-brand */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.page-title {
  color: var(--bs-primary);
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--bs-secondary);
  max-width: 800px;
  margin: 0 auto;
}

/* Upload Card */
.upload-card {
  border: 2px solid var(--bs-secondary) !important;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.upload-card:hover {
  box-shadow: 0 1rem 3rem rgba(37, 92, 113, 0.2) !important;
  transform: translateY(-5px);
}

.upload-icon {
  font-size: 4rem;
  color: var(--bs-primary);
}

/* File Drop Zone */
.file-drop-zone {
  border: 3px dashed var(--bs-info);
  border-radius: 1rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  background-color: #f8fdff;
  transition: all 0.3s ease;
  position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  background-color: #e8f4f8;
  border-color: var(--bs-primary);
  transform: scale(1.02);
}

.file-drop-zone .drop-text {
  pointer-events: none;
}

.file-input {
  opacity: 0;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  cursor: pointer;
}

/* File Preview Grid */
#fileGrid .col-6,
#fileGrid .col-md-4,
#fileGrid .col-lg-3 {
  transition: all 0.2s ease;
}

#fileGrid .bg-light {
  transition: all 0.2s ease;
  position: relative;
}

#fileGrid .bg-light:hover {
  background-color: #e9f7fd !important;
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

#fileGrid .remove-file {
  opacity: 0;
  transition: opacity 0.2s ease;
}

#fileGrid .bg-light:hover .remove-file {
  opacity: 1;
}

/* Buttons */
#submitBtn {
  min-width: 220px;
  font-weight: 600;
}

#submitBtn:disabled {
  background-color: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
}

#submitBtn .spinner {
  display: inline-block;
}

/* Info Card */
.info-card {
  background: linear-gradient(135deg, #f8fdff 0%, #e8f4f8 100%);
}

/* ========================== */
/* NEW: Node Input Field Styling */
/* ========================== */
#nodeNumbers {
  border: 2px solid var(--bs-info);
  background-color: #f8fdff;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

#nodeNumbers:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
  background-color: white;
}

#nodeNumbers::placeholder {
  color: var(--bs-secondary);
  opacity: 0.8;
}

/* ========================== */
/* NEW: Checkboxes for Restraints */
/* ========================== */
.form-check-inline {
  background-color: #f8fdff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bs-info);
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.form-check-inline:hover {
  background-color: #e8f4f8;
  border-color: var(--bs-primary);
  transform: translateY(-2px);
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.2);
}

/* ========================== */
/* RESULT CARD – Enhanced */
/* ========================== */
/* Force result visibility & prevent collapse */
#resultCard {
    min-height: 450px !important;          /* Ensures card doesn't collapse */
    opacity: 1 !important;                 /* Override any fade */
    transition: none !important;           /* Remove transition delay for instant show */
}

#resultCard .card-body {
    min-height: 400px;
}

#dynamicResults {
    min-height: 350px !important;          /* Critical: gives space for tables */
    padding: 1.5rem 0;
    background-color: #ffffff;             /* Clean white background - easier to read */
    border-radius: 0.5rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* subtle inner shadow */
}

/* Better contrast for tables inside dynamic area */
#dynamicResults .table {
    background-color: white;
}

#dynamicResults .table-light {
    background-color: #f1f8ff !important;  /* slightly stronger than before */
}

/* Remove animation that might cause issues */
@keyframes pulse-danger {
    0%, 100% { background-color: rgba(220, 53, 69, 0.08); }
    50%      { background-color: rgba(220, 53, 69, 0.18); }
}

/* Dynamic table enhancements */
.table th {
  font-weight: 600;
  color: var(--bs-primary);
  font-size: 0.9rem;
  /*text-transform: uppercase;*/
  letter-spacing: 0.5px;
}

.table td {
  font-size: 0.95rem;
  vertical-align: middle;
}

.table-danger {
  animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
  0%, 100% { background-color: rgba(220, 53, 69, 0.1); }
  50% { background-color: rgba(220, 53, 69, 0.25); }
}

/* ========================== */
/* Responsive Adjustments */
/* ========================== */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  
  .upload-card .card-body {
    padding: 2rem 1.5rem;
  }
  
  .file-drop-zone {
    padding: 2rem 1rem;
  }

  .form-check-inline {
    display: block;
    width: 100%;
    margin-right: 0;
    text-align: center;
  }

  #nodeNumbers {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .form-check-inline {
    padding: 0.6rem 0.8rem;
  }
  
  #fileGrid .col-6 {
    width: 50%;
  }
}

/* Smooth reveal for result card */
#resultCard {
  transition: all 0.4s ease;
}
/* FIX: Full placeholder visibility for Node Numbers field */
#nodeNumbers {
  border: 2px solid var(--bs-info);
  background-color: #f8fdff;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  padding-right: 1rem;              /* Extra room on the right */
  background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><text x='0' y='13' font-family='Courier New, monospace' font-size='11' fill='%23666'>⋯</text></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

#nodeNumbers:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
  background-color: white;
  background-image: none !important;   /* Hide ellipsis when typing */
}

#nodeNumbers::placeholder {
  color: var(--bs-secondary);
  opacity: 0.85;
  font-size: 0.95rem;                  /* Slightly smaller but still readable */
  white-space: nowrap;
  overflow: visible;
}

#nodeNumbers::-webkit-input-placeholder { line-height: normal; }  /* Safari fix */
#nodeNumbers::-moz-placeholder { line-height: normal; opacity: 0.85; }     /* Firefox */