/* Dramatist event archive — keeps The Events Calendar functionality,
   replaces its generic visual language with the Dramatist one. */

:root {
  --dmh-event-yellow: #ffdf00;
  --dmh-event-ink: #111111;
  --dmh-event-paper: #ffffff;
  --dmh-event-soft: #f5f5f3;
  --dmh-event-line: rgba(17,17,17,.16);
  --dmh-event-muted: rgba(17,17,17,.62);
}

.tribe-events-view,
.tribe-events-view * { box-sizing: border-box; }

.tribe-events-view {
  color: var(--dmh-event-ink);
}

/* Archive intro */
.dmh-events-archive-header {
  max-width: 1180px;
  margin: 0 auto clamp(28px, 4vw, 54px);
  padding: 0 16px;
}
.dmh-events-archive-kicker,
.dmh-events-kicker {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .14em;
}
.dmh-events-archive-header h1 {
  margin: 0;
  color: var(--dmh-event-ink);
  font-size: clamp(48px, 8vw, 110px);
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.dmh-events-archive-header p {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--dmh-event-muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

/* Native TEC Events Bar */
.tribe-events .tribe-events-c-events-bar {
  max-width: 1180px;
  margin: 0 auto 30px !important;
  background: transparent !important;
  border: 1px solid var(--dmh-event-ink) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
  overflow: hidden;
}
.tribe-events .tribe-events-c-events-bar__search-container {
  background: var(--dmh-event-paper) !important;
}
.tribe-events .tribe-events-c-search__input-control {
  padding: 0 !important;
}
.tribe-events .tribe-events-c-search__input {
  min-height: 70px !important;
  padding: 0 24px 0 56px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--dmh-event-ink) !important;
  font: inherit !important;
  font-size: 18px !important;
  box-shadow: none !important;
}
.tribe-events .tribe-events-c-search__input::placeholder {
  color: var(--dmh-event-muted) !important;
  opacity: 1;
}
.tribe-events .tribe-events-c-search__button {
  min-height: 52px !important;
  margin: 9px !important;
  padding: 0 26px !important;
  border: 1px solid var(--dmh-event-ink) !important;
  border-radius: 999px !important;
  background: var(--dmh-event-yellow) !important;
  color: var(--dmh-event-ink) !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
.tribe-events .tribe-events-c-search__button:hover,
.tribe-events .tribe-events-c-search__button:focus {
  background: var(--dmh-event-ink) !important;
  color: var(--dmh-event-yellow) !important;
}
.tribe-events .tribe-events-c-view-selector__content {
  background: var(--dmh-event-paper) !important;
}
.tribe-events .tribe-events-c-view-selector__list-item-link {
  color: var(--dmh-event-ink) !important;
  font-weight: 600 !important;
}
.tribe-events .tribe-events-c-view-selector__list-item--active .tribe-events-c-view-selector__list-item-link {
  color: var(--dmh-event-ink) !important;
}
.tribe-events .tribe-events-c-view-selector__list-item--active .tribe-events-c-view-selector__list-item-link::after {
  background-color: var(--dmh-event-yellow) !important;
}

/* Top navigation */
.tribe-events .tribe-events-c-top-bar {
  max-width: 1180px;
  margin: 0 auto 28px !important;
}
.tribe-events .tribe-events-c-top-bar__today-button {
  border: 1px solid var(--dmh-event-ink) !important;
  border-radius: 999px !important;
  background: var(--dmh-event-yellow) !important;
  color: var(--dmh-event-ink) !important;
  font-weight: 700 !important;
}
.tribe-events .tribe-events-c-top-bar__datepicker-button,
.tribe-events .tribe-events-c-top-bar__nav-link {
  color: var(--dmh-event-ink) !important;
}

/* Compact empty messages instead of large grey banners. */
.tribe-events .tribe-events-c-messages__message {
  max-width: 1180px;
  margin: 0 auto 28px !important;
  padding: 14px 18px !important;
  border: 1px solid var(--dmh-event-line) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--dmh-event-muted) !important;
}

/* Month view */
.tribe-events .tribe-events-calendar-month {
  max-width: 1180px;
  margin: 0 auto !important;
  border: 1px solid var(--dmh-event-ink) !important;
  border-radius: 18px !important;
  overflow: hidden;
}
.tribe-events .tribe-events-calendar-month__header-row {
  background: var(--dmh-event-yellow) !important;
}
.tribe-events .tribe-events-calendar-month__header-column {
  padding: 14px 10px !important;
}
.tribe-events .tribe-events-calendar-month__header-column-title,
.tribe-events .tribe-events-calendar-month__header-column-title-desktop {
  color: var(--dmh-event-ink) !important;
  font-weight: 700 !important;
}
.tribe-events .tribe-events-calendar-month__day {
  min-height: 128px !important;
  border-color: var(--dmh-event-line) !important;
  background: var(--dmh-event-paper) !important;
}
.tribe-events .tribe-events-calendar-month__day-date,
.tribe-events .tribe-events-calendar-month__day-date-link,
.tribe-events .tribe-events-calendar-month__calendar-event-title-link {
  color: var(--dmh-event-ink) !important;
}
.tribe-events .tribe-events-calendar-month__day--current {
  background: rgba(255,223,0,.14) !important;
}
.tribe-events .tribe-events-calendar-month__calendar-event-title-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* List view */
.tribe-events .tribe-events-calendar-list {
  max-width: 1180px;
  margin: 0 auto !important;
}
.tribe-events .tribe-events-calendar-list__event-row {
  padding: 28px 0 !important;
  border-top: 1px solid var(--dmh-event-line);
}
.tribe-events .tribe-events-calendar-list__event-title-link {
  color: var(--dmh-event-ink) !important;
}
.tribe-events .tribe-events-calendar-list__event-date-tag-weekday,
.tribe-events .tribe-events-calendar-list__event-date-tag-daynum,
.tribe-events .tribe-events-calendar-list__event-datetime,
.tribe-events .tribe-events-calendar-list__event-venue,
.tribe-events .tribe-events-calendar-list__event-description {
  color: var(--dmh-event-ink) !important;
}

/* Dramatist-owned card sections under the native calendar. */
.dmh-events-archive-sections {
  max-width: 1180px;
  margin: clamp(56px, 7vw, 96px) auto 0;
  padding: 0 16px 72px;
  color: var(--dmh-event-ink);
}
.dmh-events-archive-section + .dmh-events-archive-section {
  margin-top: clamp(58px, 8vw, 104px);
}
.dmh-events-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.dmh-events-section-head h2 {
  margin: 0;
  color: var(--dmh-event-ink);
  font-size: clamp(34px, 5vw, 64px);
  line-height: .95;
  letter-spacing: -.035em;
}
.dmh-events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.dmh-events-card-wrap.is-hidden { display: none; }
.dmh-event-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--dmh-event-ink);
  border-radius: 18px;
  background: var(--dmh-event-paper);
}
.dmh-event-card-image-link {
  display: block;
  background: var(--dmh-event-soft);
  border-bottom: 1px solid var(--dmh-event-ink);
}
.dmh-event-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.dmh-event-card-image-placeholder {
  min-height: 210px;
  background: var(--dmh-event-yellow);
}
.dmh-event-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.dmh-event-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.25;
}
.dmh-event-card-category {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--dmh-event-yellow);
  color: var(--dmh-event-ink);
  font-weight: 700;
}
.dmh-event-card-date {
  max-width: 56%;
  color: var(--dmh-event-muted);
  text-align: right;
}
.dmh-event-card h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 31px);
  line-height: 1;
  letter-spacing: -.025em;
}
.dmh-event-card h3 a,
.dmh-event-card-link {
  color: var(--dmh-event-ink) !important;
}
.dmh-event-card h3 a { text-decoration: none; }
.dmh-event-card-venue,
.dmh-event-card-excerpt {
  margin: 0 0 12px;
  color: var(--dmh-event-muted);
  line-height: 1.45;
}
.dmh-event-card-excerpt { font-size: 14px; }
.dmh-event-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}
.dmh-event-card-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.dmh-event-card-cost {
  font-size: 12px;
  color: var(--dmh-event-muted);
}
.dmh-events-empty {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--dmh-event-line);
  color: var(--dmh-event-muted);
}
.dmh-events-more {
  display: block;
  margin: 28px auto 0;
  padding: 12px 20px;
  border: 1px solid var(--dmh-event-ink);
  border-radius: 999px;
  background: var(--dmh-event-yellow);
  color: var(--dmh-event-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.dmh-events-more:hover,
.dmh-events-more:focus {
  background: var(--dmh-event-ink);
  color: var(--dmh-event-yellow);
}

@media (max-width: 900px) {
  .dmh-events-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tribe-events .tribe-events-c-search__input { min-height: 58px !important; }
}

@media (max-width: 640px) {
  .dmh-events-archive-header { padding: 0 12px; }
  .dmh-events-archive-sections { padding-left: 12px; padding-right: 12px; }
  .dmh-events-grid { grid-template-columns: 1fr; }
  .tribe-events .tribe-events-c-events-bar { border-radius: 12px !important; }
  .tribe-events .tribe-events-c-search__button { width: calc(100% - 18px) !important; }
  .tribe-events .tribe-events-calendar-month { border-radius: 12px !important; }
  .tribe-events .tribe-events-calendar-month__day { min-height: auto !important; }
  .dmh-event-card-date { max-width: 60%; }
}

/* TEC top-bar date picker: keep the popup readable even when the theme has
   aggressive global link/table styles. */
.tribe-events .datepicker,
.tribe-events .tribe-events-c-top-bar__datepicker-container .datepicker {
  min-width: 320px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--dmh-event-ink) !important;
  border-radius: 14px !important;
  background: var(--dmh-event-paper) !important;
  color: var(--dmh-event-ink) !important;
  box-shadow: 0 14px 34px rgba(17,17,17,.14) !important;
}
.tribe-events .datepicker table {
  width: 100% !important;
  margin: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
.tribe-events .datepicker .datepicker-switch,
.tribe-events .datepicker .prev,
.tribe-events .datepicker .next {
  height: 46px !important;
  background: var(--dmh-event-yellow) !important;
  color: var(--dmh-event-ink) !important;
  font-weight: 700 !important;
  text-align: center !important;
}
.tribe-events .datepicker .month,
.tribe-events .datepicker .year {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 25% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  background: var(--dmh-event-paper) !important;
  color: var(--dmh-event-ink) !important;
  border-radius: 0 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}
.tribe-events .datepicker .month:hover,
.tribe-events .datepicker .year:hover,
.tribe-events .datepicker .month.active,
.tribe-events .datepicker .year.active {
  background: var(--dmh-event-yellow) !important;
  color: var(--dmh-event-ink) !important;
}


/* v0.6.4 — Calendar polish: remove TEC blue accents and refine month hover cards. */

/* The calendar should never fall back to TEC's default blue accent. */
.tribe-events-view,
.tribe-events-view .tribe-common {
  --tec-color-accent-primary: var(--dmh-event-ink) !important;
  --tec-color-accent-primary-hover: var(--dmh-event-ink) !important;
}

/* "Bu Ay" / today control: neutral, editorial button — neither blue nor yellow. */
.tribe-events .tribe-events-c-top-bar__today-button,
.tribe-events .tribe-common-c-btn-border-small,
.tribe-events a.tribe-common-c-btn-border-small,
.tribe-events button.tribe-common-c-btn-border-small {
  background: var(--dmh-event-paper) !important;
  color: var(--dmh-event-ink) !important;
  border: 1px solid var(--dmh-event-ink) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-weight: 650 !important;
  letter-spacing: -.01em !important;
}
.tribe-events .tribe-events-c-top-bar__today-button:hover,
.tribe-events .tribe-events-c-top-bar__today-button:focus,
.tribe-events .tribe-common-c-btn-border-small:hover,
.tribe-events .tribe-common-c-btn-border-small:focus,
.tribe-events a.tribe-common-c-btn-border-small:hover,
.tribe-events a.tribe-common-c-btn-border-small:focus,
.tribe-events button.tribe-common-c-btn-border-small:hover,
.tribe-events button.tribe-common-c-btn-border-small:focus {
  background: var(--dmh-event-ink) !important;
  color: var(--dmh-event-paper) !important;
  border-color: var(--dmh-event-ink) !important;
}

/* Remove blue from native TEC links / active controls inside the calendar UI. */
.tribe-events .tribe-events-c-top-bar a,
.tribe-events .tribe-events-c-top-bar button,
.tribe-events .tribe-events-c-view-selector a,
.tribe-events .tribe-events-calendar-month a,
.tribe-events .tribe-events-calendar-list a {
  color: var(--dmh-event-ink) !important;
}

/* Month event hover / tooltip card. */
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-inner {
  background: var(--dmh-event-paper) !important;
  color: var(--dmh-event-ink) !important;
  border-color: var(--dmh-event-line) !important;
  font-family: inherit !important;
}
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-title,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-title-link,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip h3,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip h3 a {
  color: var(--dmh-event-ink) !important;
  font-family: inherit !important;
  font-size: clamp(23px, 2vw, 31px) !important;
  line-height: 1.05 !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
  text-transform: none !important;
  text-decoration: none !important;
}
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-datetime,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-description,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-cost,
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-venue {
  color: var(--dmh-event-muted) !important;
  font-family: inherit !important;
  letter-spacing: 0 !important;
}
.tribe-events .tribe-events-calendar-month__calendar-event-tooltip-description {
  font-size: 15px !important;
  line-height: 1.45 !important;
}

/* Also neutralize event links when the tooltip markup differs between TEC versions. */
.tribe-events [class*="calendar-event-tooltip"] a,
.tribe-events [class*="calendar-event-tooltip"] a:hover,
.tribe-events [class*="calendar-event-tooltip"] a:focus {
  color: var(--dmh-event-ink) !important;
}


/* v0.6.5 — final calendar polish. */

/* The native "Bu Ay" control is intentionally yellow/black and static.
   Keep the same appearance on hover/focus/active so it does not behave like
   a theme button or fall back to TEC blue. */
body .tribe-events .tribe-events-c-top-bar__today-button,
body .tribe-events button.tribe-events-c-top-bar__today-button,
body .tribe-events .tribe-common-c-btn-border-small.tribe-events-c-top-bar__today-button,
body .tribe-events [class*="top-bar__today-button"] {
  background: var(--dmh-event-yellow) !important;
  background-color: var(--dmh-event-yellow) !important;
  background-image: none !important;
  color: var(--dmh-event-ink) !important;
  border: 1px solid var(--dmh-event-ink) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transition: none !important;
  --tec-color-accent-primary: var(--dmh-event-yellow) !important;
  --tec-color-background-primary-multiday: var(--dmh-event-yellow) !important;
}
body .tribe-events .tribe-events-c-top-bar__today-button:hover,
body .tribe-events .tribe-events-c-top-bar__today-button:focus,
body .tribe-events .tribe-events-c-top-bar__today-button:active,
body .tribe-events button.tribe-events-c-top-bar__today-button:hover,
body .tribe-events button.tribe-events-c-top-bar__today-button:focus,
body .tribe-events button.tribe-events-c-top-bar__today-button:active,
body .tribe-events [class*="top-bar__today-button"]:hover,
body .tribe-events [class*="top-bar__today-button"]:focus,
body .tribe-events [class*="top-bar__today-button"]:active {
  background: var(--dmh-event-yellow) !important;
  background-color: var(--dmh-event-yellow) !important;
  background-image: none !important;
  color: var(--dmh-event-ink) !important;
  border-color: var(--dmh-event-ink) !important;
  box-shadow: none !important;
  outline-color: var(--dmh-event-ink) !important;
  transform: none !important;
}

/* A smaller, calmer tooltip title. */
body .tribe-events .tribe-events-calendar-month__calendar-event-tooltip-title,
body .tribe-events .tribe-events-calendar-month__calendar-event-tooltip-title-link,
body .tribe-events .tribe-events-calendar-month__calendar-event-tooltip h3,
body .tribe-events .tribe-events-calendar-month__calendar-event-tooltip h3 a,
body .tribe-events [class*="calendar-event-tooltip"] h3,
body .tribe-events [class*="calendar-event-tooltip"] h3 a {
  font-size: clamp(18px, 1.35vw, 22px) !important;
  line-height: 1.15 !important;
  font-weight: 650 !important;
  letter-spacing: -.015em !important;
}
