/* ==========================================================================
   RATE CARD CALCULATOR STYLES — LUXURY UI/UX EDITION
   Haryana Decor / Moscow Decor - Dark Luxury Building Materials Est.
   ========================================================================== */

/* Main Container & Base Page Layout */
.calc-page-section {
  padding-top: 130px;
  padding-bottom: 90px;
  max-width: 1320px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.calc-grid-layout {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 36px;
  align-items: start;
  margin-top: 28px;
}

/* Hero Header */
.calc-hero-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px auto;
}

.calc-hero-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: linear-gradient(135deg, rgba(200, 161, 71, 0.15), rgba(200, 161, 71, 0.05));
  border: 1px solid rgba(200, 161, 71, 0.35);
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.calc-hero-header h1 {
  font-size: 2.6rem;
  color: var(--text-main);
  margin-bottom: 14px;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(180deg, #FFFFFF 0%, #D1D5DB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.calc-hero-header p {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

/* Glassmorphism Panel Container */
.calc-card-panel {
  background: linear-gradient(145deg, rgba(24, 28, 40, 0.85), rgba(15, 18, 26, 0.95));
  border: 1px solid rgba(200, 161, 71, 0.25);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  transition: border-color 0.3s ease;
}

/* Step Section Blocks */
.calc-step-block {
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-step-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.calc-step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.calc-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C8A147 0%, #9E7B2F 100%);
  color: #121620;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(200, 161, 71, 0.4);
  flex-shrink: 0;
}

.calc-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: 0.3px;
}

/* Option Cards (Step 1 Project & Step 3 Installation) */
.calc-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.calc-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: rgba(12, 15, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  text-align: center;
  user-select: none;
}

.calc-option-card:hover {
  border-color: rgba(200, 161, 71, 0.6);
  background: rgba(200, 161, 71, 0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.calc-option-card.selected {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, rgba(200, 161, 71, 0.2), rgba(200, 161, 71, 0.05));
  box-shadow: 0 0 20px rgba(200, 161, 71, 0.25);
}

.calc-option-card.selected::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.calc-option-title {
  font-weight: 700;
  font-size: 1.02rem;
}

.calc-option-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Stepper Input Fields & Row Layout */
.calc-input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.calc-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Custom Number Stepper Control */
.calc-stepper-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.calc-stepper-wrapper:focus-within {
  border-color: var(--gold-primary);
}

.calc-stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--gold-primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.calc-stepper-btn:hover {
  background: rgba(200, 161, 71, 0.2);
}

.calc-field-input-stepped {
  flex: 1;
  width: 100%;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text-main);
  text-align: center;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
}

.calc-field-input-stepped:focus {
  outline: none;
}

.calc-helper-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.45;
}

