/* ToughASIA Events - neutral styles that sit inside the Newspaper theme */
.tae-box {
  border: 1px solid #e6e6e6;
  border-left: 4px solid #e2231a;
  background: #fafafa;
  padding: 16px 20px;
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
}
.tae-row { display: flex; gap: 12px; padding: 4px 0; }
.tae-label { flex: 0 0 90px; font-weight: 700; color: #111; }
.tae-value { flex: 1; color: #333; }
.tae-small { margin-left: 6px; font-size: 13px; white-space: nowrap; }
.tae-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tae-button, .tae-button:visited {
  display: inline-block;
  padding: 10px 18px;
  background: #e2231a;
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  border-radius: 3px;
}
.tae-button:hover { background: #111; }
.tae-button-light, .tae-button-light:visited { background: #fff; color: #111 !important; border: 1px solid #ccc; }
.tae-button-light:hover { background: #f0f0f0; }

.tae-heading { margin-top: 28px; }
.tae-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 0 0 24px; }
.tae-card { border: 1px solid #eee; background: #fff; display: flex; flex-direction: column; }
.tae-card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f3f3f3; }
.tae-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tae-card-body { padding: 12px 14px 14px; }
.tae-card-date { font-size: 13px; font-weight: 700; color: #e2231a; text-transform: uppercase; letter-spacing: .02em; }
.tae-card-title { font-size: 17px; line-height: 1.3; margin: 6px 0 4px; }
.tae-card-title a { color: #111; text-decoration: none; }
.tae-card-title a:hover { color: #e2231a; }
.tae-card-place { font-size: 13px; color: #666; }
.tae-pages { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 10px 0 30px; font-size: 14px; }
.tae-empty { color: #666; }

@media (max-width: 480px) {
  .tae-row { flex-direction: column; gap: 0; }
  .tae-label { flex-basis: auto; }
}

.tae-featured { margin: 0 0 20px; }
.tae-featured-img { width: 100%; height: auto; display: block; }

/* ---- one ad, similar races ---- */
.tae-ad { margin: 24px 0; text-align: center; }
.tae-similar { margin-top: 32px; padding-top: 8px; border-top: 1px solid #eee; }
.tae-similar .tae-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tae-similar .tae-card-title { font-size: 15px; }
.tae-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.tae-tag { font-size: 11px; background: #f2f2f2; color: #555; padding: 2px 7px; border-radius: 10px; }

/* ---- Race Calendar ---- */
.tae-cal { margin: 0 0 30px; }
.tae-cal-fallback { margin: 0 0 20px 18px; }
.tae-cal-views { display: inline-flex; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; }
.tae-cal-views button { background: #fff; color: #333; border: 0; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: 14px; }
.tae-cal-views button + button { border-left: 1px solid #ccc; }
.tae-cal-views button.is-on { background: #e2231a; color: #fff; }
.tae-f { display: flex; flex-direction: column; font-size: 12px; font-weight: 700; color: #555; min-width: 140px; flex: 1; }
.tae-f span { margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em; }
.tae-f select, .tae-f input { font-size: 14px; padding: 7px 8px; border: 1px solid #ccc; border-radius: 3px; background: #fff; width: 100%; max-width: 100%; height: auto; margin: 0; }
.tae-f[hidden] { display: none; }
.tae-cal-status { margin: 8px 0 14px; font-size: 14px; color: #444; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tae-chip { background: #fff; border: 1px solid #ddd; border-radius: 14px; padding: 3px 10px; font-size: 13px; cursor: pointer; color: #333; }
.tae-chip:hover { border-color: #e2231a; color: #e2231a; }
.tae-chip-clear { border-style: dashed; }
.tae-cal-more { text-align: center; margin: 18px 0; }
.tae-cal-more .tae-button { border: 0; cursor: pointer; }
.tae-cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.tae-cal-nav h3 { margin: 0; font-size: 20px; }
.tae-cal-nav h3 small { font-size: 14px; color: #777; font-weight: 400; }
.tae-cal-nav button { background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 7px 14px; cursor: pointer; font-weight: 700; color: #333; }
.tae-cal-nav button:disabled { opacity: .35; cursor: default; }
.tae-month { border: 1px solid #e5e5e5; }
.tae-month-head, .tae-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tae-month-head div { background: #222; color: #fff; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 0; text-transform: uppercase; }
.tae-day { min-height: 104px; border-right: 1px solid #eee; border-bottom: 1px solid #eee; padding: 4px; font-size: 12px; overflow: hidden; }
.tae-day:nth-child(7n) { border-right: 0; }
.tae-day-blank { background: #fbfbfb; }
.tae-day-past { background: #fafafa; }
.tae-day-past .tae-day-num { color: #bbb; }
.tae-day-today .tae-day-num { background: #e2231a; color: #fff; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; text-align: center; }
.tae-day-num { font-weight: 700; color: #333; margin-bottom: 3px; }
.tae-ev { display: block; background: #fdecea; border-left: 3px solid #e2231a; color: #111 !important; text-decoration: none !important; padding: 2px 4px; margin-bottom: 3px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 2px; }
.tae-ev:hover { background: #e2231a; color: #fff !important; }
.tae-ev-cont { background: #f5f5f5; border-left-color: #bbb; color: #666 !important; }
.tae-day-more { background: none; border: 0; padding: 0; color: #e2231a; font-size: 12px; cursor: pointer; font-weight: 700; }
.tae-agenda-day { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.tae-agenda-date { flex: 0 0 46px; text-align: center; font-size: 12px; color: #777; text-transform: uppercase; }
.tae-agenda-date b { display: block; font-size: 22px; color: #e2231a; line-height: 1.1; }
.tae-agenda-day ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.tae-agenda-day li { margin-bottom: 6px; }
.tae-agenda-day li a { font-weight: 700; color: #111; text-decoration: none; }
.tae-agenda-day li span { display: block; font-size: 12px; color: #777; }
@media (max-width: 640px) {
  .tae-f { min-width: 46%; }
  .tae-cal-views { width: 100%; }
  .tae-cal-views button { flex: 1; }
}

/* ---- Upcoming races (sidebar / homepage) ---- */
.tae-upcoming ul { list-style: none; margin: 0; padding: 0; }
.tae-upcoming li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #eee; }
.tae-upcoming-title { margin: 0 0 8px; }
.tae-up-date { flex: 0 0 44px; text-align: center; background: #e2231a; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 0; border-radius: 3px; line-height: 1.2; }
.tae-up-date b { display: block; font-size: 18px; }
.tae-up-text a { font-weight: 700; color: #111; text-decoration: none; line-height: 1.3; }
.tae-up-text a:hover { color: #e2231a; }
.tae-up-text small { display: block; color: #777; font-size: 12px; margin-top: 2px; }
.tae-up-more { margin: 10px 0 0; font-size: 14px; font-weight: 700; }

/* ---- Submit your race ---- */
.tae-submit fieldset { border: 1px solid #e5e5e5; padding: 14px 16px; margin: 0 0 18px; }
.tae-submit legend { font-weight: 700; padding: 0 6px; }
.tae-field { margin: 0 0 12px; }
.tae-field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.tae-field label span { color: #e2231a; }
.tae-field input[type=text], .tae-field input[type=url], .tae-field input[type=email], .tae-field input[type=tel],
.tae-field input[type=date], .tae-field input[type=time], .tae-field select, .tae-field textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 3px; font-size: 15px; }
.tae-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; }
.tae-trap { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.tae-notice { padding: 12px 16px; margin: 0 0 16px; border-left: 4px solid; }
.tae-ok { background: #edf7ed; border-color: #2e7d32; }
.tae-bad { background: #fdecea; border-color: #e2231a; }

/* ---- Race Calendar 1.2: search bar + elegant list (The Events Calendar style) ---- */
.tae-cal { font-size: 15px; }
.tae-cal-top { display: flex; gap: 12px; align-items: stretch; border: 1px solid #e4e4e4; border-radius: 6px; padding: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.tae-search { flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
.tae-search svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: #888; stroke-width: 2; margin-left: 6px; }
.tae-search input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; outline: none; font-size: 15px; padding: 8px 4px; background: transparent; margin: 0; height: auto; }
.tae-find { background: #e2231a; color: #fff; border: 0; border-radius: 4px; padding: 10px 18px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tae-find:hover { background: #111; }
.tae-cal-top .tae-cal-views { flex: 0 0 auto; }
.tae-cal-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.tae-cal-status-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.tae-cal-status { margin: 0; }
.tae-sub { position: relative; }
.tae-sub-btn { background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 7px 12px; font-weight: 700; font-size: 13px; cursor: pointer; color: #333; }
.tae-sub-btn:hover { border-color: #e2231a; color: #e2231a; }
.tae-sub-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.12); width: 280px; padding: 8px 0; }
.tae-sub-menu a { display: block; padding: 9px 16px; color: #111; text-decoration: none; font-weight: 600; font-size: 14px; }
.tae-sub-menu a:hover { background: #f6f6f6; color: #e2231a; }
.tae-sub-note { font-size: 12px; color: #666; padding: 4px 16px 6px; margin: 0; }

.tae-cal-month { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; color: #333; margin: 28px 0 4px; border: 0; padding: 0; }
.tae-cal-month::after { content: ""; flex: 1; height: 1px; background: #e2e2e2; }
.tae-row-ev { display: grid; grid-template-columns: 64px minmax(0, 1fr) 260px; gap: 0 24px; padding: 26px 0; border-bottom: 1px solid #f0f0f0; align-items: start; }
.tae-row-date { text-align: center; padding-top: 2px; }
.tae-row-date span { display: block; font-size: 12px; font-weight: 700; color: #777; letter-spacing: .06em; }
.tae-row-date b { display: block; font-size: 26px; line-height: 1.15; color: #111; }
.tae-row-when { font-size: 14px; color: #555; margin-bottom: 6px; }
.tae-row-title { font-size: 22px; line-height: 1.25; margin: 0 0 8px; font-weight: 700; }
.tae-row-title a { color: #111; text-decoration: none; }
.tae-row-title a:hover { color: #e2231a; }
.tae-row-where { font-size: 14px; color: #444; margin-bottom: 8px; }
.tae-row-where b { color: #111; }
.tae-row-text { font-size: 14px; line-height: 1.6; color: #555; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tae-row-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: #f3f3f3; }
.tae-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tae-row-ev:hover .tae-row-img img { transform: scale(1.03); }
.tae-cal-ad { margin: 22px 0; text-align: center; }
@media (max-width: 860px) {
  .tae-row-ev { grid-template-columns: 52px minmax(0, 1fr) 190px; gap: 0 16px; }
  .tae-row-title { font-size: 19px; }
}
@media (max-width: 640px) {
  .tae-cal-top { flex-wrap: wrap; }
  .tae-cal-top .tae-cal-views { width: 100%; }
  .tae-find { padding: 9px 12px; }
  .tae-cal-filters { grid-template-columns: 1fr 1fr; }
  .tae-row-ev { grid-template-columns: 46px minmax(0, 1fr); padding: 20px 0; }
  .tae-row-img { grid-column: 1 / -1; grid-row: 1; margin-bottom: 14px; }
  .tae-row-date b { font-size: 22px; }
  .tae-row-title { font-size: 18px; }
  .tae-sub-menu { right: auto; left: 0; }
}

/* ---- pages (20 races each) ---- */
.tae-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 28px 0 6px; }
.tae-pager-nums { display: inline-flex; gap: 4px; align-items: center; }
.tae-pager button { min-width: 38px; height: 38px; padding: 0 10px; background: #fff; border: 1px solid #ddd; border-radius: 4px; font-weight: 700; font-size: 14px; color: #333; cursor: pointer; }
.tae-pager button:hover:not(:disabled) { border-color: #e2231a; color: #e2231a; }
.tae-pager button.is-on { background: #e2231a; border-color: #e2231a; color: #fff; }
.tae-pager button:disabled { opacity: .35; cursor: default; }
.tae-pager-gap { padding: 0 4px; color: #999; }
.tae-pager-info { text-align: center; font-size: 13px; color: #777; margin: 4px 0 20px; }
.tae-f select option:disabled { color: #bbb; }
@media (max-width: 640px) {
  .tae-pager-nums button { min-width: 34px; height: 34px; padding: 0 6px; }
}
