.calc-header {
  padding-block: 1.2rem;
  background: var(--color-bg-top);
  border-bottom: 1px solid var(--color-border-subtle);
}

.calc-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-header__back {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.calc-header__back:hover {
  color: var(--color-primary);
}

.calc-header__logo img {
  height: 40px;
}

.market-warning {
  background: #2a2208;
  color: #ffda6a;
  font-size: 0.85rem;
  padding-block: 0.6rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 183, 3, 0.2);
}

.market-warning i {
  margin-right: 0.4rem;
}

.section--kalkulator {
  min-height: 100vh;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
  align-items: start;
}

.calc-group {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-group:last-child {
  border-bottom: none;
}

.calc-group__title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.custom-area-wrapper {
  display: none;
  margin-top: 1.2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-area-wrapper .calc-input-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.calc-input--number {
  width: 100%;
  background: var(--color-surface-soft);
  border: 2px solid var(--color-border-subtle);
  color: var(--color-primary);
  font-size: 1.8rem;
  font-weight: 700;
  padding: 0.8rem 1rem;
  padding-right: 1rem;
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
}

.calc-input--number:focus {
  border-color: var(--color-primary);
}

.calc-unit {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-weight: 600;
}

.room-selector {
  grid-template-columns: repeat(4, 1fr);
}

.calc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.calc-option input {
  display: none;
}

.calc-option__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem;
  background: var(--color-surface-soft);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  height: 100%;
  color: var(--color-text-soft);
}

.calc-option__box i {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
}

.calc-option input:checked + .calc-option__box {
  border-color: var(--color-primary);
  background: rgba(255, 183, 3, 0.08);
  color: #fff;
}

.calc-option input:checked + .calc-option__box i {
  color: var(--color-primary);
}

.calc-option__desc {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.opt-green {
  border-color: rgba(46, 204, 113, 0.4);
  color: #2ecc71;
}
.opt-green i {
  color: #2ecc71;
}

.opt-orange {
  border-color: rgba(230, 126, 34, 0.4);
  color: #e67e22;
}
.opt-orange i {
  color: #e67e22;
}

.opt-red {
  border-color: rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}
.opt-red i {
  color: #e74c3c;
}

.calc-toggle-row {
  background: var(--color-surface-soft);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.switch-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 1rem;
}

.switch-label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
}

.switch-label i {
  color: var(--color-primary);
  flex-shrink: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #353842;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.calc-counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  background: var(--color-surface-soft);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
}

.calc-counter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-count {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #252836;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-count:hover {
  background: var(--color-primary);
  color: #000;
}

.calc-counter input {
  width: 40px;
  text-align: center;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.calc-sidebar {
  position: sticky;
  top: 2rem;
}

.calc-summary {
  padding: 1rem;
  text-align: center;
}

.calc-summary__price-box {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-block: 1rem 0.5rem;
}

.currency {
  font-size: 1.5rem;
  color: var(--color-text);
}

.btn-details {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 0.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-details:hover {
  color: var(--color-primary);
}

.price-breakdown {
  display: none;
  margin-top: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  font-size: 0.9rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.price-breakdown__row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-breakdown__row:last-child {
  border-bottom: none;
  font-weight: 600;
  color: var(--color-primary);
  padding-top: 0.8rem;
  margin-top: 0.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.calc-summary__details {
  margin-top: 1.5rem;
  text-align: left;
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
  font-size: 0.9rem;
  color: #fff;
}

.summary-list li {
  margin-bottom: 0.2rem;
}

.summary-list li small {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.calc-divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

.viewer-cta {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.viewer-cta p {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0.8rem;
}

.calc-summary__footer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.calc-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.8rem;
}

@media (max-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calc-sidebar {
    order: 2;
    position: relative;
    top: 0;
  }
}

@media (max-width: 600px) {
  .section--kalkulator {
    padding-bottom: 6rem;
  }

  .room-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-options--mobile-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem;
  }

  .calc-options--mobile-row .calc-option__box {
    padding: 0.8rem 0.2rem;
  }

  .calc-options--mobile-row .calc-option__label {
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .calc-options--mobile-row .calc-option__desc {
    display: none;
  }

  .calc-options--mobile-row i {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }
}
