/**
 * 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;
  }
}

/* ========================================
   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: var(--qep-danger);
}

.qep-card__badge--postponed {
  background: var(--qep-warning);
  color: var(--qep-gray-900);
}

.qep-card__badge--rescheduled {
  background: var(--qep-success);
}

/* 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;
}

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

.qep-card__title {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--qep-gray-900);
  line-height: 1.3;
}

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

.qep-card__comment {
  margin: 8px 0 0 0;
  font-size: 12px;
  color: var(--qep-gray-500);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 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: 11px;
  font-weight: 500;
  border-radius: 20px;
  white-space: nowrap;
}

.qep-tag--type {
  background: var(--qep-primary);
  color: #fff;
}

.qep-tag--genre {
  background: var(--qep-gray-100);
  color: var(--qep-gray-700);
}

/* ========================================
   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-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  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;
}

.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 {
  font-size: 13px;
  color: var(--qep-gray-500);
}

/* 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;
}

.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: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 12px 0;
  font-size: 12px;
  font-weight: 500;
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
}

.qep-card__comment .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ========================================
   Card Footer
   ======================================== */
.qep-card__footer {
  padding: 16px 20px;
  background: var(--qep-gray-50);
  border-top: 1px solid var(--qep-gray-100);
  margin-top: auto;
}

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

.qep-card__actions .qep-btn {
  width: 100%;
  justify-content: center;
}

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

.qep-btn .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  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;
}

/* ========================================
   Social Link
   ======================================== */
.qep-card__social {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
  transition: var(--qep-transition);
  z-index: 10;
  text-decoration: none;
}

.qep-card__social:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.5);
  color: #fff;
  text-decoration: none;
}

.qep-card__social i,
.qep-card__social .fab {
  font-size: 18px;
}

/* ========================================
   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);
}
