/* static/css/civil/mohrs-circle-calculator.css */

.mohr-visualization-container,
.element-visualization-container {
  height: 350px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #e9ecef;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
}

.tips-list {
  font-size: 0.9rem;
  padding-left: 20px;
  margin-bottom: 0;
}

.tips-list li {
  margin-bottom: 10px;
  color: #495057;
  line-height: 1.4;
}

.chart-container {
  height: 250px;
  position: relative;
}

.advanced-options {
  transition: all 0.3s ease;
  border-top: 1px solid #e9ecef;
  padding-top: 1rem;
}

.advanced-toggle {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.advanced-toggle:hover {
  color: #0b5ed7 !important;
}

.advanced-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.advanced-content.show {
  max-height: 600px;
}

.calculation-note {
  font-size: 0.85rem;
  color: #6c757d;
  background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid #0d6efd;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  border-radius: 0 8px 8px 0;
}

.result-highlight {
  background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid #0dcaf0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Animation keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.8s ease forwards;
}
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.3s; }
.fade-in:nth-child(3) { animation-delay: 0.5s; }

/* Responsive design improvements */
@media (max-width: 768px) {
  .mohr-visualization-container,
  .element-visualization-container {
    height: 250px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .advanced-content.show {
    max-height: 800px;
  }
}

@media (max-width: 576px) {
  .mohr-visualization-container,
  .element-visualization-container {
    height: 200px;
  }
  
  .result-highlight {
    padding: 1rem;
  }
  
  .btn-group .btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
  }
}

/* Form range customization */
.form-range::-webkit-slider-thumb {
  background: #0d6efd;
}

.form-range::-moz-range-thumb {
  background: #0d6efd;
}

.form-range::-ms-thumb {
  background: #0d6efd;
}

/* Badge styles for safety status */
.badge.bg-success {
  background-color: #198754 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #000;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

/* Engineering guide styles */
.engineering-guide {
  line-height: 1.7;
  color: #333;
}

.engineering-guide h2 {
  color: #2c3e50;
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.engineering-guide h3 {
  color: #2980b9;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.engineering-guide h4 {
  color: #16a085;
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

.engineering-guide p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.lead {
  font-size: 1.2rem;
  font-weight: 400;
  color: #2c3e50;
}

/* Alert/Pro Tip Box */
.alert {
  border-radius: 6px;
  padding: 1.25rem;
}

.alert-info {
  background-color: #e1f5fe;
  border-color: #b3e5fc;
  color: #0277bd;
}

.alert-heading {
  color: #01579b;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Accordion FAQ Styles */
.accordion {
  margin-bottom: 2rem;
}

.accordion-button {
  font-weight: 500;
  color: #2c3e50;
  background-color: #f8f9fa;
}

.accordion-button:not(.collapsed) {
  color: #e74c3c;
  background-color: #f8f9fa;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0,0,0,.125);
}

.accordion-body {
  padding: 1.25rem;
  background-color: #f8f9fa;
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}
/* Add to static/css/civil/mohrs-circle-calculator.css */

/* PDF Export Notification */
.pdf-export-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
}

.pdf-export-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* CSV Export Notification */
.csv-export-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
}

.csv-export-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Modal styles for CSV preview */
.modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.modal-title {
  font-weight: 600;
  color: #2c3e50;
}

.modal-body pre {
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}


/* Add to static/css/civil/mohrs-circle-calculator.css */

/* Visualization containers */
.mohr-visualization-container,
.element-visualization-container {
  height: 400px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  margin-bottom: 1rem;
}

/* Canvas styling */
.mohr-visualization-container canvas,
.element-visualization-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Control buttons styling */
.visualization-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.visualization-controls .btn {
  font-size: 0.8rem;
  padding: 0.375rem 0.75rem;
}

.visualization-controls .btn-group {
  margin: 0 0.25rem;
}

/* Zoom indicator */
.zoom-indicator {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mohr-visualization-container,
  .element-visualization-container {
    height: 300px;
  }
  
  .visualization-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .visualization-controls .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .mohr-visualization-container,
  .element-visualization-container {
    height: 250px;
  }
}

/* Add to static/css/civil/mohrs-circle-calculator.css */

/* Ensure charts have white background for export */
.chart-container {
    background-color: white;
    border-radius: 8px;
    padding: 10px;
}

/* Ensure canvases have proper dimensions for export */
#canvasMohr, #canvasTransform {
    width: 100% !important;
    height: 100% !important;
}

/* Style for PDF export notification */
.pdf-export-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
}

.pdf-export-notification.show {
    opacity: 1;
    transform: translateY(0);
}