/**
 * PlaneShtepie.com — Construction Cost Calculator Scoped CSS
 * Prefix: .pscc-
 * Version: 2026-09
 */

:root {
  --pscc-primary: #1e3a8a;
  --pscc-primary-light: #2563eb;
  --pscc-primary-dark: #172554;
  --pscc-accent: #d97706;
  --pscc-accent-hover: #b45309;
  --pscc-success: #16a34a;
  --pscc-danger: #dc2626;
  --pscc-bg: #ffffff;
  --pscc-bg-alt: #f8fafc;
  --pscc-surface: #f1f5f9;
  --pscc-border: #e2e8f0;
  --pscc-border-active: #3b82f6;
  --pscc-text: #0f172a;
  --pscc-text-muted: #64748b;
  --pscc-radius: 12px;
  --pscc-radius-sm: 8px;
  --pscc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --pscc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --pscc-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pscc-calculator-container {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--pscc-text);
  background: var(--pscc-bg);
  border: 1px solid var(--pscc-border);
  border-radius: var(--pscc-radius);
  box-shadow: var(--pscc-shadow);
  padding: 24px;
  margin: 24px auto;
  max-width: 900px;
  line-height: 1.5;
}

.pscc-calculator-container * {
  box-sizing: border-box;
}

/* Header */
.pscc-header {
  text-align: center;
  margin-bottom: 24px;
}

.pscc-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  color: var(--pscc-success);
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.pscc-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--pscc-success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pscc-pulse 2s infinite;
}

@keyframes pscc-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

.pscc-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--pscc-text);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.pscc-subtitle {
  font-size: 15px;
  color: var(--pscc-text-muted);
  margin: 0 auto;
  max-width: 600px;
}

/* Progress Steps Navigation */
.pscc-steps-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 12px;
  background: var(--pscc-bg-alt);
  border-radius: var(--pscc-radius-sm);
  border: 1px solid var(--pscc-border);
}

.pscc-step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: var(--pscc-radius-sm);
  cursor: pointer;
  color: var(--pscc-text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: var(--pscc-transition);
}

.pscc-step-btn:hover {
  color: var(--pscc-primary);
}

.pscc-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--pscc-text);
  font-size: 12px;
}

.pscc-step-active {
  color: var(--pscc-primary);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pscc-step-active .pscc-step-num {
  background: var(--pscc-primary);
  color: #ffffff;
}

.pscc-step-line {
  width: 24px;
  height: 2px;
  background: var(--pscc-border);
}

/* Step Sections */
.pscc-step-section {
  animation: pscc-fade-in 0.25s ease-in-out;
}

.pscc-step-section[hidden] {
  display: none !important;
}

.pscc-step-section.pscc-step-visible {
  display: block !important;
}

@keyframes pscc-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pscc-section-header {
  margin-bottom: 20px;
}

.pscc-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--pscc-text);
}

.pscc-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pscc-primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.pscc-section-desc {
  font-size: 14px;
  color: var(--pscc-text-muted);
  margin: 0;
}

/* Form Groups */
.pscc-form-group {
  margin-bottom: 22px;
}

.pscc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pscc-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--pscc-text);
}

.pscc-required {
  color: var(--pscc-danger);
}

.pscc-area-input-box {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 240px;
}

.pscc-input-number {
  width: 100%;
  font-size: 22px;
  font-weight: 700;
  padding: 10px 45px 10px 16px;
  border: 2px solid var(--pscc-border);
  border-radius: var(--pscc-radius-sm);
  color: var(--pscc-text);
  outline: none;
  transition: var(--pscc-transition);
}

.pscc-input-number:focus {
  border-color: var(--pscc-border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pscc-unit {
  position: absolute;
  right: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--pscc-text-muted);
  pointer-events: none;
}

/* Quick Select Pills */
.pscc-pills-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.pscc-pills-label {
  font-size: 13px;
  color: var(--pscc-text-muted);
  font-weight: 500;
}

.pscc-pill-btn {
  background: var(--pscc-bg-alt);
  border: 1px solid var(--pscc-border);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pscc-text);
  cursor: pointer;
  transition: var(--pscc-transition);
}

.pscc-pill-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.pscc-pill-selected {
  background: var(--pscc-primary);
  color: #ffffff;
  border-color: var(--pscc-primary);
}

.pscc-pill-selected:hover {
  background: var(--pscc-primary-light);
}

/* Segmented Control for Floors */
.pscc-segmented-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.pscc-segment-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: var(--pscc-bg-alt);
  border: 2px solid var(--pscc-border);
  border-radius: var(--pscc-radius-sm);
  cursor: pointer;
  transition: var(--pscc-transition);
  text-align: center;
}

.pscc-segment-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.pscc-segment-selected {
  border-color: var(--pscc-primary);
  background: #eff6ff;
}

.pscc-segment-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.pscc-segment-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--pscc-text);
}

.pscc-segment-sub {
  font-size: 12px;
  color: var(--pscc-text-muted);
}

