/* =========================================================
   REPLAYSTORYTELLING — SINGLE EVENTS (Story Fest Style)
   File: /wp-content/themes/blocksy-child/assets/css/single-events.css
   
   Creates ONE bordered box containing all event content
   ========================================================= */


/* =========================================================
   01) HIDE TEC DEFAULTS
   ========================================================= */

.single-tribe_events .tribe-events-back,
.single-tribe_events p.tribe-events-back,
.single-tribe_events .tribe-events-single-event-title,
.single-tribe_events h1.tribe-events-single-event-title,
.single-tribe_events .tribe-events-schedule,
.single-tribe_events p.tribe-events-schedule__datetime,
.single-tribe_events #tribe-events-footer {
  display: none !important;
}


/* =========================================================
   02) CREATE ONE UNIFIED BOX - Story Fest Style
   Wraps the custom header AND content that follows
   ========================================================= */

/* Main content wrapper - this should catch everything */
.single-tribe_events #tribe-events-content {
  max-width: 860px;
  margin: 2rem auto;
  padding: 2rem;
  
  /* Story Fest bordered card style */
  border: 1px solid #333333;
  box-shadow: 5px 5px 0 #333333;
  background: #fff;
}

/* Also target alternative wrapper if it exists */
.single-tribe_events article.tribe-events-single,
.single-tribe_events .tribe-events-single {
  max-width: 860px;
  margin: 2rem auto;
  padding: 2rem;
  
  /* Story Fest bordered card style */
  border: 1px solid #333333;
  box-shadow: 5px 5px 0 #333333;
  background: #fff;
}

/* Remove any conflicting styles from inner wrapper */
.single-tribe_events .replay-single-event-v2 {
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 2rem 0 !important; /* spacing after header section */
  background: transparent !important;
  max-width: none !important;
}


/* =========================================================
   03) FEATURED IMAGE - Extends to card edges, no border radius
   ========================================================= */

.single-tribe_events .replay-single-event-featured-image {
  margin: -2rem -2rem 1.5rem -2rem !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

.single-tribe_events .replay-single-event-featured-image img {
  display: block;
  width: 100%;
  height: auto !important;
  border-radius: 0 !important;
}


/* =========================================================
   04) CUSTOM HEADER - Title, Date, Time, Venue
   ========================================================= */

.single-tribe_events .replay-single-event-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Title - Centered, Story Fest size */
.single-tribe_events .replay-single-event-title {
  margin: 0 0 0.5rem 0 !important;
  padding: 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  color: var(--theme-text-color, #111);
}

/* Meta rows (date, time, venue) */
.single-tribe_events .replay-single-event-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  line-height: 1.25 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--theme-text-color, #111);
}

.single-tribe_events .replay-single-event-meta--date {
  font-weight: 600;
  opacity: 0.95;
}

.single-tribe_events .replay-single-event-meta--time {
  font-weight: 400;
  opacity: 0.9;
}

.single-tribe_events .replay-single-event-meta--venue {
  font-weight: 400;
  opacity: 0.9;
}


/* =========================================================
   05) ICONS - Using SVG masks
   ========================================================= */

.single-tribe_events .replay-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-block;
  background-color: currentColor;
  opacity: 0.95;
}

