/* src/index.css (KOMPLETT OCH UPPDATERAD KOD) */
html, body, #root {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f0f0f0;
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

.main-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.scene-container {
  flex: 1;
  position: relative;
  min-height: 0;
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 24px 0 24px;
  background-color: #f0f2f5;
  border-bottom: 1px solid #dcdcdc;
  flex-shrink: 0;
  gap: 20px;
}

.config-tabs-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  flex-grow: 1;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tab {
  padding: 10px 15px;
  background-color: #fff;
  border: 1px solid #dcdcdc;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  position: relative;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab.active {
  background-color: #ffffff;
  color: #0f604d;
  font-weight: 600;
  z-index: 2;
  border-color: #dcdcdc;
}

.remove-tab-btn {
  border: none;
  background: #e4e6eb;
  color: #606770;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.remove-tab-btn:hover {
  background: #d8dade;
}

.add-tab-btn {
  padding: 8px 15px;
  border: 1px dashed #a0a0a0;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: #606770;
}
.add-tab-btn:hover {
  background: #e4e6eb;
  border-style: solid;
}

.reset-all-btn {
  padding: 8px 15px;
  background: none;
  border: 1px solid transparent;
  color: #c23b22;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}
.reset-all-btn:hover {
    background: #fff0f0;
    border-color: #f5c5c5;
}

.quote-cart-wrapper {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 280px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    z-index: 200;
    flex-shrink: 0;
}

.quote-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
}

.quote-cart-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f604d;
}

.quote-cart-toggle-icon {
    font-size: 12px;
    color: #555;
}

.quote-cart-wrapper.open .quote-cart-header {
    border-bottom: 1px solid #eeeeee;
}

.quote-cart-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quote-cart-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quote-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.item-name {
  font-weight: 500;
}
.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quantity-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background-color: #f7f7f7;
  color: #333;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.quantity-btn:hover {
  background-color: #e0e0e0;
}
.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.quantity-display {
  font-size: 16px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}
.item-unit {
  font-size: 14px;
  color: #555;
}

.configurator-panel {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 20px 24px;
  background-color: #ffffff;
  border-top: 1px solid #dcdcdc;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
  gap: 24px;
}

.controls-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.control-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-group label {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.config-group select {
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.config-group input[type="range"] {
  width: 180px;
  margin-top: 4px;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: #ddd;
  outline: none;
}

.range-label {
  display: flex;
  justify-content: space-between;
  width: 180px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #0f604d;
  cursor: pointer;
  border-radius: 50%;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #0f604d;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

.accessories-group {
  gap: 8px;
}

.accessory-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accessory-item label {
  font-weight: normal;
  font-size: 14px;
  cursor: pointer;
}

.accessory-item input {
  cursor: pointer;
}

.toggle-group button {
  padding: 8px 16px;
  border: 1px solid #ccc;
  background-color: #f7f7f7;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  flex: 1;
}

.toggle-group {
  display: flex;
  min-width: 180px;
}

.toggle-group button:first-of-type {
  border-radius: 6px 0 0 6px;
}
.toggle-group button:last-of-type {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.toggle-group .active {
  background-color: #0f604d;
  color: white;
  border-color: #0f604d;
}

.actions-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding-left: 24px;
  border-left: 1px solid #e0e0e0;
}

.summary-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.summary-panel li {
  color: #555;
  margin-bottom: 4px;
}

.summary-panel strong {
  color: #111;
  min-width: 80px;
  display: inline-block;
}

.pdf-button {
  padding: 12px 24px;
  background: #0f604d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}
.pdf-button:hover {
  background-color: #0b4537;
}

.mixed-section-builder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #e0e0e0;
  padding: 12px;
  border-radius: 6px;
  background-color: #f9f9f9;
}

.mixed-section-builder > label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.add-section-controls {
  display: flex;
  gap: 8px;
}

.add-section-controls select {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.add-section-controls button {
  padding: 8px 16px;
  background-color: #0f604d;
  color: white;
  borde

.drawing-2d-container {
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    overflow: hidden;
    cursor: grab;
    position: relative;
}

.drawing-2d-content {
    position: relative;
    transform-origin: top left;
    will-change: transform;
    /* Inga fasta mått här, styrs av barnen */
}

.gavel-2d {
    position: absolute;
    background-color: #adb5bd;
    bottom: 0;
}

.beam-2d {
    position: absolute;
    background-color: #f7b731;
    border: 1px solid #e2a62b;
    box-sizing: border-box;
}

.dimension-line {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #343a40;
    font-size: 14px; /* Pixlar fungerar bättre här */
    font-weight: 500;
}
.dimension-line.horizontal {
    height: 1px;
    background-color: #343a40;
    left: 0;
}
.dimension-line.horizontal span {
    transform: translateY(-20px);
}

.dimension-line.vertical {
    width: 1px;
    background-color: #343a40;
    top: 0;
}
.dimension-line.vertical span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg) translateX(20px);
}

.dimension-line::before,
.dimension-line::after {
    content: '';
    position: absolute;
    background-color: #343a40;
}
.dimension-line.horizontal::before { left: 0; top: -5px; height: 11px; width: 1px; }
.dimension-line.horizontal::after { right: 0; top: -5px; height: 11px; width: 1px; }
.dimension-line.vertical::before { top: 0; left: -5px; width: 11px; height: 1px; }
.dimension-line.vertical::after { bottom: 0; left: -5px; width: 11px; height: 1px; }