/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Lato, "Helvetica Neue", Arial, sans-serif;
  background-color: #f7f8fa;
  color: #333;
  line-height: 1.6;
}
a {
  color: #0773e7;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* ===== Container ===== */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ===== Header ===== */
header {
  position: relative;
  background:  url("kuvat/keilailu_header.webp?v=1.0") top/cover no-repeat;
  width: 100%;
  padding: 2.5rem 1rem 2rem;
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  color: #fff;
  min-height: 500px;
}
header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
header h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
header p {
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ===== Cancel box overlay ===== */
/* ===== Cancel box overlay ===== */
.cancel-box {
  position: absolute;
  bottom: 1rem;                     /* move it down, out of the way of the title */
  left: 50%;
  transform: translateX(-50%);
  background: #ffff;/* more muted, semi-transparent white */
  border: 1px solid rgba(160,37,29,0.4); /* subtle red border */
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  width: calc(100% - 2rem);
  max-width: 600px;
  text-align: center;
  z-index: 2;
}
.cancel-box p {
  color: #008ACF;       /* darker, but subdued red */
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.cancel-box .btn {
  background-color: #008ACF /* slightly translucent red */
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}
@media (max-width: 600px) {
  .cancel-box {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: auto !important;
    margin: 1rem auto;
    background: #ffff;
  }
}


/* ===== Messages ===== */
.message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}
.message.success {
  background-color: #e6ffed;
  color: #027a48;
}
.message.error {
  background-color: #ffeded;
  color: #a1251d;
}

/* ===== Navigation Tabs ===== */
.booking-type {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.booking-type .btn {
  background-color: #007bff;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  color: #fff;
  font-weight: 600;
}
.btn.active {
  background-color: #004497;
  transform: scale(1.05);
}

/* ===== Card ===== */
.card {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ===== Events List ===== */
.events-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}
.events-list li:last-child {
  border-bottom: none;
}
.event-info strong {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.event-info em {
  font-size: 0.9rem;
  color: #004c99;
  background-color: rgb(204, 243, 206);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-style: normal;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.25rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background-color: #0773e7;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}
.btn:active {
  background-color: #004497;
  transform: translateY(0);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0056b3;
}

/* ===== Bookings List ===== */
.bookings-list h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
.bookings-list ol {
  padding-left: 1.25rem;
  margin-top: 0.75rem;
}
.bookings-list li {
  margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}
.footer a {
  color: #007bff;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .booking-type .btn,
  .btn {
    width: 100%;
    text-align: center;
  }
  .events-list li {
    flex-direction: column;
    align-items: flex-start;
  }
  .events-list li .btn {
    margin-top: 0.75rem;
    width: 100%;
  }
  header h1 { font-size: 1.75rem; }
  header h2 { font-size: 1rem; }
}
@media (max-width: 600px) {
  header {
    /* mobiilissa k채ytet채채n pient채 korkeutta */
    min-height: 250px;
  }
}
/* Korostetaan täyden varauksen viesti */
.message.error-inline {
  background-color: #f8d7da;  /* vaalea punainen tausta */
  color: #721c24;             /* tummanpunainen teksti */
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
  display: inline-block;
}
@media (min-width: 768px) {
  /* Rakenne: <li> … <div class="event-info">…</div> <div class="message error">…</div> <form class="reserve-form">…</form> </li> */
  .events-list li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  /* Varaa-napin säilytä ylhäällä */
  .events-list li .reserve-form {
    order: 1;
    margin-top: 0.5rem;
  }
  /* Täyden varauksen viesti tämän jälkeen */
  .events-list li .message.error {
    order: 2;
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
  }
}

/* Täynnä-ilmoitus */
.full-notice {
  background-color: #f8d7da;   /* heleä punertava tausta */
  color: #721c24;              /* tummanpunainen teksti */
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

/* Poistetaan tausta ja padding osallistujalistalta */
.full-notice .booked-list {
  background: transparent;
  padding: 0;
  margin: 0.5rem 0 0 0;
  list-style: none;
}

/* Osallistujien rivit */
.full-notice .booked-list li {
  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 0;
  color: #333;  /* normaali tekstiväri */
}

/* Viimeinen rivin alareuna pois */
.full-notice .booked-list li:last-child {
  border-bottom: none;
}
/* Täynnä-ilmoitus */
.full-notice {
  background-color: #f8d7da;   /* heleä punertava tausta */
  color: #721c24;              /* tummanpunainen teksti */
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

