/* ==========================================================================
   Rammerstorfer Events – Frontend-CSS
   ========================================================================== */

/* --- Container & Header --------------------------------------------------- */
.ev-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ev-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #1a1a1a;
}

.ev-lead {
  color: #555;
  margin: 0 0 1.75rem;
  line-height: 1.6;
}

.ev-empty {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: #666;
}

/* --- Event Card ------------------------------------------------------------ */
.ev-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ev-card {
  display: flex;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .15s;
}

.ev-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,.1);
}

/* Poster column */
.ev-card__poster {
  flex: 0 0 160px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  overflow: hidden;
}

.ev-card__poster-link {
  display: block;
  width: 100%;
  height: 100%;
}

.ev-card__img {
  display: block;
  width: 160px;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  transition: opacity .15s;
}

.ev-card__img:hover {
  opacity: .88;
}

.ev-card__poster-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  min-height: 160px;
  text-decoration: none;
  color: #c0392b;
  gap: 0.5rem;
  padding: 1rem;
  text-align: center;
}

.ev-card__pdf-icon {
  font-size: 2.5rem;
}

.ev-card__pdf-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ev-card__no-poster {
  font-size: 2.5rem;
  color: #ccc;
}

/* Body column */
.ev-card__body {
  flex: 1 1 auto;
  padding: 1rem 1rem 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ev-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
  line-height: 1.3;
}

.ev-card__title a {
  color: inherit;
  text-decoration: none;
}

.ev-card__title a:hover {
  text-decoration: underline;
  color: #c0392b;
}

.ev-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.88rem;
  color: #444;
}

.ev-card__date,
.ev-card__location {
  white-space: nowrap;
}

/* Region badge */
.ev-region {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  background: #eee;
  color: #555;
  white-space: nowrap;
}

