/*
Theme: Blocksy Child (Optimised for Sydney Stages)
Version: MNH Ver.25.06.12-2
*/

/* =====================
   1. GENERAL PAGE STYLES
   ===================== */
body {
  font-family: sans-serif;
  background-color: #fffaf0;
  margin: 0;
  padding: 0;
}

h4 {
  color: #5c2c2c;
  font-size: 1rem;
  line-height: 1.1;
  margin: 0;
}

.site-main.page-padding {
  padding: 1rem;
  max-width: 1200px;
  margin: auto;
}

/* Mapping: header.php â€” site title between logo and social icons */
.header-text {
  flex-grow: 1;
  text-align: center;
  font-size: clamp(1rem, 1.5vw, 3rem);
  font-weight: 500;
  color: #5c2c2c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.custom-header-bar {
  background-color: #fffaf0;
  padding: 1rem;
  border-bottom: 1px solid #eaeaea;
}

.custom-header-container {
  max-width: var(--show-grid-max-width, 1200px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-logo {
  height: 60px;
  width: auto;
}

.social-icons a {
  margin-left: 0.5rem;
  color: #861f41;
  text-decoration: none;
}
/* ---- SOCIAL ICONS HOVER STYLE ---- */
.social-icons a {
  color: #861f41;
  padding: 0.4rem;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.social-icons a:hover {
  background-color: #f3e2b9;
  color: #a82c5a;
}

/* ---- ADD SHOW LINK IN HEADER ---- */
.add-show-link {
  display: inline-block;
  font-size: 0.85rem;         /* Adjust size here */
  line-height: 1.1;
  color: #861f41;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.4rem;     /* Adjust padding as needed */
  border-radius: 4px;
  transition: color 0.3s ease, background-color 0.3s ease;
  white-space: nowrap;
}

.add-show-link:hover {
  color: #a82c5a;
  background-color: #f3e2b9;
}
.social-icons a.add-show-link {
  margin-left: 0.5rem;
  align-self: center; /* if flex context available */
}
/* ---- FILTER FORM FLEX GROUPS ---- */
/* Group left-side inputs */
.filter-inputs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  flex-grow: 1;
  min-width: 0;
}
.filter-group{
  min-width: 100px;   /* or whatever feels best visually */
  flex: 0 1 auto;      /* donâ€™t grow uncontrollably, allow shrink */
}
  
/* Group right-side actions */
.filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-width: 100px;   /* or whatever feels best visually */
  flex: 0 1 auto;      /* donâ€™t grow uncontrollably, allow shrink */
}
/* Mapping: filter-grid.php + archive-show.php â€” main filtering UI */
.show-filter-form form {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: flex-end;
  justify-content: space-between;
  background-color: #fffaf0;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  margin-bottom: 0.5rem;
}


.show-filter-form label {
  display: none;
}

.show-filter-form input,
.show-filter-form select {
  padding: 0.5rem;
  font-size: clamp(0.7rem, 1.5vw, 0.95rem);
  color: #861f41;
  border: 1px solid #b89e84;
  border-radius: 4px;
  width: 100%; /* keep full width on regular inputs/selects */
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Specifically target the Flatpickr-enhanced field */
.show-filter-form .flatpickr-input[readonly] {
  width: 100px;  /* or whatever max width works for your layout */
  min-width: 80px;
  max-width: 180px;
  flex: 0 0 auto;
}


.show-filter-form input#date-filter {
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 2h1V0h2v2h4V0h2v2h1a2 2 0 012 2v10a2 2 0 01-2 2H3a2 2 0 01-2-2V4a2 2 0 012-2zm0 2v10h10V4H3z"/></svg>') no-repeat right 0.5rem center;
  background-size: 1rem;
}

.show-filter-form > form > * {
  flex: 1;
}

.show-filter-form button {
  padding: 0.4rem 1.2rem;
  background-color: #861f41;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.2s ease;
}

.show-filter-form button:hover {
  background-color: #a82c5a; /* warmer tone from your existing palette */
}

.show-filter-form .reset-button {
  padding: 0.75rem 1.5rem;    /* top/bottom 0.75rem, left/right 1.5rem */
  font-size: clamp(0.7rem, 1.5vw, 0.95rem);           /* increase text size */
  line-height: 1.2;          /* tighter line height */
  min-width: 80px;          /* optional: ensure minimum clickable area */
  border-radius: 4px;        /* match your other buttons */
}

.show-filter-form button.loading::after {
  content: '\f110';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: 0.5rem;
  animation: spin 1s linear infinite;
}

.filter-error {
  color: #861f41;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =====================
   4. SHOW GRID
   ===================== */
.show-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: #fffaf0;
  border-radius: 8px;
  max-width: var(--show-grid-max-width, 1200px);
  margin: 0 auto;
  justify-content: center;
  align-items: stretch;
  grid-auto-rows: 1fr;
  line-height: 0;
}

.show-grid.loading {
  opacity: 0.5;
}

/* =====================
   5. SHOW CARD
   ===================== */
.show-card {
  background: #f3e2b9;
  border: 1px solid #d5bfa3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: clamp(0.5rem, 2vw, 1rem);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  width: 100%;
}

.show-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* === Card Image === */
/* Mapping: show-card.php â€” image wrapper must use .show-thumbnail > img structure */
.show-thumbnail {
  flex: 1 0 auto;
  overflow: hidden;
  width: 100%;
}

.show-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === Badge Overlay === */
.show-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #861f41;
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.show-badge .event-type {
  font-weight: bold;
  display: block;
}

.show-badge .event-date {
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* === Card Text === */
.show-content {
  margin-top: auto;
  height: 60px
}

.show-title {
  font-size: clamp(0.65rem, 1.8vw, 0.8rem);
  font-weight: 600;
  color: #861f41;
  text-align: center;
  margin-bottom: 0;
}

.show-company,
.show-venue {
  font-style: italic;
  opacity: 0.85;
  color: #861f41;
  font-size: clamp(0.6rem, 2vw, 0.75rem);
  line-height: 1.1;
  text-align: center;
  margin: 4px 0 2px;
  font-weight: 400;
}

.show-venue {
  font-style: italic;
  opacity: 0.8;
}


.show-dates {
  font-size: clamp(0.55rem, 1.6vw, 0.7rem);
  color: #861f41;
  line-height: 1.1;
  text-align: center;
  margin: 4px 0 2px;
  font-weight: 400;
  white-space: nowrap;
}


.special-night {
  color: #861f41;
  font-size: clamp(0.6rem, 2vw, 0.75rem);
  line-height: 1.1;
  text-align: center;
  margin: 4px 0 2px;
  font-weight: 600;
}

.show-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.show-categories .category {
  background: #ddd;
  color: #861f41;
  font-size: clamp(0.5rem, 2vw, 0.65rem);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
}

/* =====================
   6. PAGINATION
   ===================== */

.pagination {
  background-color: #fffaf0;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  text-align: center;
  margin: 1rem auto;
  display: inline-block;
}

.pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 0.5rem;
}

.pagination a,
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  background-color: #fffaf0;
  color:     #a82c5a;
  border:    none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pagination a:hover {
  background-color: #a82c5a;
  color:           #fff;
}

.pagination .current {
  background-color: #861f41;
  color:            #fff;
  cursor:           default;
}
/* Make the pagination wrapper full-width and center its contents */
nav.pagination {
  display: block;              /* full-width block */
  width: 100%;                 /* ensure it spans its container */
  margin: 2rem 0;              /* vertical spacing */
  text-align: center;          /* center the inline <ul> */
}

/* Keep your UL inline and shrink-wrapped */
nav.pagination ul {
  display: inline-flex;        /* shrink-wrap width, behave like inline */
  gap: 0.5rem;                 /* spacing between items */
  list-style: none;
  margin: 0;
  padding: 0;
}
/* =====================
   7. REDIRECT PAGE
   ===================== */
.redirect-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 600px;
  margin: 100px auto;
}

