/**
 * Event Integration - Frontend Styles
 *
 * Styling for single event display and event archives
 *
 * @package StJosephs\EventIntegration
 */

/* ===================
   Single Event Display
   =================== */

.event-single .event-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.event-header {
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 20px;
}

.event-title {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #333;
}

/* Event Badges */
.event-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  margin-right: 8px;
  margin-bottom: 10px;
}

.event-featured {
  background-color: #ffd700;
  color: #333;
}

.event-status-cancelled {
  background-color: #dc3545;
  color: #fff;
}

.event-status-postponed {
  background-color: #ffc107;
  color: #333;
}

/* Event Types */
.event-types {
  margin-top: 10px;
}

.event-type-badge {
  display: inline-block;
  padding: 4px 10px;
  background-color: #007cba;
  color: #fff;
  border-radius: 3px;
  font-size: 0.9em;
  margin-right: 5px;
}

/* Event Meta Box */
.event-meta-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.event-meta-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.event-meta-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.event-meta-icon {
  font-size: 1.5em;
  margin-right: 15px;
  flex-shrink: 0;
}

.event-meta-content {
  flex: 1;
}

.event-meta-content strong {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-size: 0.95em;
}

.event-date-text,
.event-location-text,
.event-cost-text,
.event-recurrence-text {
  font-size: 1.1em;
  color: #333;
}

/* Recurrence Occurrences List */
.event-occurrences {
  margin-top: 15px;
  padding: 15px;
  background-color: #fff;
  border-radius: 4px;
}

.event-occurrences strong {
  display: block;
  margin-bottom: 10px;
  color: #333;
}

.event-occurrences ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.event-occurrences li {
  margin-bottom: 5px;
  color: #666;
}

/* Cost Notes */
.event-cost-notes {
  margin-top: 6px;
  font-size: 0.95em;
  color: #666;
  font-style: italic;
}

/* Contact Info */
.event-contact-info {
  line-height: 1.6;
}

.event-contact-info a {
  color: #007cba;
  text-decoration: none;
}

.event-contact-info a:hover {
  text-decoration: underline;
}

/* Event Content */
.event-content {
  font-size: 1.1em;
  line-height: 1.8;
  color: #444;
  margin-bottom: 30px;
}

.event-content p {
  margin-bottom: 1em;
}

.event-content h2,
.event-content h3,
.event-content h4 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

/* Event Footer */
.event-footer {
  border-top: 1px solid #e0e0e0;
  padding-top: 15px;
  text-align: right;
}

.event-footer .edit-link a {
  color: #666;
  font-size: 0.9em;
  text-decoration: none;
}

.event-footer .edit-link a:hover {
  color: #007cba;
  text-decoration: underline;
}

/* ===================
   Responsive Design
   =================== */

@media (max-width: 768px) {
  .event-single .event-article {
    padding: 15px;
  }

  .event-title {
    font-size: 2em;
  }

  .event-meta-box {
    padding: 15px;
  }

  .event-meta-item {
    flex-direction: column;
  }

  .event-meta-icon {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .event-title {
    font-size: 1.5em;
  }

  .event-badge {
    font-size: 0.75em;
    padding: 4px 8px;
  }

  .event-type-badge {
    font-size: 0.8em;
  }
}

/* ===================
   Event Archive & List
   =================== */

.event-archive .page-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.event-archive .page-title {
  font-size: 2.5em;
  color: #333;
  margin-bottom: 15px;
}

/* Event Filters */
.event-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.filter-label {
  font-weight: 600;
  color: #666;
}

.filter-link {
  padding: 6px 15px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.filter-link:hover {
  background-color: #007cba;
  color: #fff;
}

.filter-link.active {
  background-color: #007cba;
  color: #fff;
  font-weight: 600;
}

/* Events List */
.events-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 30px;
}

@media (min-width: 768px) {
  .events-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .events-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Event Card */
.event-card {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.event-card-header {
  padding: 10px 15px;
  background-color: #f8f9fa;
  min-height: 40px;
}

.event-badge-small {
  font-size: 0.75em;
  padding: 3px 8px;
}

.event-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-card-title {
  font-size: 1.3em;
  margin: 0 0 10px 0;
}

.event-card-title a {
  color: #333;
  text-decoration: none;
}

.event-card-title a:hover {
  color: #007cba;
}

/* Event Types (Compact) */
.event-types-compact {
  margin-bottom: 15px;
}

.event-type-tag {
  display: inline-block;
  padding: 3px 8px;
  background-color: #007cba;
  color: #fff;
  border-radius: 3px;
  font-size: 0.8em;
  margin-right: 5px;
}

/* Event Card Meta */
.event-card-meta {
  margin-bottom: 15px;
}

.event-meta-line {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #666;
}

.event-meta-line:last-child {
  margin-bottom: 0;
}

.event-icon {
  margin-right: 8px;
  flex-shrink: 0;
}

.event-recurrence-line {
  font-style: italic;
}

/* Event Card Excerpt */
.event-card-excerpt {
  flex: 1;
  margin-bottom: 15px;
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
}

.event-card-excerpt p {
  margin-bottom: 0.5em;
}

/* Event Card Link */
.event-card-link {
  display: inline-block;
  color: #007cba;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9em;
  margin-top: auto;
}

.event-card-link:hover {
  text-decoration: underline;
}

/* Compact Event Card (for shortcode) */
.event-card-compact {
  max-width: 100%;
}

.event-card-compact .event-card-title {
  font-size: 1.1em;
}

.event-card-compact .event-card-excerpt {
  display: none;
}

/* No Events Message */
.no-events {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 1.1em;
}

.no-upcoming-events {
  text-align: center;
  padding: 30px;
  color: #666;
  background-color: #f8f9fa;
  border-radius: 4px;
}

/* Pagination */
.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination .current {
  padding: 8px 15px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

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

.pagination .current {
  background-color: #007cba;
  color: #fff;
  font-weight: 600;
}

/* Shortcode Container */
.upcoming-events-shortcode {
  margin: 20px 0;
}

.events-list-shortcode {
  gap: 15px;
}

/* Responsive adjustments for archive */
@media (max-width: 768px) {
  .event-archive .page-title {
    font-size: 2em;
  }

  .event-filters {
    gap: 8px;
  }

  .filter-link {
    font-size: 0.85em;
    padding: 5px 12px;
  }

  .events-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .event-archive .page-title {
    font-size: 1.5em;
  }

  .event-card-content {
    padding: 15px;
  }

  .event-card-title {
    font-size: 1.1em;
  }
}