/* Select Box */
.pscc-select {
  width: 100%;
  max-width: 320px;
  padding: 10px 14px;
  font-size: 15px;
  border: 2px solid var(--pscc-border);
  border-radius: var(--pscc-radius-sm);
  color: var(--pscc-text);
  background-color: #ffffff;
  outline: none;
  cursor: pointer;
  transition: var(--pscc-transition);
}

.pscc-select:focus {
  border-color: var(--pscc-border-active);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pscc-input-hint {
  display: block;
  font-size: 12px;
  color: var(--pscc-text-muted);
  margin-top: 6px;
}

/* Tooltip */
.pscc-tooltip-wrap {
  position: relative;
  display: inline-block;
}

.pscc-tooltip-btn {
  background: var(--pscc-surface);
  border: 1px solid var(--pscc-border);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--pscc-text-muted);
  cursor: pointer;
}

.pscc-tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 260px;
  padding: 10px 14px;
  background: #1e293b;
  color: #ffffff;
  font-size: 12px;
  border-radius: var(--pscc-radius-sm);
  box-shadow: var(--pscc-shadow-lg);
  z-index: 50;
  pointer-events: none;
}

.pscc-tooltip-wrap:hover .pscc-tooltip-content,
.pscc-tooltip-wrap:focus-within .pscc-tooltip-content {
  display: block;
}

/* Step 2: Stage Cards Grid */
.pscc-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.pscc-stage-card {
  position: relative;
  border: 2px solid var(--pscc-border);
  border-radius: var(--pscc-radius);
  background: var(--pscc-bg);
  padding: 20px 16px;
  cursor: pointer;
  transition: var(--pscc-transition);
  display: flex;
  flex-direction: column;
}

.pscc-stage-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: var(--pscc-shadow);
}

.pscc-stage-selected {
  border-color: var(--pscc-primary);
  background: #f8faff;
  box-shadow: 0 0 0 1px var(--pscc-primary), var(--pscc-shadow);
}

.pscc-stage-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--pscc-accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.pscc-stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pscc-stage-icon {
  font-size: 24px;
}

.pscc-stage-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--pscc-text);
}

.pscc-stage-rate {
  font-size: 13px;
  font-weight: 700;
  color: var(--pscc-primary);
}

.pscc-stage-desc {
  font-size: 13px;
  color: var(--pscc-text-muted);
  margin: 0 0 14px 0;
  flex-grow: 1;
}

/* Accordion Details */
.pscc-details {
  border-top: 1px dashed var(--pscc-border);
  padding-top: 10px;
  font-size: 12px;
}

.pscc-details-summary {
  cursor: pointer;
  color: var(--pscc-primary);
  font-weight: 600;
  outline: none;
}

.pscc-details-list {
  margin: 8px 0 0 0;
  padding: 0;
  list-style: none;
  color: var(--pscc-text-muted);
}

.pscc-details-list li {
  margin-bottom: 4px;
  line-height: 1.4;
}

/* Step 3: Toggles List */
.pscc-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.pscc-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--pscc-bg-alt);
  border: 1px solid var(--pscc-border);
  border-radius: var(--pscc-radius-sm);
  cursor: pointer;
  transition: var(--pscc-transition);
}

.pscc-toggle-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.pscc-toggle-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pscc-toggle-content {
  flex-grow: 1;
}

.pscc-toggle-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.pscc-toggle-icon {
  font-size: 18px;
}

.pscc-toggle-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--pscc-text);
}

.pscc-toggle-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--pscc-accent);
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: auto;
}

.pscc-toggle-desc {
  font-size: 13px;
  color: var(--pscc-text-muted);
  margin: 0;
}

/* Custom Switch Toggle */
.pscc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  background-color: #cbd5e1;
  border-radius: 13px;
  transition: var(--pscc-transition);
  flex-shrink: 0;
}

.pscc-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: var(--pscc-transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pscc-toggle-card input[type="checkbox"]:checked + .pscc-toggle-content + .pscc-switch,
.pscc-toggle-card input[type="checkbox"]:checked ~ .pscc-switch {
  background-color: var(--pscc-success);
}

.pscc-toggle-card input[type="checkbox"]:checked ~ .pscc-switch::after {
  transform: translateX(20px);
}

/* Buttons */
.pscc-step-actions {
  display: flex;
  margin-top: 24px;
}

.pscc-step-actions-between {
  justify-content: space-between;
}

.pscc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--pscc-radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--pscc-transition);
  text-decoration: none;
}

.pscc-btn-primary {
  background: var(--pscc-primary);
  color: #ffffff;
}

.pscc-btn-primary:hover {
  background: var(--pscc-primary-light);
}

.pscc-btn-next {
  background: var(--pscc-primary);
  color: #ffffff;
  margin-left: auto;
}

.pscc-btn-next:hover {
  background: var(--pscc-primary-light);
}

.pscc-btn-back {
  background: var(--pscc-bg-alt);
  color: var(--pscc-text);
  border: 1px solid var(--pscc-border);
}