.ev-region--linz          { background: #dce8fd; color: #1a3da0; }
.ev-region--wels          { background: #fdf5dc; color: #9a7a00; }
.ev-region--steyr         { background: #fde8dc; color: #a0350b; }
.ev-region--kremstal      { background: #d9f0e8; color: #1a6644; }
.ev-region--muehlviertel  { background: #e8f5d9; color: #2d6e1a; }
.ev-region--hausruck      { background: #fef0d9; color: #9a5c00; }
.ev-region--innviertel    { background: #fde8f5; color: #8a1a6a; }
.ev-region--salzkammergut { background: #d9f0fd; color: #0a5a8a; }
.ev-region--traunviertel  { background: #ece8fd; color: #4a28a8; }

.ev-card__desc {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  line-height: 1.5;
  flex: 1 1 auto;
}

.ev-card__ext-link {
  font-size: 0.85rem;
  color: #c0392b;
  text-decoration: none;
  align-self: flex-start;
}

.ev-card__ext-link:hover {
  text-decoration: underline;
}

/* Taxi hint */
.ev-card__taxi {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  padding: 0.55rem 0.75rem;
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  border-radius: 4px;
  font-size: 0.85rem;
}

.ev-card__taxi-text {
  color: #555;
}

.ev-card__taxi-btn {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  background: #f9a825;
  color: #fff;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ev-card__taxi-btn:hover {
  background: #e08d00;
}

/* Mobile: stack poster on top */
@media (max-width: 560px) {
  .ev-card {
    flex-direction: column;
  }

  .ev-card__poster {
    flex: 0 0 auto;
    width: 100%;
    min-height: 120px;
  }

  .ev-card__img {
    width: 100%;
    height: 180px;
  }

  .ev-card__poster-pdf {
    width: 100%;
    padding: 1.25rem;
  }

  .ev-card__body {
    padding: 0.75rem;
  }
}

/* --- Buttons --------------------------------------------------------------- */
.ev-btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, opacity .15s;
  line-height: 1.4;
}

.ev-btn--primary {
  background: #c0392b;
  color: #fff;
}

.ev-btn--primary:hover {
  background: #a02820;
  color: #fff;
}

.ev-btn--secondary {
  background: #eee;
  color: #333;
}

.ev-btn--secondary:hover {
  background: #ddd;
}

.ev-btn--approve {
  background: #27ae60;
  color: #fff;
}

.ev-btn--approve:hover {
  background: #1d8748;
}

.ev-btn--reject {
  background: #e74c3c;
  color: #fff;
}

.ev-btn--reject:hover {
  background: #c0392b;
}

.ev-btn--danger {
  background: #c0392b;
  color: #fff;
}

.ev-btn--danger:hover {
  background: #922b21;
}

.ev-btn--sm {
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
}

/* --- Forms ---------------------------------------------------------------- */
.ev-form {
  max-width: 640px;
}

.ev-form__group {
  margin-bottom: 1.1rem;
}

.ev-form__group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #333;
}

.ev-form__group--required label::after {
  content: ' *';
  color: #c0392b;
}

.ev-form__hint {
  font-weight: 400;
  color: #888;
  font-size: 0.82rem;
}

.ev-form__input,
.ev-form__select,
.ev-form__textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #222;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s;
}

.ev-form__input:focus,
.ev-form__select:focus,
.ev-form__textarea:focus {
  outline: none;
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192,57,43,.15);
}

.ev-form__input--time {
  width: 100px;
}

.ev-form__textarea {
  resize: vertical;
  min-height: 90px;
}

.ev-form__file {
  display: block;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.ev-form__group--check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ev-form__group--check label {
  margin-bottom: 0;
  font-weight: 400;
}

.ev-form__checkbox {
  width: auto;
  margin: 0;
}

.ev-form__row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ev-form__row .ev-form__group {
  flex: 1 1 140px;
}

.ev-form__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.ev-login-hint {
  padding: 1.5rem;
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 8px;
  color: #555;
}

/* --- Management Table ----------------------------------------------------- */
.ev-manage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.ev-manage__section {
  margin-bottom: 2.5rem;
}

.ev-manage__section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #eee;
}

.ev-manage__table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(65vh, 40rem);
  border: 1px solid #e4e4e4;
  border-radius: .5rem;
}

.ev-manage__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.ev-manage__table th,
.ev-manage__table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  text-align: left;
}

.ev-manage__table th {
  background: #f7f7f7;
  font-weight: 700;
  color: #444;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.ev-manage__row--status-2 td { color: #999; }
.ev-manage__row--status-3 td { color: #bbb; }

.ev-manage__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  white-space: nowrap;
}

.ev-manage__empty {
  color: #888;
  font-style: italic;
  font-size: 0.9rem;
}

.ev-manage__ext-link {
  margin-left: 0.35rem;
  font-size: 0.85rem;
  text-decoration: none;
  opacity: .7;
}

.ev-manage__poster-link {
  font-size: 0.8rem;
  color: #c0392b;
  text-decoration: none;
}

.ev-inline-form {
  display: inline;
  margin: 0;
  padding: 0;
}

/* Status badges */
.ev-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ev-status--0 { background: #fff8e1; color: #9a7a00; }
.ev-status--1 { background: #d9f0e8; color: #1a6644; }
.ev-status--2 { background: #eee;     color: #888;    }
.ev-status--3 { background: #fde8dc; color: #a0350b; }

/* --- Edit: poster preview ------------------------------------------------- */
.ev-edit__current-poster {
  margin-bottom: 0.5rem;
}

.ev-edit__poster-preview {
  display: block;
  max-width: 140px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* --- Error ---------------------------------------------------------------- */
.ev-error {
  color: #c0392b;
  font-weight: 600;
  padding: 1rem;
  background: #fde8dc;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* --- Region filter -------------------------------------------------------- */
.ev-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ev-filter-btn {
  padding: 0.3rem 0.85rem;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  background: #fff;
  color: #444;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1.5;
}

.ev-filter-btn:hover {
  border-color: #c0392b;
  color: #c0392b;
}

.ev-filter-btn.is-active {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* --- Scrollable list ------------------------------------------------------ */
.ev-list-scroll {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
}

.ev-list-scroll::-webkit-scrollbar        { width: 5px; }
.ev-list-scroll::-webkit-scrollbar-track  { background: #f0f0f0; border-radius: 3px; }
.ev-list-scroll::-webkit-scrollbar-thumb  { background: #ccc; border-radius: 3px; }
.ev-list-scroll::-webkit-scrollbar-thumb:hover { background: #aaa; }

@media (max-width: 560px) {
  .ev-list-scroll { max-height: none; overflow-y: visible; padding-right: 0; }
}

/* --- Past events ---------------------------------------------------------- */
.ev-card--past {
  opacity: 0.58;
  transition: opacity .15s;
}

.ev-card--past:hover {
  opacity: 0.82;
}

/* --- Past events toggle --------------------------------------------------- */
.ev-past-section {
  margin-top: 1.25rem;
}

.ev-past-toggle {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #f7f7f7;
  border: 1px dashed #ccc;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  color: #777;
  font-size: 0.85rem;
  transition: background .15s, color .15s;
}

.ev-past-toggle:hover {
  background: #efefef;
  color: #444;
}

.ev-past-list {
  margin-top: 0.75rem;
}

.ev-past-list--collapsed {
  display: none;
}

/* --- Filter / hidden states ----------------------------------------------- */
.ev-card--hidden {
  display: none;
}

.ev-no-results,
.ev-no-upcoming {
  padding: 1.5rem;
  text-align: center;
  color: #888;
  font-size: 0.92rem;
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
}

/* --- Share button --------------------------------------------------------- */
.ev-card__share {
  align-self: flex-start;
  margin-top: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  color: #aaa;
  font-size: 0.76rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  line-height: 1.5;
}

.ev-card__share:hover {
  border-color: #bbb;
  color: #555;
}

.ev-card__share--copied {
  border-color: #27ae60 !important;
  color: #27ae60 !important;
}

/* --- Hash highlight animation --------------------------------------------- */
@keyframes ev-highlight-pulse {
  0%   { box-shadow: 0 0 0 4px rgba(249,168,37,.7); }
  100% { box-shadow: 0 1px 4px rgba(0,0,0,.06); }
}

.ev-card--highlighted {
  animation: ev-highlight-pulse 2s ease-out forwards;
}
