/* Main styles for the Transfusion Calculator */
:root {
  --primary-dark: #2D5016;
  --primary-brown: #4A7C59;
  --primary-light: #6B9080;
  --hover-color: #f6f7fa;
  --text-dark: #333;
  --text-light: #666;
}

/* Disclaimer Modal Styles */
.disclaimer-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.disclaimer-content {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 600px;
  margin: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 3px solid #dc2626;
}

.disclaimer-title {
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-align: center;
}

.disclaimer-text {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.disclaimer-text p {
  margin-bottom: 0.75rem;
}

.disclaimer-text strong {
  color: #dc2626;
}

.disclaimer-checkbox {
  margin-bottom: 1.5rem;
}

.disclaimer-checkbox label {
  display: flex;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
}

.disclaimer-checkbox input[type="checkbox"] {
  margin-right: 0.5rem;
  transform: scale(1.2);
}

.disclaimer-button {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.disclaimer-button:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

.disclaimer-button:not(:disabled):hover {
  background-color: var(--primary-brown);
}

body {
  background: #f8fafc;
  font-family: 'Inter', sans-serif;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  width: 100%;
  position: relative;
  flex-wrap: wrap;
}

.section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  max-height: 4rem;
  transition: all 0.3s ease-out;
  margin-bottom: 1.5rem;
}

.section:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.section.expanded {
  max-height: 1000px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.navigation-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tab-navigation {
  display: inline-flex;
  background-color: transparent;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin: 0 auto;
}

.tab-link {
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
  color: var(--text-light);
  white-space: nowrap;
  flex: 1;
  min-width: 80px;
}

.tab-link:focus {
  outline: none;
}

.tab-link:hover:not(.active) {
  color: var(--primary-dark);
}

.tab-link.active {
  background-color: white;
  color: var(--primary-light);
  border-bottom: 2px solid var(--primary-light);
}


/* Improved section title styling */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-brown);
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--primary-brown);
}

/* Style for the title element */
.title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-dark);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.iss-grid {
  gap: 1rem;
}

.iss-grid > div {
  margin-bottom: 0.5rem;
}

/* Form elements */
.section-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .section-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .section-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .section-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.input-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  color: var(--text-dark);
}

.input-field, .input-select {
  margin-top: 0.5rem;
  padding: 0.75rem;
  height: 3rem;
  min-height: 3rem;
  max-height: 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  width: 100%;
  background: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  line-height: 1.2;
}

/* Ensure select elements have the same height */
.input-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.input-field:focus, .input-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(107, 144, 128, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.input-field:hover, .input-select:hover {
  border-color: var(--primary-brown);
}


/* Submit button */
button.submit-btn {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-brown) 100%);
  color: #fff;
  font-weight: 600;
  padding: 1rem 3rem;
  border-radius: 12px;
  border: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
  cursor: pointer;
}

.submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-brown) 0%, var(--primary-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(45, 80, 22, 0.4);
}

/* Results section */
.results-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.results-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 1rem;
  text-align: center; /* Center the title */
}

.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Adjusted result-item styling for smaller boxes */
.result-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 0.5rem; /* Reduced padding */
  flex: 1 1 calc(20% - 0.5rem); /* Smaller width for compact layout */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  font-size: 0.85rem; /* Smaller font size */
  max-width: 200px; /* Limit the width */
  margin: 0 auto; /* Center the boxes */
}

.results-main {
  background: #e6f7ff; /* Light blue background for emphasis */
  border: 1px solid #91d5ff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: #0050b3;
  text-align: center;
  max-width: 600px; /* Limit the width */
  margin: 0 auto; /* Center the box */
}



/* Form actions */
.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.1rem; /* Move buttons closer to the top */
  }


.selected-value{
font-size: small;
}

/* Select2 specific styles */
.select2-container {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}


.select2-container--default .select2-selection--multiple {
  min-height: 3rem !important;
  padding: 0.5rem !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  transition: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--primary-light) !important;
  border: 1px solid var(--primary-light) !important;
  border-radius: 4px !important;
  color: white !important;
  font-size: 0.8rem !important;
  padding-left: 20px !important;
  margin: 0.1rem !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: white !important;
  border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
  font-size: 0.9rem !important;
  display: flex !important;
  align-items: center !important;
}

.select2-dropdown {
  border: 2px solid var(--primary-light) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  max-height: 200px !important;
  overflow: hidden !important;
}

.select2-results {
  max-height: 180px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.select2-results__options {
  max-height: none !important;
  overflow: visible !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--primary-light) !important;
  color: white !important;
}
.select2-selection__clear {
  display: none !important;
}

/* Responsive navigation */
@media (max-width: 1100px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  .navigation-container {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
  }
}

/* Media query for even smaller screens */
@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .navigation-container {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    overflow-x: auto;
  }

  .tab-navigation {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    overflow-x: auto;
    gap: 0.25rem;
    scrollbar-width: none;
  }

  .tab-navigation::-webkit-scrollbar {
    display: none;
  }

  .tab-link {
    flex: 1 1 auto;
    min-width: 100px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    border-bottom: none;
  }
}

.section-grid {
  grid-template-columns: 1fr;  /* eine Spalte */
}
@media (min-width: 640px) {
  .section-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.section-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-brown) 0%, var(--primary-dark) 100%);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.section-header:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-brown) 100%);
}

.section-content {
  padding: 1.5rem;
  background: #ffffff;
}

.navigation-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.navigation-buttons button {
  background: var(--primary-light);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navigation-buttons button:hover {
  background: var(--primary-dark);
  transform: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.toggle-icon {
  font-size: 1.5rem;
  color: white;
  font-weight: bold;
}

.section.expanded .toggle-icon::after {
  content: "-"; /* Show minus when expanded */
}

.section:not(.expanded) .toggle-icon::after {
  content: "+"; /* Show plus when collapsed */
}