* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

.pc-header {
  font-size: 30px;
  font-weight: 450;
  color: #111827;
  text-align: center;
  margin: 40px auto 30px;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 32px 28px;
  position: relative;
  margin-bottom: 30px;
}

.comparison-container {
  max-width: 1400px;
  min-width: 320px;
  margin: 0 auto;
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  min-height: 150px;
}

.column {
  width: 20%;
  min-width: 160px;
  border-radius: 15px;
  border: 2px dashed #d0d2d3;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.column::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.column:hover {
  border: 2px solid #d0d2d3;
}

.column:hover::before {
  transform: scaleX(0.5);
}

.pc-column-header {
  padding: 20px;
  position: relative;
  text-align: center;
}

.custom-dropdown {
  position: relative;
}

/* Selected Dropdown Option Styling */

.pc-dropdown-selected {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  padding-top: 14px;
  padding-bottom: 14px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 15px;
  font-weight: 500;

  /* Fix text overflow */

  white-space: normal !important;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 48px;
}

.pc-dropdown-selected::after {
  content: '';
  font-size: 12px;
  color: #6b7280;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.pc-dropdown-selected.active {
  color: #2e2e72;
}


.pc-dropdown-selected.active::after {
  transform: rotate(180deg);
  color: #2563eb;
}


.pc-dropdown-options {
  margin-top: 10px;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  max-width: 100%;
  background-color: #ffffff;
  border: 1px solid #ccc;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  white-space: normal !important;
  box-sizing: border-box;
  width: 100%;

}

.pc-dropdown-options[data-dropdown="pcDropdown1"],
.pc-dropdown-options[data-dropdown="pcDropdown2"],
.pc-dropdown-options[data-dropdown="pcDropdown3"],
.pc-dropdown-options[data-dropdown="pcDropdown4"] {
  left: 0;
}

.pc-dropdown-options.show {
  display: block;
  animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pc-dropdown-option {
  padding: 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  font-weight: 500;
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  white-space: normal !important;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: visible;
  max-height: 48px;
}

.pc-dropdown-option:last-child {
  border-bottom: none;
}

.pc-dropdown-option:hover:not(.disabled):not(.selected-elsewhere) {
  background-color: #3498db;
  color: #f8f4f4;
}

.pc-dropdown-option.disabled {
  color: #9ca3af;
  cursor: default;
  font-style: italic;
  background: #f9fafb;
  opacity: 0.6;
}

.pc-dropdown-option.selected-here {
  color: #000000;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  padding-left: 14px;
}

.pc-dropdown-option.selected-elsewhere {
  color: #6b7280;
  cursor: not-allowed;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  position: relative;
}

.pc-dropdown-option.selected-elsewhere:hover {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
  color: #6b7280 !important;
  transform: none !important;
  padding-left: 18px !important;
}

.pc-dropdown-option:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.checkmark {
  font-weight: bold;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  padding-left: 10px;
  animation: checkmarkPulse 0.3s ease;
}

@keyframes checkmarkPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.no-selection {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 50px 20px;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 8px;
  border: 2px dashed #d1d5db;
  position: relative;
  overflow: hidden;
}

.no-selection::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.projection-content {
  margin-top: 0;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border-left: 4px solid #2563eb;
  position: relative;
  overflow: hidden;
}

.projection-content::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30px, -30px);
}

.projection-content.hidden {
  display: none;
}

.projection-name {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.projection-name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
}

.dropdown-wrapper {
  position: relative;
  margin-bottom: 40px;
}

.error-tooltip {
  position: absolute;
  top: auto;
  bottom: calc(100% - 8px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #910707 0%, #910606 100%);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 1100;
  font-size: 12px;
  font-weight: 550;
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.4);
  animation: tooltipAppear 0.3s ease;
}

@keyframes tooltipAppear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.error-shake {
  animation: enhancedShake 0.6s ease-in-out;
}

@keyframes enhancedShake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px) scale(1.02);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(10px) scale(0.98);
  }
}

.blank-message {
  font-size: 30px;
  font-weight: 450;
  color: #111827;
  text-align: center;
  margin: 40px auto 30px;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 32px 28px;
  position: relative;
  margin-bottom: 30px;
}



.column.primary-header {
  background: linear-gradient(0deg, #f8f9fa 0%, #bbdefb 90%) !important;
}

.column.secondary-header {
  background: linear-gradient(0deg, #f8f9fa 0%, #d7faf2 100%) !important;
}

.column.selected-projection {
  border: 2px solid #d0d2d3 !important;
}



/* Allow horizontal scrolling on the full page */

body {
  overflow-x: auto;
}

/* Media queries for all responsive breakpoints */

@media (max-width: 1280px),
(max-width: 1024px),
(max-width: 768px),
(max-width: 600px) {

  .comparison-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 0 12px;
    width: 90%;
    max-width: 100%;
    min-width: 320px;
    margin: 0 auto;
  }

  .column {
    flex: 0 0 180px;
    min-width: 180px;
  }

  .pc-dropdown-selected {
    font-size: 13px;
    padding: 10px 8px;
    max-height: 44px;
    line-height: 1.2;
  }

  .pc-column-header {
    padding-top: 18px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .pc-header {
    font-size: 24px;
  }
}


.comparison-results-wrapper {
  display: flex;
  flex-wrap: nowrap;
  width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
}

.comparison-card {
  flex: 1 1 0;
  box-sizing: border-box;
  padding: 20px;
  border-radius: 5px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  max-width: 1400px;
  min-width: 320px;
  width: 90%;
}

/* vertical divider between cards */
.comparison-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background-color: #ccc;
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background-color: #ccc;
}

.compare-projection-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.comparison-section ul {
  padding-left: 20px;
  margin-left: 0;
}

.comparison-section ul li {
  list-style: none;
  position: relative;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 20px;
  padding-left: 15px;
}

.comparison-section ul li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: #000;
}


.section-subtitle {
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 20px;
}

.category-header {
  margin-top: 20px;
  margin-bottom: 20px;
  margin-left: 15px;
  font-weight: bold;
  font-size: 17px;
}

@media screen and (max-width: 1024px) {
  .comparison-results-wrapper {
    flex-wrap: wrap;
    /* Allow wrapping on smaller screens */
  }

  .comparison-card {
    width: 48%;
    min-height: auto;
    /* Let height adjust naturally on wrap */
  }
}

@media screen and (max-width: 600px) {
  .comparison-card {
    width: 100%;
    min-height: auto;
  }
}