/**
 * Estilos customizados para páginas de Evento - The Events Calendar
 * Arquivo: [tema]/tribe-events/tribe-events.css
 * Carregado automaticamente pelo plugin quando o arquivo existe no tema.
 */

/* ============================================================
   VARIÁVEIS
   ============================================================ */
.tec-single-event-wrap {
  --tec-color-primary: #003087;
  --tec-color-accent: #e8271e;
  --tec-color-text: #1a1a2e;
  --tec-color-muted: #6b7280;
  --tec-color-border: #e5e7eb;
  --tec-color-bg-meta: #f8fafc;
  --tec-radius: 12px;
  --tec-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --tec-font-heading: inherit;
}

/* ============================================================
   RESET DO PLUGIN - remove estilos padrão desnecessários
   ============================================================ */
#tribe-events-content.tec-single-event-wrap {
  padding: 0;
  margin: 0 auto;
  max-width: 1200px;
}

.tec-single-event-wrap .tribe-events-before-html,
.tec-single-event-wrap .tribe-events-after-html,
.tec-single-event-wrap .tribe-events-ajax-loading,
.tribe-events-pg-template > *:not(#tribe-events-content) {
  display: none;
}

/* ============================================================
   VOLTAR AO CALENDÁRIO
   ============================================================ */
.tec-back-link {
  margin-bottom: 1.5rem;
}

.tec-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tec-color-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.tec-back-link a:hover {
  gap: 10px;
  text-decoration: underline;
}

/* ============================================================
   CABEÇALHO DO EVENTO (sempre exibido, com ou sem imagem)
   ============================================================ */
.tec-event-header {
  background: linear-gradient(
    135deg,
    var(--tec-color-primary) 0%,
    #00205b 100%
  );
  border-radius: var(--tec-radius);
  margin-bottom: 0;
  overflow: hidden;
  position: relative;
}

/* Detalhe decorativo */
.tec-event-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle at 100% 100%,
    rgba(232, 39, 30, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.tec-event-header__inner {
  padding: 2.5rem 3rem;
  color: #fff;
  position: relative;
  z-index: 1;
}

.tec-event-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.tec-event-header__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 1.25rem;
  line-height: 1.2;
}

.tec-event-header__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 100px;
}

.tec-header-time {
  opacity: 0.7;
  font-size: 0.875em;
}

.tec-date-sep {
  color: #ff9b97;
  font-weight: 700;
}

/* ============================================================
   IMAGEM DE DESTAQUE — container próprio na sidebar
   ============================================================ */
.tec-event-image-card {
  border-radius: var(--tec-radius);
  overflow: hidden;
  height: 380px;
  box-shadow: var(--tec-shadow);
  line-height: 0;
}

.tec-event-image-card .tribe-events-event-image {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.tec-event-image-card img,
.tec-event-image-card .tribe-events-event-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0;
  padding: 0;
  transition: transform 0.4s ease;
}

.tec-event-image-card:hover img,
.tec-event-image-card:hover .tribe-events-event-image img {
  transform: scale(1.04);
}

/* ============================================================
   LAYOUT: CORPO DO EVENTO (2 colunas)
   ============================================================ */
.tec-event-header {
  margin-bottom: 2.5rem;
}

.tec-event-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

/* ============================================================
   CONTEÚDO DO EVENTO
   ============================================================ */
.tec-event-description {
  color: var(--tec-color-text);
  font-size: 1rem;
  line-height: 1.75;
}

.tec-event-description p {
  margin-bottom: 1.25em;
}

.tec-event-description h2,
.tec-event-description h3,
.tec-event-description h4 {
  color: var(--tec-color-primary);
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.tec-event-description a {
  color: var(--tec-color-primary);
  text-decoration: underline;
}

.tec-event-description img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ============================================================
   CARD DE META (SIDEBAR)
   ============================================================ */
.tec-event-meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.tec-event-meta-card {
  background: var(--tec-color-bg-meta);
  border: 1px solid var(--tec-color-border);
  border-radius: var(--tec-radius);
  overflow: hidden;
  box-shadow: var(--tec-shadow);
}

.tec-meta-section {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--tec-color-border);
}

.tec-meta-section:last-child {
  border-bottom: none;
}

.tec-meta-section--subscribe {
  padding: 0;
}

.tec-meta-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tec-color-primary);
  color: #fff;
  border-radius: 8px;
  margin-top: 2px;
}

.tec-meta-icon svg {
  width: 18px;
  height: 18px;
}

.tec-meta-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.tec-meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tec-color-muted);
}

.tec-meta-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tec-color-text);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tec-meta-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tec-meta-time {
  font-weight: 400;
  color: var(--tec-color-muted);
  font-size: 0.875rem;
}

