/* ===================================
   Kinderkonzerte – Frontend Styles
   =================================== */

/* === Filterbereich === */
.kcrz-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 24px;
  margin-bottom: 34px;
  background: #f4f6fa;
  padding: 20px 26px;
  border-radius: 12px;
  border: 1px solid #e2e6f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.kcrz-filter-form label {
  display: block;
  font-weight: 600;
  color: #1d2951;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.kcrz-filter-form input[type="text"],
.kcrz-filter-form select {
  border: 1px solid #cdd3e0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #fff;
  min-width: 230px;
  box-sizing: border-box;
}

.kcrz-filter-form input::placeholder {
  color: #999;
}

.kcrz-filter-form input:focus,
.kcrz-filter-form select:focus {
  border-color: #1d2951;
  box-shadow: 0 0 0 2px rgba(29, 41, 81, 0.15);
  outline: none;
}

.kcrz-filter-form select {
  cursor: pointer;
}

.kcrz-filter-form .kcrz-filter-group {
  display: flex;
  flex-direction: column;
}

/* === Eventliste (Grid) === */
.kcrz-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

/* === Eventkarten === */
.kcrz-event-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid #e9edf5;
  display: flex;
  flex-direction: column;
}

.kcrz-event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* === Eventbild === */
.kcrz-event-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* === Karteninhalt === */
.kcrz-event-content {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kcrz-event-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: #1d2951;
  letter-spacing: 0.3px;
}

/* === Beschreibung (2-Zeilen) === */
.kcrz-excerpt {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Weiterlesen-Button (korrigiert) === */
.kcrz-readmore-btn {
  background: none !important;
  border: none !important;
  color: #1d2951 !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
  box-shadow: none !important;
  outline: none !important;
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
}

.kcrz-readmore-btn:hover {
  color: #283b7a;
  text-decoration: none;
}

.kcrz-readmore-btn:focus {
  outline: none;
  box-shadow: none;
}

/* === Event-Metadaten === */
.kcrz-event-meta {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.9rem;
  color: #444;
}

.kcrz-event-meta li {
  margin: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kcrz-event-meta strong {
  color: #1d2951;
}

/* === Karten-Footer === */
.kcrz-event-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* === Buttons === */
.kcrz-book-btn,
.kcrz-submit,
.kcrz-ok {
  background: #1d2951;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kcrz-book-btn:hover,
.kcrz-submit:hover,
.kcrz-ok:hover {
  background: #283b7a;
}

.kcrz-book-btn:active,
.kcrz-submit:active,
.kcrz-ok:active {
  transform: scale(0.97);
}

/* === Ticket-Status Badge === */
.kcrz-tickets-left {
  background: #eef3ff;
  border-radius: 18px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d2951;
}

.kcrz-tickets-left.soldout {
  background: #fde8e8;
  color: #a50000;
}

/* === Modal / Popups === */
.kcrz-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.kcrz-modal.active {
  display: block;
}

.kcrz-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.kcrz-modal-content {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 12px;
  max-width: 640px;
  margin: 7vh auto;
  padding: 26px 24px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.kcrz-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #1d2951;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  width: 30px;
  height: 30px;
  line-height: 28px;
  cursor: pointer;
}

.kcrz-close:hover {
  background: #283b7a;
}

/* === Formular === */
.kcrz-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kcrz-field {
  display: flex;
  flex-direction: column;
}

.kcrz-field label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #1d2951;
}

.kcrz-field input,
.kcrz-field textarea {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.95rem;
  font-family: inherit;
}

.kcrz-field input:focus,
.kcrz-field textarea:focus {
  outline: none;
  border-color: #1d2951;
  box-shadow: 0 0 0 2px rgba(29, 41, 81, 0.1);
}

.kcrz-row {
  display: flex;
  gap: 12px;
}

.kcrz-row .half {
  flex: 1;
}

/* === Fehler & Erfolg === */
.kcrz-error {
  display: none;
  color: #a50000;
  background: #ffecec;
  border: 1px solid #f5c2c7;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
}

.kcrz-success {
  display: none;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.kcrz-success p {
  font-size: 1rem;
  margin: 0 0 12px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Volltext im Weiterlesen-Modal === */
.kcrz-desc-full {
  line-height: 1.6;
  font-size: 0.95rem;
  color: #333;
}

/* === Body-Scroll sperren, wenn Modal offen === */
.kcrz-no-scroll {
  overflow: hidden;
}

/* === Responsive === */
@media (max-width: 900px) {
  .kcrz-event-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 700px) {
  .kcrz-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .kcrz-filter-form input,
  .kcrz-filter-form select {
    width: 100%;
  }

  .kcrz-event-list {
    grid-template-columns: 1fr;
  }

  .kcrz-modal-content {
    margin: 10vh 16px;
    padding: 22px 18px;
  }
}