.pscc-btn-back:hover {
  background: #e2e8f0;
}

.pscc-btn-cta {
  background: var(--pscc-accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.25);
}

.pscc-btn-cta:hover {
  background: var(--pscc-accent-hover);
  transform: translateY(-1px);
}

/* Results Panel */
.pscc-results-panel {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid var(--pscc-border);
}

.pscc-results-main {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 28px 24px;
  border-radius: var(--pscc-radius);
  text-align: center;
  box-shadow: var(--pscc-shadow-lg);
  margin-bottom: 24px;
}

.pscc-results-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.pscc-results-range {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.1;
}

.pscc-results-typical {
  font-size: 17px;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.pscc-results-typical strong {
  color: #38bdf8;
  font-size: 19px;
}

.pscc-results-summary-text {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
}

/* Breakdown Bars */
.pscc-breakdown-card {
  background: var(--pscc-bg-alt);
  border: 1px solid var(--pscc-border);
  border-radius: var(--pscc-radius);
  padding: 20px;
  margin-bottom: 24px;
}

.pscc-breakdown-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--pscc-text);
}

.pscc-breakdown-item {
  margin-bottom: 14px;
}

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

.pscc-breakdown-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.pscc-breakdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--pscc-text);
}

.pscc-breakdown-val {
  color: var(--pscc-text-muted);
}

.pscc-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.pscc-bar-fill {
  height: 100%;
  background: var(--pscc-primary);
  border-radius: 9999px;
  transition: width 0.4s ease-out;
}

/* Inclusions / Exclusions Matrix */
.pscc-matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.pscc-matrix-col {
  padding: 18px;
  border-radius: var(--pscc-radius-sm);
  border: 1px solid;
}

.pscc-matrix-in {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.pscc-matrix-out {
  background: #fef2f2;
  border-color: #fecaca;
}

.pscc-matrix-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.pscc-matrix-in .pscc-matrix-title {
  color: var(--pscc-success);
}

.pscc-matrix-out .pscc-matrix-title {
  color: var(--pscc-danger);
}

.pscc-matrix-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #334155;
}

.pscc-matrix-list li {
  margin-bottom: 6px;
  line-height: 1.4;
}

/* Disclaimer */
.pscc-disclaimer {
  background: #f8fafc;
  border-left: 4px solid #64748b;
  padding: 12px 16px;
  border-radius: 0 var(--pscc-radius-sm) var(--pscc-radius-sm) 0;
  margin-bottom: 24px;
}

.pscc-disclaimer p {
  margin: 0;
  font-size: 12px;
  color: var(--pscc-text-muted);
  line-height: 1.5;
}

/* Quick CTA Bar */
.pscc-quick-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--pscc-radius-sm);
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #166534;
  font-weight: 500;
}

.pscc-link-cta {
  color: #15803d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--pscc-transition);
}

.pscc-link-cta:hover {
  color: #166534;
}

/* CTA Card */
.pscc-cta-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 2px solid #bfdbfe;
  border-radius: var(--pscc-radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.pscc-cta-badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.pscc-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.pscc-cta-secondary-link {
  font-size: 12px;
  color: var(--pscc-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: var(--pscc-transition);
}

.pscc-cta-secondary-link:hover {
  color: var(--pscc-primary-dark);
}

.pscc-cta-heading {
  font-size: 19px;
  font-weight: 800;
  color: var(--pscc-primary-dark);
  margin: 0 0 6px 0;
}

.pscc-cta-subheading {
  font-size: 14px;
  color: var(--pscc-text-muted);
  margin: 0;
}

/* Dynamic Sticky Lead Banner */
.pscc-form-lead-banner {
  background: #1e3a8a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--pscc-radius-sm);
  margin: 20px 0;
  box-shadow: var(--pscc-shadow);
  animation: pscc-fade-in 0.3s ease-out;
}

.pscc-lead-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.pscc-lead-banner-icon {
  font-size: 20px;
}

/* Noscript Fallback */
.pscc-noscript-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 18px;
  border-radius: var(--pscc-radius-sm);
  margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .pscc-calculator-container {
    padding: 16px;
    margin: 12px auto;
  }

  .pscc-title {
    font-size: 22px;
  }

  .pscc-cards-grid {
    grid-template-columns: 1fr;
  }

  .pscc-matrix-grid {
    grid-template-columns: 1fr;
  }

  .pscc-cta-card {
    flex-direction: column;
    text-align: center;
  }

  .pscc-cta-actions {
    align-items: center;
    width: 100%;
  }

  .pscc-quick-cta-bar {
    text-align: center;
    justify-content: center;
  }

  .pscc-btn-cta {
    width: 100%;
    justify-content: center;
  }

  .pscc-results-range {
    font-size: 28px;
  }

  .pscc-step-btn .pscc-step-text {
    display: none;
  }

  .pscc-step-btn {
    padding: 6px 10px;
  }
}
