/* Events page — built on top of my_orders.css */

.events-filter-card {
  padding: 16px 18px 14px;
  margin-bottom: 14px;
}

.events-filter-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label,
.events-sort label {
  color: #61728e;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.filter-group input,
.filter-group select {
  width: 100%;
  height: 40px;
  border: 1px solid #c8d4e2;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
  color: #263b59;
  background: #ffffff;
  outline: none;
  transition: 0.2s ease;
}

.filter-group input:focus,
.filter-group select:focus {
  border-color: #30c3da;
  box-shadow: 0 0 0 2px rgba(48, 195, 218, 0.15);
}

.filter-input {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-input i {
  position: absolute;
  left: 10px;
  color: #7b8ca6;
  font-size: 14px;
}

.filter-input input {
  padding-left: 30px;
}

.filter-action .otp-button {
  width: 100%;
  height: 40px;
  border-radius: 6px;
  font-size: 12px;
}

.events-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid #d0deed;
  border-radius: 50px;
  background: #ffffff;
  color: #536782;
  font-size: 12px;
  text-decoration: none;
  transition: 0.2s ease;
}

.pill:hover {
  border-color: #30c3da;
  color: #30c3da;
}

.pill.active {
  background: #30c3da;
  border-color: #30c3da;
  color: #ffffff;
}

.pill i {
  font-size: 13px;
}

.events-pills--time {
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #e4ecf5;
}

.events-pills-label {
  margin-right: 4px;
  color: #7c8ba1;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.pill-time.active {
  background: #1f2b45;
  border-color: #1f2b45;
}

.events-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #cfe0f0;
  border-radius: 50px;
  background: #f2f8fd;
  color: #3d5372;
  font-size: 11px;
  text-decoration: none;
  transition: 0.2s ease;
}

.filter-chip:hover {
  border-color: #e05666;
  background: #fdf1f2;
  color: #d0404f;
}

.filter-chip i {
  font-size: 13px;
  line-height: 1;
}

.filter-chip--clear {
  border-style: dashed;
  background: transparent;
  color: #7c8ba1;
}

.events-list-card {
  padding: 14px 14px 18px;
}

.events-list-card .orders-header {
  margin-bottom: 14px;
}

.events-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.events-sort select {
  height: 32px;
  border: 1px solid #c8d4e2;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  color: #263b59;
  background: #ffffff;
  outline: none;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

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

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.event-card {
  background: #ffffff;
  border: 1px solid #e6edf5;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(33, 56, 85, 0.08);
}

.events-grid--list .event-card {
  flex-direction: row;
  align-items: stretch;
}

.events-grid--list .event-image {
  width: 160px;
  height: auto;
  flex-shrink: 0;
}

.events-grid--list .event-body {
  flex: 1;
  padding: 14px;
}

.event-image {
  position: relative;
  height: 120px;
  overflow: hidden;
  background: #eef2f7;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-price,
.event-stock {
  position: absolute;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.event-price {
  left: 8px;
  bottom: 8px;
  background: rgba(251, 58, 107, 0.92);
}

.event-stock {
  right: 8px;
  top: 8px;
}

.event-stock.sold-out {
  background: #fb3a6b;
}

.event-stock.low-stock {
  background: #f0a500;
  color: #172b4d;
}

.event-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px;
}

.event-category {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 4px;
  background: #e6f8fb;
  color: #1fa5bb;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}

.event-title {
  font-size: 14px;
  font-weight: 750;
  color: #172b4d;
  line-height: 1.25;
  margin-bottom: 8px;
}

.event-meta {
  color: #61728e;
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 5px;
}

.event-meta i {
  color: #9aa8be;
  margin-right: 4px;
}

.event-card .otp-button {
  width: 100%;
  height: 34px;
  border-radius: 6px;
  margin-top: auto;
  font-size: 12px;
}

.empty-state .otp-button {
  width: auto;
  padding: 0 20px;
  height: 36px;
  border-radius: 8px;
  margin-top: 14px;
}

.events-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.events-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dce5ef;
  border-radius: 6px;
  background: #ffffff;
  color: #536782;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.events-pagination .page-link:hover:not(.disabled):not(.active) {
  border-color: #30c3da;
  color: #30c3da;
}

.events-pagination .page-link.active {
  background: #30c3da;
  border-color: #30c3da;
  color: #ffffff;
}

.events-pagination .page-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .events-filter-form {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .events-sort label {
    display: none;
  }
}

@media (max-width: 600px) {
  .events-filter-form {
    grid-template-columns: 1fr;
  }

  .events-pills {
    gap: 6px;
  }

  .pill {
    padding: 6px 10px;
    font-size: 11px;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-image {
    height: 160px;
  }

  .events-pagination .page-link {
    min-width: 28px;
    height: 28px;
    font-size: 11px;
  }
}

/* Three-column events layout */
.events-layout {
  display: grid;
  grid-template-columns: 180px 1fr 170px;
  grid-template-areas: "filter main ad";
  gap: 16px;
  align-items: start;
}

.events-sidebar { grid-area: filter; position: sticky; top: 100px; }
.events-main { grid-area: main; }
.events-ad { grid-area: ad; position: sticky; top: 100px; }

@media (max-width: 1100px) {
  .events-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "filter"
      "ad"
      "main";
    gap: 14px;
  }
  .events-sidebar,
  .events-ad {
    position: relative;
    top: auto;
  }
}

/* Delivery phone ad */
.delivery-ad {
  width: 100%;
}

.phone-ad .phone-mockup {
  position: relative;
  width: 170px;
  height: 320px;
  border: 7px solid #111827;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 24px 56px rgba(13, 19, 44, .2);
  overflow: hidden;
  transform-style: preserve-3d;
  animation: phoneTilt 4.5s ease-in-out infinite;
}

.phone-mockup .phone-notch {
  position: absolute;
  z-index: 4;
  width: 70px;
  height: 15px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  border-radius: 0 0 10px 10px;
}

.phone-mockup .phone-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 22px 10px 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.phone-mockup .phone-appbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9ebf1;
  margin-bottom: 14px;
}

.phone-mockup .phone-appbar .phone-logo {
  max-height: 46px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 600px) {
  .phone-mockup .phone-appbar .phone-logo {
    max-height: 32px;
  }
}

.phone-mockup .phone-ticker {
  position: relative;
  height: 18px;
  margin-bottom: 12px;
  text-align: center;
}

.phone-mockup .ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #1fa5bb;
  opacity: 0;
  transform: translateY(10px);
  animation: ticker 6s ease-in-out infinite;
}