/* Ceiling Elevation & Drop Graphical Pill */
.calc-elevation-graphic-card {
  background: rgba(12, 15, 23, 0.8);
  border: 1px dashed rgba(200, 161, 71, 0.4);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calc-elevation-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-elevation-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.calc-elevation-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.calc-elevation-val.highlight-drop {
  color: var(--gold-primary);
}

/* Interactive Blueprint Floorplan Visualiser */
.calc-floorplan-container {
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid rgba(200, 161, 71, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.calc-floorplan-title {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 14px;
}

.calc-blueprint-svg-wrapper {
  max-width: 320px;
  margin: 0 auto;
}

.calc-blueprint-wall-line {
  cursor: pointer;
  transition: all 0.25s ease;
  stroke: rgba(255, 255, 255, 0.2);
}

.calc-blueprint-wall-line:hover,
.calc-blueprint-wall-line.active {
  stroke: var(--gold-primary);
  stroke-width: 6;
  filter: drop-shadow(0 0 8px rgba(200, 161, 71, 0.6));
}

/* Visual Wall Card Item */
.calc-visual-wall-card {
  background: rgba(12, 15, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-visual-wall-card:hover {
  border-color: rgba(200, 161, 71, 0.4);
}

.calc-visual-wall-card.feature-wall-active {
  border-color: var(--border-gold);
  background: linear-gradient(145deg, rgba(24, 27, 36, 0.9), rgba(18, 22, 32, 0.8));
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.calc-wall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.calc-wall-name {
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--text-main);
}

.calc-wall-width-badge {
  font-size: 0.82rem;
  color: var(--gold-primary);
  background: rgba(200, 161, 71, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  border: 1px solid rgba(200, 161, 71, 0.3);
}

.calc-wall-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.calc-tab-btn {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.calc-tab-btn.active {
  background: linear-gradient(135deg, rgba(200, 161, 71, 0.25), rgba(200, 161, 71, 0.1));
  border-color: var(--gold-primary);
  color: var(--text-main);
  font-weight: 700;
}

/* Rich Texture Material Cards */
.calc-mat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.calc-mat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.calc-mat-card-icon {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}

.calc-mat-card:hover {
  border-color: var(--border-gold);
  color: var(--text-main);
}

.calc-mat-card.selected {
  border-color: var(--gold-primary);
  background: rgba(200, 161, 71, 0.18);
  color: var(--gold-primary);
}

.calc-mat-card.selected .calc-mat-card-icon {
  opacity: 1;
}

/* Variant Pills */
.calc-variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.calc-variant-pill {
  font-size: 0.82rem;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.calc-variant-pill:hover {
  border-color: rgba(200, 161, 71, 0.4);
  color: var(--text-main);
}

.calc-variant-pill.selected {
  background: var(--gold-primary);
  color: #121620;
  border-color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(200, 161, 71, 0.4);
}

/* Feature Wall Container Box */
.calc-feature-box {
  background: rgba(8, 10, 16, 0.6);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 12px;
}

.calc-feature-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--gold-primary);
  margin-top: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  background: rgba(200, 161, 71, 0.1);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Ceiling Toggle Block */
.calc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: rgba(12, 15, 23, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.calc-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.calc-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.calc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.12);
  transition: .3s;
  border-radius: 28px;
  border: 1px solid var(--border-subtle);
}

.calc-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-main);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .calc-toggle-slider {
  background-color: var(--gold-primary);
}

input:checked + .calc-toggle-slider:before {
  transform: translateX(22px);
  background-color: #121620;
}

/* Validation Alert Banner */
.calc-validation-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-top: 12px;
}

/* Sticky Estimate Summary Sidebar */
.calc-summary-sidebar {
  position: sticky;
  top: 100px;
  background: linear-gradient(155deg, rgba(22, 26, 38, 0.95), rgba(12, 15, 22, 0.98));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.calc-summary-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(200, 161, 71, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-summary-section-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 10px;
  font-weight: 700;
}

.calc-summary-items-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
}

.calc-summary-items-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-main);
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.calc-summary-items-list li span.qty {
  font-weight: 700;
  color: var(--gold-primary);
  background: rgba(200, 161, 71, 0.12);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.calc-summary-totals {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 20px;
}

.calc-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.94rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.calc-total-row.grand-total {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-gold);
}

.calc-total-row.grand-total span.amt {
  color: var(--gold-primary);
}

.calc-approx-badge {
  font-size: 0.72rem;
  color: var(--gold-primary);
  background: rgba(200, 161, 71, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

/* Mandatory Disclaimer Box */
.calc-disclaimer-box {
  background: rgba(200, 161, 71, 0.06);
  border: 1px solid rgba(200, 161, 71, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 18px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.calc-disclaimer-title {
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Primary CTA Button with Gold Shimmer */
.calc-btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #121620;
  background: linear-gradient(135deg, #F4D179 0%, #C8A147 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(200, 161, 71, 0.35);
  text-decoration: none;
}

.calc-btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200, 161, 71, 0.5);
  background: linear-gradient(135deg, #FFFFFF 0%, #F4D179 100%);
}

/* Loading Spinner Overlay */
.calc-loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 26, 0.75);
  border-radius: var(--radius-lg);
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.calc-loading-overlay.active {
  display: flex;
}

.calc-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(200, 161, 71, 0.2);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Behavior — Desktop / PC Layout (>1024px) remains completely untouched */
@media (max-width: 1024px) {
  .calc-grid-layout {
    grid-template-columns: 1fr;
  }

  .calc-summary-sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 768px) {
  .calc-page-section {
    padding-top: 96px;
    padding-bottom: 60px;
    padding-left: 18px;
    padding-right: 18px;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .calc-hero-header h1 {
    font-size: 2rem;
  }

  .calc-hero-header p {
    font-size: 0.95rem;
  }

  .calc-card-panel {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: none !important;
  }

  .calc-summary-sidebar {
    padding: 24px 18px;
    border-radius: var(--radius-md);
    margin-top: 24px;
  }

  .calc-step-header {
    gap: 10px;
  }

  .calc-step-title {
    font-size: 1.12rem;
  }

  .calc-input-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .calc-stepper-btn {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }

  .calc-field-input-stepped {
    height: 46px;
    font-size: 1.05rem;
  }

  .calc-elevation-graphic-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .calc-elevation-val {
    font-size: 1.05rem;
  }

  .calc-mat-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 8px;
  }

  .calc-mat-card {
    padding: 10px 6px;
    font-size: 0.82rem;
  }

  .calc-mat-card-icon {
    width: 24px;
    height: 24px;
  }

  .calc-variant-pill {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .calc-page-section {
    padding-top: 85px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .calc-hero-header h1 {
    font-size: 1.65rem;
  }

  .calc-card-panel,
  .calc-summary-sidebar {
    padding: 18px 14px;
  }

  .calc-option-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .calc-input-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .calc-wall-type-tabs {
    grid-template-columns: 1fr;
  }

  .calc-blueprint-svg-wrapper {
    max-width: 260px;
  }

  .calc-elevation-graphic-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .calc-elevation-graphic-card > div[style*="font-size:1.2rem"] {
    display: none;
  }

  .rate-cards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rate-matrix-header h2 {
    font-size: 1.5rem;
  }

  .rate-filter-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .rate-card-actions {
    grid-template-columns: 1fr;
  }

  .calc-btn-whatsapp {
    padding: 14px;
    font-size: 0.95rem;
  }
}

