/* ===== K-Pass Climate Card Calculator Specific Styles ===== */

/* ===== CSS Variables ===== */
:root {
  --color-primary: #3b82f6;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
}

/* ===== Region Buttons ===== */
.region-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .region-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

.region-btn {
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--color-border);
  border-radius: 0.5rem;
  background: #ffffff;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.2s;
}

.region-btn:hover {
  border-color: var(--color-primary);
}

.region-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
}

/* ===== Result Section ===== */
.result-section {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-section.hidden {
  display: none;
}

.report-card {
  background: #ffffff;
  border-radius: 1.75rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 55px -28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-divider {
  position: relative;
  margin: 0.5rem 0 0.25rem;
  padding-top: 1rem;
  border-top: 2px dashed #e5e7eb;
  text-align: center;
}

.divider-badge {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #374151;
  box-shadow: 0 6px 14px -12px rgba(0, 0, 0, 0.35);
}

/* Winner Card */
.winner-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
  border: 1px solid #e5e7eb;
}

.winner-name {
  font-size: 2.4rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 0.75rem;
}

.winner-image {
  display: flex;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.winner-image img {
  width: 280px;
  max-width: 85%;
  height: auto;
  object-fit: contain;
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.winner-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.6rem;
}

.amount-label {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a8a;
}

.amount-value {
  font-size: 3rem;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -0.02em;
}

.winner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  border: 1px solid #f59e0b;
}

.winner-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  word-break: keep-all;
}

.subtitle {
  word-break: keep-all;
}

.share-btn {
  margin-top: 0.75rem;
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px -14px rgba(37, 99, 235, 0.9);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -14px rgba(37, 99, 235, 0.95);
}

.share-btn.full-width {
  width: 100%;
}

.font-bold {
  font-weight: 800;
}

.text-blue-600 {
  color: #2563eb;
}

.text-gray-700 {
  color: #374151;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.95rem;
}

.md\:text-base {
  font-size: 1rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .winner-subtitle {
    font-size: 1rem;
  }
  .md\:text-base {
    font-size: 1rem;
  }
}

/* Policy table responsive scroll & sticky */
.table-scroll-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.35rem;
  display: block;
}

.table-wrapper.scrollable {
  overflow-x: auto;
}

.policy-table {
  min-width: 640px;
  width: 100%;
}

.policy-table th:first-child,
.policy-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #f3f4f6;
  box-shadow: 6px 0 10px -10px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  font-weight: 800;
  color: #374151;
  border-right: 1px solid #d1d5db;
}

.policy-table th:not(:first-child),
.policy-table td:not(:first-child) {
  min-width: 140px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .table-scroll-hint {
    display: none;
  }
  .policy-table {
    min-width: auto;
  }
}

/* Comparison Table Card */
.comparison-table-card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 32px -24px rgba(0, 0, 0, 0.35);
}

.comparison-table-card.compact {
  padding: 1.25rem 1rem;
  margin-bottom: 0.5rem;
  box-shadow: none;
  border: 1px solid #e5e7eb;
}

.comparison-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  gap: 1rem;
  min-height: 72px;
}

.leaderboard-item.winner {
  background: #ffffff;
  border: 2px solid #fbbf24;
  box-shadow: 0 10px 25px -18px rgba(0, 0, 0, 0.3);
}

.leaderboard-item.tie {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.leaderboard-item.loser {
  background: #f9fafb;
}

.leaderboard-item.na {
  opacity: 0.5;
  background: #f3f4f6;
}

.leaderboard-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.leaderboard-name {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
}

.leaderboard-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.badge-winner {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.badge-bonus {
  background: #ecfeff;
  color: #0ea5e9;
  border: 1px solid #67e8f9;
}

.badge-tie {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.leaderboard-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.leaderboard-text {
  text-align: right;
  font-size: 0.95rem;
  line-height: 1.3;
}

.leaderboard-tie-text {
  color: #4b5563;
  font-weight: 700;
}

.leaderboard-kpass-warning {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: right;
}

.leaderboard-loss-text {
  color: #ef4444;
  font-weight: 800;
}

.leaderboard-na-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b7280;
}

@media (max-width: 640px) {
  .leaderboard-item {
    padding: 0.9rem 1rem;
  }
  .leaderboard-name {
    font-size: 0.95rem;
  }
  .leaderboard-amount {
    font-size: 1.05rem;
  }
}

.year-saving {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 1.5rem;
}



/* Table wrapper spacing */
.table-wrapper {
  margin: 1.5rem 0;
}

/* ===== Policy Accordion Section ===== */
.policy-intro {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 1.5rem;
}

.policy-accordion {
  margin-top: 1.5rem;
}

.accordion-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  background: #ffffff;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.accordion-header:hover {
  background: #f3f4f6;
}

.accordion-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
}

.accordion-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.4;
}

.accordion-icon {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: #9ca3af;
  transition: transform 0.2s;
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.accordion-item.is-open .accordion-content {
  display: block;
}

.accordion-content p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 1rem;
}

.accordion-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style: disc;
}

.accordion-content ul li {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 0.75rem;
}

.accordion-content ul li strong {
  color: #111827;
  font-weight: 700;
}

.highlight-text {
  color: #2563eb;
}

.policy-footer-note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #1e40af;
}

@media (max-width: 640px) {
  .accordion-header {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .accordion-number {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.9rem;
  }

  .accordion-title {
    font-size: 0.95rem;
  }

  .accordion-content {
    padding: 1rem 1.25rem;
  }

  .policy-footer-note {
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
  }
}

/* ===== Checkbox Styles ===== */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1rem;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.checkbox-container:hover {
  background: #f3f4f6;
  border-color: var(--color-primary);
}

.checkbox-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.checkbox-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #f59e0b;
}

@media (max-width: 640px) {
  .checkbox-container {
    padding: 0.85rem;
  }

  .checkbox-input {
    width: 1.1rem;
    height: 1.1rem;
  }

  .checkbox-label {
    font-size: 0.9rem;
  }
}

/* ===== Recommendation Message ===== */
.recommendation-message {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1e40af;
  font-weight: 600;
}

@media (max-width: 640px) {
  .recommendation-message {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }
}
