/* ==========================================================================
   CA TOOLS HUB, CALCULATORS, HEALTH CHECK & AI TAX ASSISTANT STYLES
   Bhupendra P. Shah & Co. - Executive Navy & Gold Theme
   ========================================================================== */

:root {
  --tools-gold: #d4af37;
  --tools-gold-light: #f5e7a9;
  --tools-gold-dark: #aa820a;
  --tools-navy-bg: #071326;
  --tools-card-bg: rgba(10, 24, 48, 0.85);
  --tools-card-border: rgba(212, 175, 55, 0.22);
  --tools-input-bg: rgba(4, 11, 24, 0.9);
  --tools-input-border: rgba(212, 175, 55, 0.3);
  --tools-text-muted: #8ea1bf;
  --tools-success: #10b981;
  --tools-danger: #ef4444;
  --tools-warning: #f59e0b;
}

/* --------------------------------------------------------------------------
   Hero & Page Headers
   -------------------------------------------------------------------------- */
.tools-hero {
  padding: 65px 0 45px;
  background: linear-gradient(180deg, rgba(4, 10, 23, 0.96) 0%, rgba(8, 20, 42, 0.9) 100%),
              radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--tools-card-border);
  text-align: center;
  position: relative;
}

.tools-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--tools-gold-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   Calculators Nav Tabs
   -------------------------------------------------------------------------- */
.calc-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 40px;
}

.calc-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 40px;
  background: rgba(10, 25, 50, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.calc-tab-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.5);
  color: #fff;
  transform: translateY(-2px);
}

.calc-tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28) 0%, rgba(170, 130, 10, 0.35) 100%);
  border-color: var(--tools-gold);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.calc-tab-btn svg {
  width: 18px;
  height: 18px;
  color: var(--tools-gold);
}

/* --------------------------------------------------------------------------
   Calculator Layout Container
   -------------------------------------------------------------------------- */
.calc-container {
  display: none;
  animation: fadeInCalc 0.35s ease;
}

.calc-container.active {
  display: block;
}

@keyframes fadeInCalc {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 991px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Styling */
.calc-card {
  background: var(--tools-card-bg);
  border: 1px solid var(--tools-card-border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}

.calc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--tools-gold), transparent);
}

