/* ===== WATER LEAK CALCULATOR CSS ===== */

:root {
  --calc-blue-dark: #003e7a;
  --calc-blue-mid:  #336798;
  --calc-blue-light: #3974ab;
  --calc-orange:    #ff7a00; /* Real orange for clear visual highlight in calculator */
  --calc-dark:      #202021;
  --calc-gray:      #f1f8ff;
  --calc-text:      #333;
  --calc-white:     #ffffff;
  --calc-shadow:    0 10px 30px rgba(0, 62, 122, 0.08);
}

.calc-section {
  padding: 4rem 0;
  background: var(--calc-gray);
  min-height: 100vh;
}

.calc-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.calc-header {
  text-align: center;
  margin-bottom: 3rem;
}

.calc-header h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--calc-blue-dark);
  margin-bottom: 1rem;
  font-weight: 800;
}

.calc-header p {
  color: #555;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Calculator Card Grid */
.calc-card {
  background: var(--calc-white);
  border-radius: 12px;
  box-shadow: var(--calc-shadow);
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid rgba(57, 116, 171, 0.15);
}

@media (min-width: 768px) {
  .calc-card {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* Left side (Inputs) */
.calc-inputs {
  padding: 2.5rem;
  background: var(--calc-white);
  border-right: 1px solid rgba(57, 116, 171, 0.1);
}

.calc-group {
  margin-bottom: 2rem;
}

.calc-group:last-child {
  margin-bottom: 0;
}

.calc-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--calc-blue-dark);
  margin-bottom: 0.75rem;
}

.calc-select {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 6px;
  border: 2px solid rgba(57, 116, 171, 0.2);
  background: var(--calc-white);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--calc-text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.calc-select:focus {
  border-color: var(--calc-blue-light);
}

.slider-container {
  position: relative;
  padding-top: 0.5rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.slider-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.slider-value {
  font-weight: 700;
  color: var(--calc-blue-dark);
  font-size: 0.95rem;
}

.calc-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #dbeafe;
  outline: none;
  margin: 1rem 0;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--calc-blue-dark);
  cursor: pointer;
  transition: transform 0.1s;
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--calc-blue-dark);
  cursor: pointer;
  border: none;
  transition: transform 0.1s;
}

.calc-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Right side (Outputs) */
.calc-outputs {
  padding: 2.5rem;
  background: var(--calc-gray);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.results-section h3 {
  font-size: 1.2rem;
  color: var(--calc-blue-dark);
  margin-bottom: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid rgba(0, 62, 122, 0.1);
  padding-bottom: 0.5rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.result-box {
  background: var(--calc-white);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(57, 116, 171, 0.1);
  box-shadow: 0 4px 12px rgba(0, 62, 122, 0.02);
}

.result-box-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #666;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.result-numbers {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.result-gallons {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--calc-blue-dark);
  font-family: 'Montserrat', sans-serif;
}

.result-cost {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--calc-orange);
  font-family: 'Montserrat', sans-serif;
}

/* Equivalents Card */
.equiv-box {
  background: #e0f2fe;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--calc-blue-light);
}

.equiv-box h4 {
  font-size: 0.9rem;
  color: var(--calc-blue-dark);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.equiv-items {
  font-size: 0.9rem;
  color: #444;
}

.equiv-item {
  margin-bottom: 0.35rem;
}

.equiv-item:last-child {
  margin-bottom: 0;
}

.equiv-num {
  font-weight: 700;
  color: var(--calc-blue-dark);
}

/* Call to Action Inside Card */
.calc-cta {
  text-align: center;
  background: var(--calc-blue-dark);
  color: var(--calc-white);
  padding: 1.25rem;
  border-radius: 8px;
  display: block;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  transition: background 0.2s;
}

.calc-cta:hover {
  background: var(--calc-blue-mid);
}

/* Embed Code Generator Panel */
.embed-panel {
  margin-top: 3rem;
  background: var(--calc-white);
  border-radius: 12px;
  border: 1px solid rgba(57, 116, 171, 0.15);
  box-shadow: var(--calc-shadow);
  padding: 2.5rem;
}

.embed-panel h3 {
  font-size: 1.4rem;
  color: var(--calc-blue-dark);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.embed-panel p {
  color: #555;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.embed-code-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 600px) {
  .embed-code-wrapper {
    flex-direction: row;
  }
}

.embed-textarea {
  flex-grow: 1;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 1rem;
  border: 2px solid rgba(57, 116, 171, 0.2);
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  resize: none;
  height: 80px;
}

.copy-btn {
  background: var(--calc-orange);
  color: var(--calc-white);
  border: none;
  padding: 0 2rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 80px;
}

.copy-btn:hover {
  background: #e06b00;
  transform: translateY(-1px);
}

/* Standalone / Embed Styling */
body.embed-mode {
  background: transparent;
  padding: 0;
  margin: 0;
}

body.embed-mode .calc-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.embed-credit {
  text-align: center;
  font-size: 0.75rem;
  color: #777;
  margin-top: 0.75rem;
  font-family: 'Poppins', sans-serif;
}

.embed-credit a {
  color: var(--calc-blue-dark);
  text-decoration: underline;
  font-weight: 600;
}
