/* Tidy Casa Deal Calculator Styles */
.tidy-casa-calculator-container {
  --tc-primary: #0284c7;
  --tc-primary-light: #e0f2fe;
  --tc-green: #16a34a;
  --tc-green-light: #dcfce7;
  --tc-green-dark: #15803d;
  --tc-background: #ffffff;
  --tc-foreground: #1a1a1a;
  --tc-muted: #6b7280;
  --tc-border: #e5e7eb;
  --tc-card: #fafafa;
  --tc-radius: 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.tidy-casa-calculator-container *,
.tidy-casa-calculator-container *::before,
.tidy-casa-calculator-container *::after {
  box-sizing: border-box;
}

.tc-calculator {
  max-width: 672px;
  margin: 0 auto;
  padding: 1rem;
}

.tc-card {
  background: var(--tc-background);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  overflow: visible;
}

.tc-card-header {
  text-align: center;
  padding: 1.5rem 1.5rem 0.5rem;
}

.tc-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tc-header-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--tc-primary);
}

.tc-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tc-foreground);
  margin: 0;
}

.tc-subtitle {
  font-size: 0.875rem;
  color: var(--tc-muted);
  margin: 0.25rem 0 0;
}

.tc-card-content {
  padding: 1.5rem 2rem 2rem;
}

.tc-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tc-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tc-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--tc-foreground);
}

.tc-label svg {
  width: 1rem;
  height: 1rem;
  color: var(--tc-muted);
}

.tc-select {
  width: 100%;
  height: 3rem;
  padding: 0 1rem;
  font-size: 1rem;
  border: 1px solid var(--tc-border);
  border-radius: calc(var(--tc-radius) - 0.25rem);
  background: var(--tc-background);
  color: var(--tc-foreground);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.tc-select:focus {
  outline: none;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.tc-button {
  width: 100%;
  height: 3rem;
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--tc-primary);
  border: none;
  border-radius: calc(var(--tc-radius) - 0.25rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s, opacity 0.2s;
}

.tc-button:hover:not(:disabled) {
  background: #0369a1;
}

.tc-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tc-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.tc-button.tc-loading svg {
  animation: tc-spin 1s linear infinite;
}

@keyframes tc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Results Section */
.tc-results {
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.tc-results.tc-visible {
  opacity: 1;
  transform: translateY(0);
}

.tc-frequency-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--tc-muted);
  margin-bottom: 1rem;
}

.tc-frequency-indicator svg {
  width: 1rem;
  height: 1rem;
}

.tc-frequency-indicator strong {
  color: var(--tc-foreground);
}

.tc-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .tc-results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tc-result-card {
  background: var(--tc-card);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.tc-result-card.tc-savings {
  background: var(--tc-green-light);
  border-color: #bbf7d0;
}

.tc-result-card.tc-deal {
  background: var(--tc-primary-light);
  border-color: #bae6fd;
}

.tc-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tc-badge svg {
  width: 0.75rem;
  height: 0.75rem;
}

.tc-badge.tc-savings-badge {
  background: #dcfce7;
  color: var(--tc-green-dark);
  border: 1px solid #bbf7d0;
}

.tc-badge.tc-deal-badge {
  background: var(--tc-primary);
  color: white;
}

.tc-result-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.tc-result-card.tc-standard .tc-result-label {
  color: var(--tc-muted);
}

.tc-result-card.tc-savings .tc-result-label {
  color: var(--tc-green-dark);
}

.tc-result-card.tc-deal .tc-result-label {
  color: var(--tc-primary);
}

.tc-result-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

@media (min-width: 768px) {
  .tc-result-price {
    font-size: 1.875rem;
  }
  
  .tc-result-card.tc-deal .tc-result-price {
    font-size: 2.25rem;
  }
}

.tc-result-card.tc-standard .tc-result-price {
  color: var(--tc-foreground);
}

.tc-result-card.tc-savings .tc-result-price {
  color: var(--tc-green);
}

.tc-result-card.tc-deal .tc-result-price {
  color: var(--tc-primary);
}

.tc-result-subtext {
  font-size: 0.75rem;
  color: var(--tc-muted);
  margin-top: 0.5rem;
}

.tc-result-card.tc-savings .tc-result-subtext {
  color: rgba(22, 163, 74, 0.7);
}

.tc-result-card.tc-deal .tc-result-subtext {
  color: rgba(2, 132, 199, 0.7);
}

/* Breakdown Section */
.tc-breakdown {
  background: var(--tc-card);
  border-radius: calc(var(--tc-radius) - 0.25rem);
  padding: 1rem;
  margin-top: 1rem;
}

.tc-breakdown-content {
  display: flex;
  gap: 0.75rem;
}

.tc-breakdown-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--tc-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-breakdown-icon svg {
  width: 1rem;
  height: 1rem;
  color: var(--tc-green);
}

.tc-breakdown-text {
  font-size: 0.875rem;
  color: var(--tc-muted);
}

.tc-breakdown-title {
  font-weight: 500;
  color: var(--tc-foreground);
  margin-bottom: 0.25rem;
}

.tc-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tc-breakdown-list li {
  padding: 0.125rem 0;
}

/* Footer */
.tc-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--tc-muted);
  margin-top: 1rem;
  padding: 0 1rem;
}