.tec-meta-address {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--tec-color-muted);
  margin-top: 2px;
}

/* ============================================================
   "ADICIONAR AO CALENDÁRIO" - no final da coluna de conteúdo
   ============================================================ */
.tec-event-content-col .tribe-events.tribe-common {
  margin-top: 2rem;
  border-top: 1px solid var(--tec-color-border);
  padding-top: 1.5rem;
}

.tec-event-content-col .tribe-events-c-subscribe-dropdown {
  display: inline-flex;
  flex-direction: column;
}

.tec-event-content-col .tribe-common-c-btn-border {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--tec-color-primary);
  border-radius: 6px;
  padding: 0.625rem 1.25rem;
  background: transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.tec-event-content-col .tribe-common-c-btn-border:hover {
  background: var(--tec-color-primary);
}

.tec-event-content-col .tribe-common-c-btn-border:hover svg path,
.tec-event-content-col .tribe-common-c-btn-border:hover svg line,
.tec-event-content-col .tribe-common-c-btn-border:hover svg polyline {
  stroke: #fff;
}

.tec-event-content-col .tribe-events-c-subscribe-dropdown__button-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tec-color-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.tec-event-content-col
  .tribe-common-c-btn-border:hover
  .tribe-events-c-subscribe-dropdown__button-text {
  color: #fff;
}

.tec-event-content-col .tribe-common-c-svgicon--cal-export {
  color: var(--tec-color-primary);
  width: 18px;
  height: 18px;
}

.tec-event-content-col
  .tribe-common-c-btn-border:hover
  .tribe-common-c-svgicon--cal-export {
  color: #fff;
}

.tec-event-content-col .tribe-common-c-svgicon--caret-down {
  color: var(--tec-color-muted);
  width: 12px;
  height: 12px;
}

.tec-event-content-col .tribe-events-c-subscribe-dropdown__content {
  margin-top: 4px;
  border: 1px solid var(--tec-color-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: none;
  min-width: 200px;
}

.tec-event-content-col
  .tribe-events-c-subscribe-dropdown__content[style*="block"],
.tec-event-content-col
  .tribe-events-c-subscribe-dropdown__content.tribe-events-c-subscribe-dropdown--is-open {
  display: block;
}

.tec-event-content-col .tribe-events-c-subscribe-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.tec-event-content-col .tribe-events-c-subscribe-dropdown__list-item-link {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--tec-color-text);
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.tec-event-content-col
  .tribe-events-c-subscribe-dropdown__list-item-link:hover {
  background: var(--tec-color-bg-meta);
  color: var(--tec-color-primary);
}

/* ============================================================
   SEÇÃO DE META PADRÃO (fallback - hidden quando sidebar ativa)
   ============================================================ */
.tribe-events-event-meta.primary.tribe-clearfix,
.tribe-events-event-meta.secondary.tribe-clearfix {
  display: none !important;
}

/* ============================================================
   MAPA
   ============================================================ */
.tec-event-map {
  border-radius: var(--tec-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--tec-shadow);
}

.tec-event-map iframe,
.tec-event-map .tribe-events-map-container {
  width: 100%;
  min-height: 300px;
  border: none;
}

/* ============================================================
   NAVEGAÇÃO ENTRE EVENTOS
   ============================================================ */
.tec-events-nav {
  border-top: 1px solid var(--tec-color-border);
  padding-top: 1.5rem;
}

.tec-events-nav .tribe-events-sub-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.tec-events-nav .tribe-events-nav-previous a,
.tec-events-nav .tribe-events-nav-next a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tec-color-primary);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: gap 0.2s ease;
}

.tec-events-nav .tribe-events-nav-previous a:hover {
  gap: 10px;
}

.tec-events-nav .tribe-events-nav-next a:hover {
  gap: 10px;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
  .tec-event-body {
    grid-template-columns: 1fr;
  }

  .tec-event-meta-col {
    order: -1;
  }

  .tec-event-meta-card {
    position: static;
  }

  .tec-event-header {
    border-radius: var(--tec-radius);
  }

  .tec-event-header__inner {
    padding: 1.75rem 1.5rem;
  }

  /* Em mobile, a imagem no card fica um pouco menor */
  .tec-event-image-card,
  .tec-event-image-card img,
  .tec-event-image-card .tribe-events-event-image img {
    height: 200px;
  }
}

@media (max-width: 600px) {
  .tec-event-header__title {
    font-size: 1.5rem;
  }

  /* Em telas pequenas, a imagem usa proporção natural sem altura fixa */
  .tec-event-image-card,
  .tec-event-image-card img,
  .tec-event-image-card .tribe-events-event-image img {
    height: 180px;
  }

  .tec-events-nav .tribe-events-sub-nav {
    flex-direction: column;
    gap: 0.75rem;
  }
}