.phone-mockup .ticker-item:nth-child(1) { animation-delay: 0s; }
.phone-mockup .ticker-item:nth-child(2) { animation-delay: 2s; }
.phone-mockup .ticker-item:nth-child(3) { animation-delay: 4s; }

.phone-mockup .phone-ticket {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(43,183,204,.08), transparent);
  border: 1px dashed #cbd5e1;
  margin-bottom: 14px;
  animation: ticketSlide 3s ease-in-out infinite;
}

.phone-mockup .phone-ticket i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(43,183,204,.12);
  color: var(--cyan);
  font-size: 18px;
}

.phone-mockup .phone-ticket div { display: flex; flex-direction: column; gap: 1px; }
.phone-mockup .phone-ticket strong { font-size: 10px; color: #172b4d; }
.phone-mockup .phone-ticket span { font-size: 8px; color: #6c7488; }

.phone-mockup .phone-channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.phone-mockup .phone-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(15, 22, 43, .08);
  font-size: 10px;
  font-weight: 700;
  color: #172b4d;
  animation: channelGlow 6s ease-in-out infinite;
}

.phone-mockup .phone-channel:nth-child(1) { animation-delay: 0s; }
.phone-mockup .phone-channel:nth-child(2) { animation-delay: 2s; }
.phone-mockup .phone-channel:nth-child(3) { animation-delay: 4s; }

.phone-mockup .phone-channel i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 14px;
  animation: pop 1.5s ease-in-out infinite;
}

.phone-mockup .phone-channel i.email { color: #4f5bd5; background: #eff1ff; animation-delay: 0s; }
.phone-mockup .phone-channel i.sms { color: #f0a500; background: #fff7e8; animation-delay: 0.3s; }
.phone-mockup .phone-channel i.whatsapp { color: #25d366; background: #e8f9f1; animation-delay: 0.6s; }

@keyframes phoneTilt {
  0%, 100% { transform: rotateY(0deg) translateY(0); }
  25% { transform: rotateY(12deg) translateY(-6px); }
  50% { transform: rotateY(-12deg) translateY(-6px); }
  75% { transform: rotateY(6deg) translateY(0); }
}

@keyframes ticker {
  0%, 20% { opacity: 1; transform: translateY(0); }
  33%, 100% { opacity: 0; transform: translateY(-10px); }
}

@keyframes ticketSlide {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

@keyframes channelGlow {
  0%, 22% { background: #e8f8ff; border-color: #30c3da; box-shadow: 0 0 0 3px rgba(48,195,218,.15); }
  32%, 100% { background: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(15, 22, 43, .08); }
}

@keyframes pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@media (max-width: 600px) {
  .delivery-ad {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .phone-ad .phone-mockup {
    width: 120px;
    height: 230px;
    border: 5px solid #111827;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(13, 19, 44, .18);
  }

  .phone-mockup .phone-notch {
    width: 50px;
    height: 12px;
  }

  .phone-mockup .phone-screen {
    padding: 18px 8px 8px;
  }

  .phone-mockup .phone-appbar {
    font-size: 9px;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }

  .phone-mockup .phone-message {
    font-size: 8px;
    padding: 6px 8px;
    margin-bottom: 8px;
  }

  .phone-mockup .phone-message i { font-size: 11px; }

  .phone-mockup .phone-channels {
    gap: 7px;
  }

  .phone-mockup .phone-channel {
    gap: 7px;
    padding: 6px;
    font-size: 8px;
  }

  .phone-mockup .phone-channel i {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}