.redirect-container h1 {
  font-size: 1.5rem;
}

.redirect-container p {
  font-size: 1rem;
}

/* =====================
   8. RESPONSIVE
   ===================== */
@media (max-width: 650px) {
  .show-filter-form label {
    display: none;
  }
    
    .header-text {
        display: none;
    }
}



/* Responsive font scaling */
.show-filter-form select,
.show-filter-form .flatpickr-input[readonly] {
  font-size: clamp(0.6rem, 1.8vw, 0.9rem);
  font-family: inherit;
  font-weight: 600;
  color: #861f41;
  opacity: 1;
  font-stretch: normal;
}

.show-filter-form .flatpickr-input[readonly]::placeholder {
  color: #861f41;
  opacity: 1;
  font-family: inherit;
  font-weight: 600;
  font-stretch: normal;
}

.show-filter-form input:focus,
.show-filter-form select:focus,
.flatpickr-input[readonly]:focus {
  border-color: #861f41;
  box-shadow: 0 0 0 2px rgba(134, 31, 65, 0.15);
}

/* Mapping: scripts.js + Flatpickr â€” calendar popup for #date-filter */
.flatpickr-calendar {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 3px 13px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  line-height: 24px;
  padding: 0.5rem;
  z-index: 99999;
}

.flatpickr-day {
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  cursor: pointer;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background-color: #861f41;
  color: #fff;
  border: none;
}

.flatpickr-day.today {
  border-color: #861f41;
}

.flatpickr-day:hover {
  background-color: #f3e2b9;
}

.flatpickr-months .flatpickr-month {
  font-weight: bold;
  color: #861f41;
}

.flatpickr-weekday {
  color: #5c2c2c;
  font-weight: 600;
  font-size: 0.75rem;
}
