/* Australian Tax Scales Calculator Specific Styles */

/* Page Header */
.page-header {
  text-align: center;
  padding: 3rem 4rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #181c40 0%, #2a3052 100%);
  color: #d8bd7d;
  border-radius: 8px;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

[data-theme="light"] .page-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #d8bd7d;
}

[data-theme="light"] .page-header h1 {
  color: white;
}

.intro-text {
  opacity: 0.95;
  font-size: 1.1rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Card Sections */
.card {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 2.5rem 4rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

[data-theme="dark"] .card {
  border: 3px solid var(--accent-primary);
}

[data-theme="light"] .card {
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

[data-theme="dark"] .card h2 {
  color: var(--accent-primary);
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Input Section */
.input-section input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
}

[data-theme="dark"] .input-section input[type="number"] {
  border: 2px solid rgba(216, 189, 125, 0.3);
}

.input-section input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.input-section input[type="number"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* SG Section */
.sg-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .sg-section {
  border-top: 1px solid rgba(216, 189, 125, 0.2);
}

.sg-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

#sg-rate-display {
  color: var(--accent-primary);
  font-weight: bold;
}

input[type="range"] {
  width: 100%;
  margin: 0.5rem 0;
}

.info-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Tables */
.input-table,
.summary-table,
.tax-breakdown-table,
.simplified-tax-table,
.misconception-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

[data-theme="dark"] .card table {
  border: 3px solid var(--accent-primary);
  border-radius: 8px;
  overflow: hidden;
}

table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.75rem;
  text-align: left;
  font-weight: bold;
}

[data-theme="dark"] table th {
  background: #141631;
  color: var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] table td {
  color: var(--text-primary);
  border-bottom: 1px solid rgba(216, 189, 125, 0.2);
}

table tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] table tr:hover {
  background: rgba(216, 189, 125, 0.05);
}

/* Input Table Specific */
.input-table td:last-child {
  width: 200px;
}

/* Summary Table */
.summary-table .label-cell {
  font-weight: 500;
}

.summary-table .value-cell {
  text-align: right;
  font-weight: bold;
  color: var(--accent-primary);
}

.summary-table .highlight-row {
  background: rgba(216, 189, 125, 0.1);
}

[data-theme="dark"] .summary-table .highlight-row td {
  border-top: 2px solid var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
}

/* Tax Breakdown Table */
.tax-breakdown-table th:nth-child(3),
.tax-breakdown-table td:nth-child(3),
.tax-breakdown-table th:nth-child(4),
.tax-breakdown-table td:nth-child(4) {
  text-align: right;
}

/* Total row styling */
.total-row td {
  font-weight: bold;
  padding: 1rem 0.75rem;
  border-top: 2px solid var(--accent-primary);
}

[data-theme="dark"] .total-row {
  background: rgba(216, 189, 125, 0.1);
}

[data-theme="dark"] .total-row td {
  color: var(--accent-primary);
  border-bottom: none;
}

.total-row td:last-child {
  font-size: 1.2em;
}

[data-theme="dark"] .total-row td:last-child {
  text-shadow: 0 0 10px rgba(216, 189, 125, 0.3);
}

/* Simplified Tax Table */
.simplified-tax-table th:nth-child(2),
.simplified-tax-table td:nth-child(2) {
  text-align: right;
}

/* Explanation Section */
.explanation-section {
  background: var(--bg-primary);
  padding: 2.5rem 4rem;
}

[data-theme="dark"] .explanation-section {
  background: linear-gradient(135deg, #181c40 0%, #2a3052 100%);
}

.explanation-section ul {
  margin: 1rem 0 1rem 1rem;
  padding-left: 2rem;
}

.explanation-section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.explanation-section p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Misconception Section */
.misconception-section {
  background: var(--bg-primary);
  padding: 2.5rem 4rem;
}

[data-theme="dark"] .misconception-section {
  background: linear-gradient(135deg, #2a1f1f 0%, #3a2828 100%);
  border-color: #d89b7d !important;
}

.warning-text {
  color: #e74c3c;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

[data-theme="dark"] .warning-text {
  color: #ff6b6b;
}

.method-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.25rem;
}

/* Misconception Table Rows */
.correct-row {
  background: rgba(39, 174, 96, 0.1);
}

[data-theme="dark"] .correct-row {
  background: rgba(39, 174, 96, 0.15);
}

.incorrect-row {
  background: rgba(231, 76, 60, 0.1);
}

[data-theme="dark"] .incorrect-row {
  background: rgba(231, 76, 60, 0.15);
}

.difference-row {
  background: rgba(241, 196, 15, 0.1);
  font-weight: bold;
}

[data-theme="dark"] .difference-row {
  background: rgba(241, 196, 15, 0.15);
}

[data-theme="dark"] .correct-row td,
[data-theme="dark"] .incorrect-row td,
[data-theme="dark"] .difference-row td {
  border-bottom: 1px solid rgba(216, 189, 125, 0.3);
}

.misconception-table td:last-child {
  text-align: right;
  font-weight: bold;
  font-size: 1.1em;
}

/* Reference Section */
.reference-section a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: bold;
}

.reference-section a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Disclaimer Section */
.disclaimer-section {
  background: var(--bg-primary);
  padding: 2.5rem 4rem;
}

[data-theme="dark"] .disclaimer-section {
  background: linear-gradient(135deg, #1f2447 0%, #2a3052 100%);
  border-color: #d8bd7d !important;
}

.disclaimer-section h2 {
  color: #e74c3c;
}

[data-theme="dark"] .disclaimer-section h2 {
  color: #ff6b6b;
}

.disclaimer-section ul {
  margin: 1rem 0 1rem 1rem;
  padding-left: 2rem;
}

.disclaimer-section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.disclaimer-section p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.small-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 968px) {
  .card {
    padding: 2rem;
  }
  
  .page-header {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 1.5rem;
  }

  .intro-text {
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  table {
    font-size: 0.9rem;
  }

  table th,
  table td {
    padding: 0.5rem;
  }

  .input-table td:last-child {
    width: 150px;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 1rem 0.5rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }
  
  .card {
    padding: 1rem;
  }

  table {
    font-size: 0.85rem;
  }

  table th,
  table td {
    padding: 0.4rem;
  }

  /* Stack tax breakdown table on very small screens */
  .tax-breakdown-table {
    display: block;
    overflow-x: auto;
  }
}