.calc-card-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-card-header h3 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.calc-card-header p {
  color: var(--tools-text-muted);
  font-size: 0.88rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Form Fields & Input Controls
   -------------------------------------------------------------------------- */
.form-group-custom {
  margin-bottom: 22px;
}

.form-label-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-label-custom .helper-tag {
  color: var(--tools-gold);
  font-size: 0.78rem;
  font-weight: 500;
}

.input-with-symbol {
  position: relative;
  display: flex;
  align-items: center;
}

.input-symbol {
  position: absolute;
  left: 14px;
  color: var(--tools-gold);
  font-weight: 700;
  font-size: 1rem;
  pointer-events: none;
}

.form-input-custom {
  width: 100%;
  background: var(--tools-input-bg);
  border: 1px solid var(--tools-input-border);
  color: #ffffff;
  padding: 12px 14px 12px 34px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-input-custom:focus {
  outline: none;
  border-color: var(--tools-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: rgba(4, 11, 24, 1);
}

.form-select-custom {
  width: 100%;
  background: var(--tools-input-bg);
  border: 1px solid var(--tools-input-border);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.form-select-custom option {
  background: #071326;
  color: #ffffff;
}

/* Range Slider */
.calc-range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  margin-top: 10px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.calc-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tools-gold);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
  transition: transform 0.15s ease;
}

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

/* Radio / Button Selectors */
.pill-selector {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.pill-option {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.pill-option.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--tools-gold);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Results Panel Styling
   -------------------------------------------------------------------------- */
.calc-result-card {
  background: linear-gradient(145deg, rgba(8, 22, 45, 0.95) 0%, rgba(4, 12, 26, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 100px;
}

.result-hero-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.result-hero-label {
  color: var(--tools-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.result-hero-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--tools-gold-light);
  font-family: 'Cinzel', serif, Georgia;
}

.regime-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.regime-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  position: relative;
}

.regime-box.recommended {
  border-color: var(--tools-success);
  background: rgba(16, 185, 129, 0.07);
}

.regime-tag {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--tools-success);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.regime-name {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

.regime-tax {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 6px 0 2px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row-label {
  color: #94a3b8;
}

.result-row-val {
  color: #ffffff;
  font-weight: 600;
}

.result-highlight-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin: 20px 0;
}

.btn-consult-lead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  color: #040a17;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}

.btn-consult-lead:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.5);
  color: #000;
}

/* --------------------------------------------------------------------------
   Free Business Health Check Diagnostic Tool
   -------------------------------------------------------------------------- */
.health-check-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.health-progress-bar-wrap {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 25px;
}

.health-progress-bar {
  background: linear-gradient(90deg, #d4af37, #10b981);
  height: 100%;
  width: 14%;
  transition: width 0.35s ease;
}

.health-step-card {
  display: none;
  background: var(--tools-card-bg);
  border: 1px solid var(--tools-card-border);
  border-radius: 18px;
  padding: 36px;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.health-step-card.active {
  display: block;
  animation: fadeInCalc 0.35s ease;
}

.health-step-num {
  color: var(--tools-gold);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.health-question-title {
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.health-question-desc {
  color: var(--tools-text-muted);
  font-size: 0.92rem;
  margin-bottom: 26px;
}

.health-options-grid {
  display: grid;
  gap: 14px;
}

.health-option-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(4, 12, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.health-option-box:hover {
  border-color: var(--tools-gold);
  background: rgba(212, 175, 55, 0.08);
  transform: translateX(4px);
}

.health-option-box.selected {
  border-color: var(--tools-gold);
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.2);
}

.health-option-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.health-option-box.selected .health-option-indicator {
  border-color: var(--tools-gold);
  background: var(--tools-gold);
}

.health-option-box.selected .health-option-indicator::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
}

.health-option-content h5 {
  color: #ffffff;
  font-size: 1rem;
  margin: 0 0 3px;
}

.health-option-content p {
  color: #94a3b8;
  font-size: 0.82rem;
  margin: 0;
}

.health-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-health-prev {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-health-prev:hover {
  border-color: #fff;
  color: #fff;
}

.btn-health-next {
  background: linear-gradient(135deg, #d4af37, #aa820a);
  border: none;
  color: #040a17;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-health-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

/* Diagnostic Result Screen */
.health-score-dial-wrap {
  text-align: center;
  padding: 20px 0;
}

.health-score-dial {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--tools-gold);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
}

.health-score-dial .score-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--tools-gold-light);
  line-height: 1;
}

.health-score-dial .score-label {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.risk-flags-grid {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.risk-flag-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--tools-gold);
}

.risk-flag-item.high {
  border-left-color: var(--tools-danger);
  background: rgba(239, 68, 68, 0.06);
}

.risk-flag-item.medium {
  border-left-color: var(--tools-warning);
  background: rgba(245, 158, 11, 0.06);
}

.risk-flag-item.low {
  border-left-color: var(--tools-success);
  background: rgba(16, 185, 129, 0.06);
}

.risk-flag-item h5 {
  color: #ffffff;
  font-size: 0.95rem;
  margin: 0 0 3px;
}

.risk-flag-item p {
  color: #94a3b8;
  font-size: 0.83rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   AI Tax Assistant Widget (Floating Dock & Chamber)
   -------------------------------------------------------------------------- */
.ai-widget-badge {
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #07152b 0%, #030814 100%);
  border: 1.5px solid var(--tools-gold);
  border-radius: 50px;
  padding: 10px 18px;
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65), 0 0 18px rgba(212, 175, 55, 0.35);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.ai-widget-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(212, 175, 55, 0.55);
}

.ai-bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tools-gold);
  position: relative;
}

.ai-bot-avatar .ai-pulse {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.ai-widget-badge span {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* AI Chamber Chatbox */
.ai-chamber-window {
  position: fixed;
  bottom: 85px;
  left: 26px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  background: #071326;
  border: 1px solid var(--tools-card-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(212, 175, 55, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: slideUpAI 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpAI {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chamber-window.active {
  display: flex;
}

.ai-chamber-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(10, 26, 54, 0.98) 0%, rgba(4, 12, 26, 0.98) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-header-info h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.ai-header-info span {
  color: var(--tools-gold);
  font-size: 0.72rem;
  font-weight: 600;
  display: block;
}

.ai-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.ai-close-btn:hover {
  color: #ffffff;
}

.ai-chamber-messages {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(circle at top, rgba(212, 175, 55, 0.04) 0%, transparent 70%);
}

.ai-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.ai-bubble.bot {
  align-self: flex-start;
  background: rgba(13, 30, 60, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 2px;
}

.ai-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(170, 130, 10, 0.4) 100%);
  border: 1px solid var(--tools-gold);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.ai-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ai-prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--tools-gold-light);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-prompt-chip:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--tools-gold);
}

.ai-chamber-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #050e1c;
  display: flex;
  gap: 8px;
}

.ai-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 25px;
  padding: 10px 16px;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.ai-input-field:focus {
  border-color: var(--tools-gold);
}

.ai-send-btn {
  background: var(--tools-gold);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #040a17;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  background: var(--tools-gold-light);
  transform: scale(1.05);
}

.ai-wa-handoff {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366;
  color: #000;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
