/**
 * Q Events Pro - Modern Grid Layout
 * Version 2.0.39
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
  --qep-primary: #6366f1;
  --qep-primary-dark: #4f46e5;
  --qep-primary-light: #a5b4fc;
  --qep-success: #10b981;
  --qep-warning: #f59e0b;
  --qep-danger: #ef4444;
  --qep-gray-50: #f9fafb;
  --qep-gray-100: #f3f4f6;
  --qep-gray-200: #e5e7eb;
  --qep-gray-300: #d1d5db;
  --qep-gray-400: #9ca3af;
  --qep-gray-500: #6b7280;
  --qep-gray-600: #4b5563;
  --qep-gray-700: #374151;
  --qep-gray-800: #1f2937;
  --qep-gray-900: #111827;
  --qep-radius: 12px;
  --qep-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --qep-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --qep-transition: all 0.2s ease;
}

/* ========================================
   Grid Container
   ======================================== */
.qep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Force 3 columns even with few items */
.qep-grid > * {
  min-width: 0;
}

@media (max-width: 1024px) {
  .qep-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .qep-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  
  .qep-card {
    box-shadow: 0px 2px 18px 0px rgba(0,0,0,0.15);
    border-radius: 10px;
  }
  
  /* Date-box auf Mobile ausblenden */
  .qep-card .qep-date-box {
    display: none !important;
  }
  
  /* Price auf Mobile ausblenden */
  .qep-card__price {
    display: none !important;
  }
  
  /* qep-card__date auf Mobile anzeigen */
  .qep-card__date {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
  }
  
  /* qep-card__info auf Mobile horizontal */
  .qep-card__info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .qep-card__info-item {
    font-size: 12px;
  }
  
  /* Mobile date-info ausblenden (nicht mehr benötigt) */
  .qep-date-info--mobile {
    display: none !important;
  }
}

/* Mobile date-info auf Desktop ausblenden */
.qep-date-info--mobile {
  display: none !important;
}

/* ========================================
   Card Component
   ======================================== */
.qep-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--qep-radius);
  box-shadow: var(--qep-shadow);
  overflow: hidden;
  transition: var(--qep-transition);
  min-width: 0;
  max-width: 100%;
  grid-column: span 1;
}

.qep-card:hover {
  box-shadow: var(--qep-shadow-lg);
  transform: translateY(-4px);
}

.qep-card--featured {
  border: 2px solid var(--qep-primary);
}

.qep-card--cancelled {
  opacity: 0.7;
}

.qep-card--cancelled .qep-card__image img {
  filter: grayscale(100%);
}

/* ========================================
   Card Image
   ======================================== */
.qep-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--qep-gray-100);
}

.qep-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.qep-card:hover .qep-card__image img {
  transform: scale(1.05);
}

/* Badge on Image */
.qep-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  color: #fff;
}

.qep-card__badge--cancelled {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.qep-card__badge--postponed {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
}

.qep-card__badge--rescheduled {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.qep-card__badge--soldout {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Price Badge - Oben rechts */
.qep-card__price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  color: var(--qep-gray-900);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 5;
}

/* Image Placeholder */
.qep-card__image--placeholder {
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, var(--qep-gray-200) 0%, var(--qep-gray-100) 100%);
}

/* ========================================
   Card Content
   ======================================== */
.qep-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 0px 20px;
}

.qep-card__header {
  margin-bottom: 8px;
}

.qep-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--qep-gray-900);
  padding-bottom: 2px;
}

.qep-card__subtitle {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--qep-gray-600);
  line-height: 1.4;
}

/* Tags */
.qep-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.qep-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 500;
  border-radius: 20px;
  white-space: nowrap;
}

.qep-tag--type {
  background: var(--qep-typ-bg, #fae8ff);
  color: var(--qep-typ-text, #86198f);
}

.qep-tag--genre {
  background: var(--qep-genre-bg, #dbeafe);
  color: var(--qep-genre-text, #1e40af);
}

/* Card Notices Container */
.qep-card__notices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.qep-card__notices .qep-card__notice {
  font-size: 9px;
  padding: 4px 10px;
  margin-bottom: 0;
  gap: 4px;
}

.qep-card__notices .qep-card__notice .dashicons {
  font-size: 12px;
  width: 12px;
  height: 12px;
}

/* ========================================
   Card Meta (Date, Location)
   ======================================== */
.qep-card__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.qep-card__date {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qep-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.qep-card__info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--qep-gray-600);
  line-height: 1rem;
}

.qep-card__info-item .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--qep-gray-400);
  flex-shrink: 0;
}

.qep-card__price {
  text-align: center;
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
  padding: 4px 8px;
  border: 1px solid var(--qep-gray-300);
  border-radius: 8px;
  background: var(--qep-white);
}

.qep-card__price .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--qep-gray-500);
  display: inline-block;
}

.qep-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--qep-primary) 0%, var(--qep-primary-dark) 100%);
  border-radius: 10px;
  flex-shrink: 0;
}

