/**
 * Location Filter Plugin Styles
 *
 * @format
 */

:root {
  /* --primary-color: #1b365f; This is your standard color */
  --primary-color: linear-gradient(
    36deg,
    rgba(127, 86, 77, 0.78) 1%,
    #1b365f 27%,
    #a8866b 79%,
    #c15d22 100%
  ); /* This is your standard color */
}

.lfp-location-select-wrapper {
  margin-bottom: 20px;
  position: relative;
}

.lfp-location-select {
  padding: 10px 15px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  transition: border-color 0.3s ease;
  min-width: 200px;
}

.lfp-location-select:hover,
.lfp-location-select:focus {
  border-color: #0073aa;
  outline: none;
}

.lfp-loading {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #666;
}

.lfp-posts-container {
  transition: opacity 0.3s ease;
}

.lfp-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.lfp-post-item {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.lfp-post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.lfp-post-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lfp-post-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  line-height: 1.4;
}

.lfp-post-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.lfp-post-title a:hover {
  color: #0073aa;
}

.lfp-post-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.lfp-post-type {
  display: inline-block;
  background: #0073aa;
  color: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
  align-self: flex-start;
}

.lfp-post-location {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.location-icon {
  margin-right: 5px;
}

.lfp-post-excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.lfp-read-more {
  color: #0073aa;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.lfp-read-more:hover {
  color: #005177;
  text-decoration: underline;
}

.lfp-no-posts {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-style: italic;
}

/* Post-specific styling */
.lfp-post {
  position: relative;
}

.lfp-post-location-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  color: #666;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 2;
  display: flex;
  align-items: center;
}

