/* Codeable Cost Estimate Calculator - Modern UI */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  width: 800px;
  min-height: 600px;
  color: #1a1a1a;
  background: white;
  overflow-x: hidden;
}

.calculator-container {
  background: white;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  overflow-x: hidden;
  max-width: 100%;
}

h1 {
  font-size: 22px;
  text-align: center;
  margin: 0 0 28px 0;
  color: #1a1a1a;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 15px;
  margin: 0 0 10px 0;
  color: #4a5568;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.row {
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  max-width: 100%;
  max-width: 786px;
}

.row:last-child {
  margin-bottom: 0;
}

.input-section {
  flex: 1;
  min-width: 200px;
  max-width: 100%;
}

.full-width-section {
  width: 100%;
}

.input-group {
  display: flex;
  align-items: center;
  background-color: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  height: 48px;
  transition: all 0.2s ease;
  max-width: 100%;
}

.input-group:hover {
  border-color: #cbd5e0;
}

.input-group:focus-within {
  border-color: #165260;
  box-shadow: 0 0 0 3px rgba(22, 82, 96, 0.1);
}

.input-prefix, .input-suffix {
  padding: 0 14px;
  background-color: #edf2f7;
  color: #4a5568;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  border: none;
}

input {
  flex: 1;
  padding: 0 14px;
  border: none;
  background-color: transparent;
  font-size: 15px;
  height: 100%;
  color: #1a1a1a;
  font-weight: 500;
  min-width: 0;
  max-width: 100%;
}

input:focus {
  outline: none;
}

input::placeholder {
  color: #a0aec0;
}

.note {
  font-size: 12px;
  color: #718096;
  margin: 8px 0 0 0;
  font-style: italic;
}

.toggle-container {
  margin: 0 14px;
}

.toggle-client-container {
  display: flex;
  align-items: center;
  background-color: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  height: auto;
  min-height: 48px;
}

.client-type-label {
  margin-left: 14px;
  color: #4a5568;
  font-size: 15px;
  font-weight: 500;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: 0.3s ease;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: #165260;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Disabled state */
.input-group.disabled {
  opacity: 0.6;
  background-color: #f1f5f9;
}

.input-group.disabled input {
  color: #94a3b8;
}

.display-section {
  flex: 1;
}

.half-width {
  flex-basis: calc(50% - 9px);
}

.third-width {
  flex-basis: calc(33.333% - 12px);
}

.result-box {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 15px 12px;
  height: auto;
  min-height: 41px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #2d3748;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.result-box:hover {
  border-color: #cbd5e0;
  transform: translateY(-1px);
}

.large-result {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  min-height: 48px;
  position: relative;
}

.copy-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: #718096;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background-color: rgba(22, 82, 96, 0.1);
  color: #165260;
}

.copy-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.copy-btn.copied {
  color: #38a169;
  background-color: rgba(56, 161, 105, 0.1);
}

.copy-instruction {
  font-size: 11px;
  color: #718096;
  margin: 6px 0 0 0;
  text-align: center;
  font-style: italic;
  line-height: 1.3;
}

.edit-note {
  font-size: 13px;
  color: #718096;
  margin: 20px 0 0 0;
  text-align: center;
  font-style: italic;
}

/* Error message styling */
.error-message {
  background-color: #fed7d7;
  color: #c53030;
  padding: 14px;
  border-radius: 8px;
  margin-top: 18px;
  font-size: 14px;
  border: 1px solid #feb2b2;
}

/* Animation for results */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-box {
  animation: fadeIn 0.3s ease-out;
}