.qep-date-box__day {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.qep-date-box__month {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

.qep-date-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Date-info auch für Location-Anzeige */
.qep-card__meta > .qep-date-info {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--qep-gray-600);
  line-height: 1.4;
}

.qep-card__meta > .qep-date-info .dashicons {
  flex-shrink: 0;
  font-size: 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--qep-gray-400);
}

.qep-date-info__date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--qep-gray-800);
}

.qep-date-info__date .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: var(--qep-gray-600);
}

.qep-date-info__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--qep-gray-500);
}

.qep-date-info__time .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--qep-gray-400);
}

.qep-date-info__location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--qep-gray-500);
}

.qep-date-info__location .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--qep-gray-400);
}

/* Location */
.qep-card__location {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--qep-gray-600);
  line-height: 1.4;
}

.qep-card__location .dashicons {
  flex-shrink: 0;
  font-size: 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--qep-gray-400);
}

.qep-location-change {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qep-location-new {
  color: var(--qep-success);
  font-weight: 500;
}

.qep-location-old {
  font-size: 12px;
  color: var(--qep-gray-400);
  text-decoration: line-through;
}

/* Notice (Postponed, Rescheduled, New Location) */
.qep-card__notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 12px;
  width: -webkit-fit-content;
  width: fit-content;
}

.qep-card__notice .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.qep-card__notice--postponed {
  background: #d1fae5;
  color: #065f46;
}

.qep-card__notice--rescheduled {
  background: #d1fae5;
  color: #065f46;
}

.qep-card__notice--newlocation {
  background: #fce7f3;
  color: #be185d;
}

/* Comment/Hinweis - yellow background with icon */
.qep-card__comment {
  display: inline-table;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 0 16px 0;
  font-size: 13px;
  font-weight: 500;
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
  line-height: 1.4;
}

.qep-card__comment .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ========================================
   Card Quicklinks (Mobile only)
   ======================================== */
.qep-card__quicklinks {
  display: none;
  justify-content: center;
  gap: 12px;
  padding: 10px 0px;
}

.qep-card__quicklink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--qep-gray-100);
  color: var(--qep-gray-600);
  text-decoration: none;
  transition: all 0.2s ease;
}

.qep-card__quicklink:hover {
  background: var(--qep-primary);
  color: #fff;
}

.qep-card__quicklink .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .qep-card__quicklinks {
    display: flex;
  }
}

/* ========================================
   Card Footer
   ======================================== */
.qep-card__footer {
  padding: 0 20px 16px 20px;
  background: transparent;
  border-top: none;
  margin-top: 10px;
}

.qep-card__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.qep-card__actions .qep-btn {
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.qep-card__actions .qep-btn:only-child {
  flex: none;
  width: 100%;
}

/* ========================================
   Buttons
   ======================================== */
.qep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: var(--qep-transition);
  white-space: nowrap;
}

.qep-btn .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #fff;
}

.qep-btn--primary {
  background: linear-gradient(130deg, #636aff, #4da1ff) !important;
  color: #fff;
  box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.qep-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  color: #fff;
  text-decoration: none;
}

.qep-btn--disabled {
  background: var(--qep-gray-200);
  color: var(--qep-gray-500);
  cursor: not-allowed;
}

.qep-btn--waiting {
  background: #fef3c7;
  color: #92400e;
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qep-btn--soldout {
  background: #fce7f3;
  color: #9d174d;
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qep-btn--closed {
  background: var(--qep-gray-200);
  color: var(--qep-gray-600);
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.qep-btn--cancelled {
  background: var(--qep-gray-300);
  color: var(--qep-gray-600);
  cursor: not-allowed;
}

.qep-btn--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  color: var(--qep-gray-400);
  border: 1px solid var(--qep-gray-300);
  border-radius: 8px;
  cursor: default;
}

.qep-btn--placeholder .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* ========================================
   Social Link
   ======================================== */
.qep-card__social {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  color: #1877f2;
  transition: var(--qep-transition);
  z-index: 10;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.qep-card__social:hover {
  transform: scale(1.1);
  background: #fff;
  color: #1877f2;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qep-card__social svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   Date Info with Dashicons
   ======================================== */
.qep-date-info__time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--qep-gray-500);
}

.qep-date-info__time .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--qep-gray-400);
}

/* ========================================
   Icons
   ======================================== */
.qep-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

/* ========================================
   Empty State
   ======================================== */
.qep-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: var(--qep-gray-50);
  border-radius: var(--qep-radius);
}

.qep-empty .dashicons {
  font-size: 64px;
  width: 64px;
  height: 64px;
  color: var(--qep-gray-300);
  margin-bottom: 16px;
}

.qep-empty p {
  margin: 0;
  font-size: 16px;
  color: var(--qep-gray-500);
}

/* Override theme input borders */
.q_events_wrapper input.text,
.q_events_wrapper input.title,
.q_events_wrapper input[type=email],
.q_events_wrapper input[type=password],
.q_events_wrapper input[type=tel],
.q_events_wrapper input[type=text],
.q_events_wrapper select,
.q_events_wrapper textarea,
.q_events_wrapper .qep-search-input,
.q_events_wrapper #qep-search-input,
#qep-search-input {
  border: 0px !important;
}
