/* HeritageAtlas.pro — components.css */

/* Teaser card */
.teaser-card {
  background: #fff8e8;
  border: 1px solid rgba(11, 61, 46, 0.18);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.teaser-card .card-icon {
  width: 40px;
  height: 40px;
}

.teaser-card h2,
.teaser-card h3 {
  margin-top: 0;
}

.teaser-card a.card-link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
}

.teaser-card a.card-link::after {
  content: " →";
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--colour-red);
  color: var(--colour-text-on-dark);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  padding: 0.7em 1.4em;
  border-radius: var(--radius);
  border: 2px solid var(--colour-red);
}

.btn:hover,
.btn:focus {
  background: transparent;
  color: var(--colour-red);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--colour-text-on-dark);
  border: 2px solid var(--colour-text-on-dark);
}

.btn--outline:hover,
.btn--outline:focus {
  background: var(--colour-text-on-dark);
  color: var(--colour-green);
}

/* Almanac: decade tablist */
.almanac-tool {
  border: 1px solid rgba(11, 61, 46, 0.25);
  border-radius: var(--radius);
  background: #fff8e8;
  padding: 1.4rem;
  margin: 1.6rem 0;
}

.decade-tablist {
  list-style: none;
  margin: 0 0 1.2rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .decade-tablist {
    flex-direction: column;
    max-height: 260px;
    overflow-y: auto;
    flex-wrap: nowrap;
    border: 1px solid rgba(11,61,46,0.2);
    border-radius: var(--radius);
    padding: 0.4rem;
  }
}

.decade-tab {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--colour-bg);
  color: var(--colour-green);
  border: 2px solid var(--colour-green);
  border-radius: var(--radius);
  padding: 0.55em 1em;
  cursor: pointer;
}

.decade-tab:hover {
  background: #e2d6b0;
}

.decade-tab[aria-selected="true"] {
  background: var(--colour-red);
  border-color: var(--colour-red);
  color: var(--colour-text-on-dark);
}

.almanac-hint {
  font-style: italic;
  opacity: 0.85;
}

.season-card {
  border: 2px solid var(--colour-green);
  border-radius: var(--radius);
  background: var(--colour-bg);
  padding: 1.3rem 1.4rem;
}

.season-card[hidden] {
  display: none;
}

.season-card.is-animating {
  animation: almanac-fade-in 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .season-card.is-animating {
    animation: none;
  }
}

@keyframes almanac-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.season-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.season-card__header h3 {
  margin: 0;
}

.season-field {
  margin-top: 1rem;
}

.season-field .label {
  display: block;
  color: var(--colour-green);
  margin-bottom: 0.3em;
}

.almanac-error {
  border: 2px dashed var(--colour-red);
  color: var(--colour-red);
  padding: 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.almanac-error[hidden] {
  display: none;
}

/* Static (no-JS) decade list */
.decade-static-list {
  display: grid;
  gap: 1.2rem;
  margin: 1.6rem 0;
}

.decade-static-list .season-card {
  scroll-margin-top: 1rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(11, 61, 46, 0.2);
  padding: 0.9rem 0;
}

.faq-item summary {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--colour-green);
  cursor: pointer;
  font-size: 1.05rem;
  padding-right: 1.2rem;
}

.faq-item summary::-webkit-details-marker {
  color: var(--colour-red);
}

.faq-item[open] summary {
  margin-bottom: 0.6rem;
}

/* Glossary */
.glossary-list dt {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--colour-green);
  margin-top: 1.2rem;
  font-size: 1.05rem;
}

.glossary-list dd {
  margin: 0.3rem 0 0 0;
}

/* Table (admin/history) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}

.data-table caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.data-table th,
.data-table td {
  border: 1px solid rgba(11, 61, 46, 0.25);
  padding: 0.6em 0.7em;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--colour-green);
  color: var(--colour-text-on-dark);
  font-family: var(--font-body);
  font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  padding: 0.9rem 0;
  opacity: 0.85;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  margin: 0;
  padding: 0;
}

.breadcrumb li:not(:last-child)::after {
  content: " / ";
  padding-left: 0.3em;
}

/* Flag-stripe divider used inline already via hr.divider */

.notice-box {
  border-left: 4px solid var(--colour-red);
  background: #fff8e8;
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
}

.notice-box p:last-child {
  margin-bottom: 0;
}