.single-tribe_events .replay-icon--calendar {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1.5A2.5 2.5 0 0 1 22 6.5v14A2.5 2.5 0 0 1 19.5 23h-15A2.5 2.5 0 0 1 2 20.5v-14A2.5 2.5 0 0 1 4.5 4H6V3a1 1 0 0 1 1-1Zm12.5 8H4.5v10.5c0 .28.22.5.5.5h14c.28 0 .5-.22.5-.5V10Zm0-3.5a.5.5 0 0 0-.5-.5H18v1a1 1 0 1 1-2 0V6H8v1a1 1 0 1 1-2 0V6H5a.5.5 0 0 0-.5.5V8h15V6.5Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1.5A2.5 2.5 0 0 1 22 6.5v14A2.5 2.5 0 0 1 19.5 23h-15A2.5 2.5 0 0 1 2 20.5v-14A2.5 2.5 0 0 1 4.5 4H6V3a1 1 0 0 1 1-1Zm12.5 8H4.5v10.5c0 .28.22.5.5.5h14c.28 0 .5-.22.5-.5V10Zm0-3.5a.5.5 0 0 0-.5-.5H18v1a1 1 0 1 1-2 0V6H8v1a1 1 0 1 1-2 0V6H5a.5.5 0 0 0-.5.5V8h15V6.5Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.single-tribe_events .replay-icon--clock {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm1 3a1 1 0 0 1 1 1v3.59l2.2 2.2a1 1 0 1 1-1.4 1.42l-2.5-2.5A1 1 0 0 1 12 12V8a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm1 3a1 1 0 0 1 1 1v3.59l2.2 2.2a1 1 0 1 1-1.4 1.42l-2.5-2.5A1 1 0 0 1 12 12V8a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.single-tribe_events .replay-icon--pin {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 1 7 7c0 5.25-7 13-7 13S5 14.25 5 9a7 7 0 0 1 7-7Zm0 9.5A2.5 2.5 0 1 0 12 6.5a2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 1 7 7c0 5.25-7 13-7 13S5 14.25 5 9a7 7 0 0 1 7-7Zm0 9.5A2.5 2.5 0 1 0 12 6.5a2.5 2.5 0 0 0 0 5Z'/%3E%3C/svg%3E") no-repeat center / contain;
}


/* =========================================================
   06) VENUE NAME & ADDRESS STYLING
   ========================================================= */

.single-tribe_events .replay-single-event-venue-name {
  font-weight: 600 !important;
}

.single-tribe_events .replay-single-event-venue-sep {
  white-space: nowrap;
}

.single-tribe_events .replay-single-event-venue-address {
  font-weight: 400 !important;
}


/* =========================================================
   07) EVENT DESCRIPTION - Inside the card, proper spacing
   ========================================================= */

.single-tribe_events .tribe-events-single-event-description,
.single-tribe_events .entry-content {
  margin: 1.5rem 0 !important;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--theme-text-color, #111);
}

.single-tribe_events .tribe-events-single-event-description p,
.single-tribe_events .entry-content p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.single-tribe_events .tribe-events-single-event-description p:last-child,
.single-tribe_events .entry-content p:last-child {
  margin-bottom: 0;
}

/* Remove any default margins from content blocks */
.single-tribe_events .tribe-blocks,
.single-tribe_events .tribe-block {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* =========================================================
   08) BUY TICKETS BUTTON - Story Fest style, centered
   ========================================================= */

.single-tribe_events .tribe-block__event-website {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 !important;
  max-width: none !important;
}

.single-tribe_events .tribe-block__event-website a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  
  padding: 0.75rem 2rem !important;
  margin: 0 !important;
  
  /* Story Fest button style */
  border-radius: 0 !important;
  background: var(--theme-palette-color-1, #111) !important;
  border: 1px solid #333333 !important;
  box-shadow: 5px 5px 0 #333333 !important;
  color: #ffffff !important;
  
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
  text-decoration: none !important;
  
  min-height: 48px !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease !important;
}

.single-tribe_events .tribe-block__event-website a:hover,
.single-tribe_events .tribe-block__event-website a:focus {
  background: var(--theme-palette-color-2, #333) !important;
  border-color: #333333 !important;
  box-shadow: 7px 7px 0 #333333 !important;
  color: #ffffff !important;
}

.single-tribe_events .tribe-block__event-website a:active {
  transform: translateY(1px);
}

.single-tribe_events .tribe-block__event-website a:focus-visible {
  outline: 2px solid var(--theme-palette-color-1, #111);
  outline-offset: 3px;
}


/* =========================================================
   09) VENUE BLOCK - SQUARE corners (Story Fest style)
   ========================================================= */

.single-tribe_events .tribe-block__venue {
  margin: 1.5rem 0 !important;
  border-radius: 0 !important;  /* SQUARE - not rounded */
  overflow: hidden !important;
  background: #faf7e8 !important;  /* Warm cream background */
  border: 1px solid #333 !important;
  box-shadow: 5px 5px 0 #333 !important;
  max-width: none !important;
}

.single-tribe_events .tribe-block__venue__meta {
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
}

.single-tribe_events .tribe-block__venue__map,
.single-tribe_events .tribe-block__venue__map iframe {
  border-radius: 0 !important;
  display: block;
  width: 100%;
  border: 0;
}

/* Venue text styling */
.single-tribe_events .tribe-block__venue,
.single-tribe_events .tribe-block__venue * {
  color: var(--theme-text-color, #111) !important;
  opacity: 0.9;
  font-family: inherit;
}

.single-tribe_events .tribe-block__venue__name h3 {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  margin: 0 0 0.25rem 0 !important;
}

.single-tribe_events .tribe-block__venue__address,
.single-tribe_events .tribe-block__venue__address * {
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  line-height: 1.35;
  opacity: 0.85;
}

.single-tribe_events .tribe-events-gmap {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--theme-link-initial-color, inherit);
  opacity: 0.85;
}

.single-tribe_events .tribe-events-gmap:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Venue + Map generic block - SQUARE bordered card (Story Fest style) */
.single-tribe_events .tribe-events-single-section {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid #333;
  border-radius: 0 !important;
  box-shadow: 5px 5px 0 #333;
  background: #fff;
}


/* =========================================================
   10) ADD TO CALENDAR BUTTON - Story Fest style, centered
   ========================================================= */

.single-tribe_events .tribe-events-cal-links {
  margin: 1.5rem 0 0 0 !important;
  display: flex;
  justify-content: center;
}

.single-tribe_events .tribe-events-cal-links a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  
  padding: 0.75rem 2rem !important;
  margin: 0 !important;
  
  /* Story Fest button style */
  border-radius: 0 !important;
  background: var(--theme-palette-color-1, #111) !important;
  border: 1px solid #333333 !important;
  box-shadow: 5px 5px 0 #333333 !important;
  color: #ffffff !important;
  
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
  text-decoration: none !important;
  
  min-height: 48px !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease !important;
}

.single-tribe_events .tribe-events-cal-links a:hover,
.single-tribe_events .tribe-events-cal-links a:focus {
  background: var(--theme-palette-color-2, #333) !important;
  border-color: #333333 !important;
  box-shadow: 7px 7px 0 #333333 !important;
  color: #ffffff !important;
}

.single-tribe_events .tribe-events-cal-links a:active {
  transform: translateY(1px);
}

.single-tribe_events .tribe-events-cal-links a:focus-visible {
  outline: 2px solid var(--theme-palette-color-1, #111);
  outline-offset: 3px;
}

/* Add to Calendar dropdown button - Story Fest style */
.single-tribe_events .tribe-events-c-subscribe-dropdown {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* Target the wrapper div that acts as the button */
.single-tribe_events .tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  
  padding: 0.75rem 2rem !important;
  margin: 0 !important;
  
  /* Story Fest button style - SAME AS BUY TICKETS (orange background) */
  border-radius: 0 !important;
  background: var(--theme-palette-color-1, #111) !important;
  border: 1px solid #333333 !important;
  box-shadow: 5px 5px 0 #333333 !important;
  color: #ffffff !important;
  
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  line-height: 1 !important;
  
  min-height: 48px !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease !important;
}

.single-tribe_events .tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button:hover,
.single-tribe_events .tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button:focus-within {
  background: var(--theme-palette-color-2, #333) !important;
  border-color: #333333 !important;
  box-shadow: 7px 7px 0 #333333 !important;
  color: #ffffff !important;
}

.single-tribe_events .tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button:active {
  transform: translateY(1px) !important;
}

/* The actual button element inside */
.single-tribe_events .tribe-events-c-subscribe-dropdown__button-text {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: inherit !important;
  cursor: pointer !important;
  font-family: inherit !important;
}

/* Icons - ensure they're white on orange background */
.single-tribe_events .tribe-events-c-subscribe-dropdown__export-icon,
.single-tribe_events .tribe-events-c-subscribe-dropdown__button-icon {
  flex-shrink: 0 !important;
}

.single-tribe_events .tribe-events-c-subscribe-dropdown__export-icon {
  width: 18px !important;
  height: 18px !important;
}

.single-tribe_events .tribe-events-c-subscribe-dropdown__button-icon {
  width: 10px !important;
  height: 10px !important;
}

/* Make sure icons are white on the orange button */
.single-tribe_events .tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button svg,
.single-tribe_events .tribe-common-c-btn-border.tribe-events-c-subscribe-dropdown__button svg path {
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Subscribe dropdown content styling */
.single-tribe_events .tribe-events-c-subscribe-dropdown__content {
  border: 1px solid #333 !important;
  border-radius: 0 !important;
  box-shadow: 5px 5px 0 #333 !important;
  margin-top: 0.5rem !important;
  background: #fff !important;
}


/* =========================================================
   11) MOBILE RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .single-tribe_events #tribe-events-content,
  .single-tribe_events article.tribe-events-single,
  .single-tribe_events .tribe-events-single {
    padding: 1.5rem;
    margin: 1.5rem 1rem;
  }
  
  /* Featured image extends to mobile padding edges */
  .single-tribe_events .replay-single-event-featured-image {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem !important;
  }
  
  .single-tribe_events .replay-single-event-title {
    font-size: 1.5rem !important;
  }
  
  .single-tribe_events .tribe-block__event-website a,
  .single-tribe_events .tribe-events-cal-links a {
    width: 100%;
  }
  
  /* Hide venue separator, break address to new line */
  .single-tribe_events .replay-single-event-venue-sep {
    display: none;
  }
  
  .single-tribe_events .replay-single-event-venue-address {
    display: block;
  }
}