/* === GLOBALA INSTÄLLNINGAR === */
:root {
  --primary-color: #333;
  --secondary-color: #f7f7f7;
  --border-color: #ddd;
  --hover-color: #f5f5f5;
  --focus-color: #0071e3;
  --text-color: #333;
  --light-text: #666;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  max-width: 800px;
  margin: 0px auto;
  padding: 10px;
  line-height: 1.4;
  color: var(--text-color);
  font-size: 16px;
  background-color: #fff;
}

body, html {
  overflow-x: hidden;
}

/* === FORMULÄRSEKTIONER === */

/* === ANPASSNINGSGRID === */
#addonsContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

#addonsContainer .checkbox-item {
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 8px;
}

#addonsContainer .checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}


form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-section {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0px;
  background-color: #fff;
}

.form-section-header {
  background: var(--secondary-color);
  padding: 12px;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-section-content {
  padding: 12px;
  position: relative;
  overflow: visible;
}

.form-group {
  margin-bottom: 10px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* === FORM-FÄLT === */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

input, select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 16px;
  font-family: inherit;
  background-color: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--focus-color);
  box-shadow: 0 0 0 3px rgba(0, 125, 250, 0.1);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

/* === TOOLTIP OCH INFO === */
.custom-tooltip {
  position: fixed;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  max-width: 300px;
  pointer-events: none;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
  display: none;
}

.custom-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.info-icon {
  margin-left: 8px;
  cursor: help;
  color: #888;
  font-size: 1.2rem;
  display: inline-flex;
}

/* === KOSTNADSVISNING === */
.cost-summary {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
  font-size: 14px;
}

.cost-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.cost-line.total {
  font-weight: bold;
  border-top: 1px solid #ccc;
  padding-top: 5px;
}

/* === GRID FÖR MÅTT === */
.input-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.input-grid .form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-grid label {
  font-size: 0.9rem;
  color: var(--light-text);
  text-align: center;
  margin-bottom: 4px; /* nytt */
}

.input-grid input {
  padding: 0.6rem;
  text-align: center;
  width: 100%;
  font-size: 1rem;
  line-height: 1;
}

.input-grid input[type="number"]::-webkit-outer-spin-button,
.input-grid input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-grid input[type="number"] {
  -moz-appearance: textfield;
}

.input-grid .wide-column {
  grid-column: span 2;
}

/* === KNAPPAR === */
button, .button-link, .nav-button {
  display: block;
  background: #333;
  color: #fff;
  text-decoration: none;
  padding: 12px;
  border-radius: 5px;
  text-align: center;
  font-size: 16px;
  border: none;
  cursor: pointer;
  margin-bottom: 10px;
  width: 100%;
  transition: background-color 0.2s;
}

button:hover,
.button-link:hover,
.nav-button:hover {
  background: #555;
}

.nav-button.secondary {
  background-color: #888;
}

.nav-button.secondary:hover {
  background-color: #555;
}

/* === POPUP-MEDDELANDE === */
.popup {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #d1f5d3;
  color: #0f5132;
  padding: 1rem 1.5rem;
  border: 1px solid #bcd0c7;
  border-radius: 12px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}


.popup-message {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #d1f5d3;
  color: #0f5132;
  padding: 1rem 1.5rem;
  border: 1px solid #bcd0c7;
  border-radius: 12px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: none;
  max-width: 90vw;
  text-align: center;
}

.hidden {
  display: none !important;
}

/* === MOBILANPASSNING === */
@media (max-width: 600px) {
  body {
    margin: 8px;
    padding: 4px;
    font-size: 14px;
	
	
  }

  .form-section-header {
    font-size: 15px;
    padding: 8px;
  }

  .form-section-content {
    padding: 8px;
  }

  .cost-summary {
    font-size: 13px;
    padding: 8px;
  }

  .button-link, button, .nav-button {
    padding: 8px;
    font-size: 14px;
  }

  input, select, textarea {
    padding: 8px;
    font-size: 14px;
  }

  .input-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .input-grid .wide-column {
    grid-column: span 2;
  }

  .custom-tooltip {
    max-width: calc(100vw - 40px);
    left: 20px !important;
    right: 20px !important;
    transform: none !important;
  }
  
  #addonsContainer {
  grid-template-columns: repeat(2, 1fr);
}
  
}