.lfp-post-image {
  margin: -20px -20px 15px -20px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.lfp-post-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lfp-post-image:hover .lfp-post-thumbnail {
  transform: scale(1.05);
}

.lfp-post-text {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lfp-post .lfp-post-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  font-weight: normal;
}

.lfp-post-read-more {
  color: #0073aa;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start;
  margin-top: auto;
}

.lfp-post-read-more:hover {
  color: #005177;
  text-decoration: underline;
}

/* Event-specific styling */
.lfp-mec-events {
  border-left: 4px solid var(--primary-color);
  position: relative;
}

.lfp-event-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.lfp-event-image {
  position: relative;
  margin: -20px -20px 15px -20px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.lfp-event-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lfp-event-image:hover .lfp-event-thumbnail {
  transform: scale(1.05);
}

.lfp-event-overlay {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  z-index: 2;
}

.lfp-event-text {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-grow: 1;
}

.lfp-event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.lfp-event-date {
  display: flex;
  background: #1b365f;
  align-items: flex-start;
  color: white;
  padding: 10px 14px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  gap: 8px;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  align-items: center;
}

.lfp-event-date-icon {
  font-size: 16px;
  margin-top: 1px;
}

.lfp-event-datetime {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lfp-event-date-text {
  line-height: 1.2;
}

.lfp-event-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: normal;
  opacity: 0.9;
}

.lfp-event-time-icon {
  font-size: 12px;
}

.lfp-event-location {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #333;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 10px;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.lfp-event-title {
  margin: 0 0 15px 0;
  font-size: 20px;
  line-height: 1.3;
}

.lfp-event-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.lfp-event-title a:hover {
  color: var(--primary-color);
}

.lfp-event-excerpt {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.lfp-event-read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  align-self: flex-start;
}

.lfp-event-read-more:hover {
  color: #c0392b;
  text-decoration: underline;
}

/* List View Styling */
.lfp-style-list .lfp-posts-grid {
  display: none;
}

/* Compact View Styling */
.lfp-style-compact .lfp-posts-grid,
.lfp-style-compact .lfp-posts-list {
  display: none;
}

.lfp-posts-compact {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.lfp-compact-month-group {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lfp-compact-month-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #333;
  margin: 0;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid #e1e1e1;
  text-align: center;
  text-transform: capitalize;
}

/* Search input styling */
.lfp-compact-search-wrapper {
  position: relative;
  padding: 15px 20px 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #e1e1e1;
}

/* Global search styling */
.lfp-compact-search-wrapper.lfp-compact-global-search {
  padding: 20px;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lfp-compact-search {
  width: 100%;
  padding: 10px 40px 10px 15px !important;
  border: 2px solid #e1e1e1;
  border-radius: 25px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.lfp-compact-search:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.lfp-compact-search-icon {
  position: absolute;
  right: 35px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #666;
  pointer-events: none;
}

/* No results message */
.lfp-compact-no-results {
  padding: 30px 20px;
  text-align: center;
  color: #666;
  font-style: italic;
  background: #fafbfc;
  border-bottom: 1px solid #f0f0f0;
}

/* Global no results message */
.lfp-compact-global-no-results {
  padding: 40px 20px;
  text-align: center;
  color: #666;
  font-style: italic;
  background: #fafbfc;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 16px;
}

.lfp-compact-header {
  display: grid;
  grid-template-columns: 110px 90px 1fr 90px 120px;
  gap: 15px;
  padding: 12px 20px;
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 13px;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lfp-compact-row {
  display: grid;
  grid-template-columns: 110px 90px 1fr 90px 120px;
  gap: 15px;
  padding: 8px 20px;
  align-items: center;
  transition: background-color 0.2s ease;
  min-height: 40px;
}

.lfp-compact-row:last-child {
  border-bottom: 1px solid #f0f0f0;
}

.lfp-compact-row:hover {
  background-color: #f8f9fa;
}

.lfp-compact-row.lfp-compact-mec-events {
  border-left: 4px solid var(--primary-color);
  padding-left: 16px;
}

/* Add divider between date groups */
.lfp-compact-row.lfp-compact-first-in-date {
  border-top: 1px solid #e1e1e1;
  padding-top: 12px;
  margin-top: 4px;
}

.lfp-compact-row.lfp-compact-first-in-date:first-of-type {
  border-top: none;
  padding-top: 8px;
  margin-top: 0;
}

/* Date Column */
.lfp-compact-col-date {
  text-align: center;
}

.lfp-compact-date-full {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  line-height: 1.2;
  white-space: nowrap;
}

/* Time Column */
.lfp-compact-col-time {
  text-align: center;
  font-size: 13px;
}

.lfp-compact-time {
  font-weight: 600;
  color: #333;
  line-height: 1.2;
  white-space: nowrap;
}

.lfp-compact-time-allday {
  font-weight: 500;
  color: #0073aa;
  line-height: 1.2;
  white-space: nowrap;
  font-style: italic;
}

.lfp-compact-time-none {
  color: #999;
  font-size: 14px;
}

/* Title Column */
.lfp-compact-col-title {
  min-width: 0;
}

.lfp-compact-title {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  display: block;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfp-compact-title:hover {
  color: #0073aa;
}

.lfp-compact-mec-events .lfp-compact-title:hover {
  color: var(--primary-color);
}

/* Tickets Column */
.lfp-compact-col-tickets {
  text-align: center;
  font-size: 12px;
}

.lfp-compact-tickets-available {
  color: #155724;
  font-weight: 600;
}

.lfp-compact-tickets-few {
  color: #856404;
  font-weight: 600;
}

.lfp-compact-tickets-sold-out {
  color: #721c24;
  font-weight: 600;
  text-transform: uppercase;
}

.lfp-compact-tickets-none {
  color: #999;
  font-size: 14px;
}

/* Location Column */
.lfp-compact-col-location {
  font-size: 13px;
  text-align: right;
}

.lfp-compact-location {
  color: #666;
  font-weight: 500;
}

.lfp-compact-location-none {
  color: #999;
  font-size: 14px;
}

.lfp-posts-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.lfp-month-group {
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lfp-month-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #333;
  margin: 0;
  padding: 15px 20px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid #e1e1e1;
  text-align: center;
  text-transform: capitalize;
}

.lfp-date-group {
  border-bottom: 1px solid #f5f5f5;
}

.lfp-date-group:last-child {
  border-bottom: none;
}

.lfp-date-header {
  background: #fafbfc;
  color: #495057;
  margin: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #e9ecef;
  text-transform: capitalize;
}

.lfp-list-item {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.lfp-list-item:last-child {
  border-bottom: none;
}

.lfp-list-item:hover {
  background-color: #f8f9fa;
}

.lfp-list-content {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 15px;
}

.lfp-list-info {
  flex-grow: 1;
  min-width: 0;
}

.lfp-list-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  line-height: 1.3;
}

.lfp-list-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.lfp-list-title a:hover {
  color: #0073aa;
}

.lfp-mec-events .lfp-list-title a:hover {
  color: var(--primary-color);
}

.lfp-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #666;
}

.lfp-list-date,
.lfp-list-time,
.lfp-list-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lfp-list-thumbnail {
  flex-shrink: 0;
  position: relative;
  width: 80px;
  height: 80px;
}

.lfp-list-thumbnail a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.lfp-list-thumbnail-img {
  width: 80px !important;
  height: 80px !important;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.lfp-list-thumbnail:hover .lfp-list-thumbnail-img {
  transform: scale(1.05);
}

.lfp-thumbnail-placeholder {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #dee2e6;
  text-decoration: none;
}

.lfp-placeholder-icon {
  font-size: 24px;
  opacity: 0.6;
}

/* Event-specific list styling */
.lfp-list-item.lfp-mec-events {
  border-left: 4px solid var(--primary-color);
}

/* Ticket availability styling */
.lfp-tickets {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lfp-tickets-available {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.lfp-tickets-few {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.lfp-tickets-sold-out {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.lfp-tickets-icon {
  font-size: 11px;
}

/* Removed old date overlay styles - now using date headers */

/* Responsive Design */
@media (max-width: 768px) {
  .lfp-posts-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .lfp-location-select {
    width: 100%;
    min-width: auto;
  }

  .lfp-post-item {
    padding: 15px;
  }

  .lfp-post-location-badge {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .lfp-post-image {
    margin: -15px -15px 12px -15px;
  }

  .lfp-post-thumbnail {
    height: 150px;
  }

  .lfp-event-image {
    margin: -15px -15px 12px -15px;
  }

  .lfp-event-thumbnail {
    height: 150px;
  }

  .lfp-event-overlay {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .lfp-event-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .lfp-event-date {
    padding: 8px 12px;
    font-size: 13px;
  }

  .lfp-event-time {
    font-size: 12px;
  }

  /* List view responsive adjustments */
  .lfp-month-header {
    padding: 12px 15px;
    font-size: 16px;
  }

  .lfp-list-content {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 15px;
  }

  .lfp-list-thumbnail {
    align-self: center;
    width: 60px;
    height: 60px;
  }

  .lfp-list-thumbnail-img {
    width: 60px !important;
    height: 60px !important;
  }

  .lfp-thumbnail-placeholder {
    width: 60px;
    height: 60px;
  }

  .lfp-placeholder-icon {
    font-size: 18px;
  }

  .lfp-date-header {
    padding: 8px 15px;
    font-size: 12px;
  }

  .lfp-list-meta {
    gap: 10px;
    font-size: 12px;
  }

  /* Compact view responsive adjustments */
  .lfp-compact-header {
    display: none; /* Hide header on mobile */
  }

  .lfp-compact-row {
    display: block;
    padding: 15px;
    border-left: none !important;
    padding-left: 15px !important;
  }

  .lfp-compact-row.lfp-compact-mec-events {
    border-left: 4px solid var(--primary-color) !important;
    padding-left: 11px !important;
  }

  .lfp-compact-col-date,
  .lfp-compact-col-time,
  .lfp-compact-col-title,
  .lfp-compact-col-tickets,
  .lfp-compact-col-location {
    display: block;
    text-align: left !important;
    margin-bottom: 5px;
  }

  .lfp-compact-col-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
  }

  .lfp-compact-col-title {
    margin-bottom: 8px;
  }

  .lfp-compact-col-time,
  .lfp-compact-col-tickets,
  .lfp-compact-col-location {
    font-size: 12px;
    color: #666;
  }

  /* Compact search responsive */
  .lfp-compact-search-wrapper {
    padding: 12px 15px 8px;
  }

  .lfp-compact-search-wrapper.lfp-compact-global-search {
    padding: 15px;
    margin-bottom: 20px;
  }

  .lfp-compact-search {
    padding: 8px 35px 8px 12px;
    font-size: 13px;
  }

  .lfp-compact-search-icon {
    right: 25px;
    font-size: 14px;
  }

  .lfp-compact-global-no-results {
    padding: 30px 15px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .lfp-post-title {
    font-size: 16px;
  }

  .lfp-post-item {
    margin-bottom: 15px;
  }

  .lfp-event-title {
    font-size: 18px;
  }

  .lfp-post-thumbnail {
    height: 120px;
  }

  .lfp-event-thumbnail {
    height: 120px;
  }

  .lfp-thumbnail-placeholder {
    width: 50px;
    height: 50px;
  }

  .lfp-list-thumbnail {
    width: 50px;
    height: 50px;
  }

  .lfp-list-thumbnail-img {
    width: 50px !important;
    height: 50px !important;
  }
}

/* Loading animation */
.lfp-loading::after {
  content: "...";
  animation: lfp-dots 1.5s steps(4, end) infinite;
}

@keyframes lfp-dots {
  0%,
  20% {
    color: rgba(0, 0, 0, 0);
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  40% {
    color: #666;
    text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  60% {
    text-shadow: 0.25em 0 0 #666, 0.5em 0 0 rgba(0, 0, 0, 0);
  }
  80%,
  100% {
    text-shadow: 0.25em 0 0 #666, 0.5em 0 0 #666;
  }
}
