/**
 * Event List Block Styles
 *
 * @package My_Custom_Plugin
 */

/* Material Symbols Font */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* ========================================
   Grid Layout
======================================== */
.event-list {
  margin: 0 auto;
  width: 100%;
}

.event-list__grid {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* カラム設定 */
.event-list--columns-1 .event-list__grid {
  grid-template-columns: 1fr;
}

.event-list--columns-2 .event-list__grid {
  grid-template-columns: repeat(2, 1fr);
}

.event-list--columns-3 .event-list__grid {
  grid-template-columns: repeat(3, 1fr);
}

/* レスポンシブ */
@media screen and (max-width: 782px) {
  .event-list--columns-2 .event-list__grid,
  .event-list--columns-3 .event-list__grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 599px) {
  .event-list__grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
}

/* ========================================
   Event Card
======================================== */
.event-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #ededed;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

@media (hover: hover) {
  .event-card:hover {
    opacity: 0.8;
  }
}

/* ========================================
   Card Image
======================================== */
.event-card__image {
  position: relative;
  width: 100%;
  height: 512px;
  overflow: hidden;
  background: #f5f5f5;
}

.event-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

@media (hover: hover) {
  .event-card:hover .event-card__image img {
    transform: scale(1.05);
    filter: brightness(0.9);
  }
}

@media screen and (max-width: 782px) {
  .event-card__image {
    height: 400px;
  }
}

@media screen and (max-width: 599px) {
  .event-card__image {
    height: 300px;
  }
}

/* ========================================
   Card Content
======================================== */
.event-card__content {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 24px;
  justify-content: space-between;
  flex: 1;
}

@media screen and (max-width: 599px) {
  .event-card__content {
    padding: 20px;
    gap: 0;
  }
}

/* ========================================
   Card Body (Content Wrapper)
======================================== */
.event-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================
   Date Section
======================================== */
.event-card__date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Noto Sans JP", sans-serif;
}
/* .event-card__date + .event-card__title {
  margin-top: 6px;
} */

.event-card__date-num {
  font-size: 20px;
  font-weight: 700;
  color: #333333;
  line-height: 1.44;
  letter-spacing: 0.4px;
}

.event-card__date-day {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  line-height: 1.8;
  letter-spacing: 0.4px;
}

@media screen and (max-width: 599px) {
  .event-card__date-num {
    font-size: 18px;
  }

  .event-card__date-day {
    font-size: 16px;
  }
}

/* ========================================
   Title
======================================== */
.event-card__title {
  font-size: 24px;
  font-weight: 700;
  color: #333333;
  line-height: 1.17;
  letter-spacing: 0.4px;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
}

@media screen and (max-width: 599px) {
  .event-card__title {
    font-size: 20px;
    line-height: 1.3;
  }
}

/* ========================================
   Time Information
======================================== */
.event-card__time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #333333;
  line-height: 1;
  letter-spacing: 0.4px;
  font-family: "Noto Sans JP", sans-serif;
}
.event-card__title {
  margin: 0;
}
.event-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media screen and (max-width: 599px) {
  .event-card__time {
    font-size: 16px;
  }
}

/* ========================================
   Pricing Information
======================================== */
.event-card__pricing {
  display: flex;
  align-items: center;
  /* gap: 8px; */
  font-size: 16px;
  font-weight: 500;
  color: #333333;
  line-height: 1.8;
  letter-spacing: 0.4px;
  font-family: "Noto Sans JP", sans-serif;
  flex-wrap: wrap;
}

.event-card__pricing-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

 /* .event-card__pricing-separator {
  margin: 0 4px; 
} */

@media screen and (max-width: 599px) {
  .event-card__pricing {
    font-size: 16px;
  }
}

/* ========================================
   Other Pricing Information
======================================== */
.event-card__pricing-other {
  font-size: 16px;
  font-weight: 500;
  color: #333333;
  line-height: 1.8;
  letter-spacing: 0.4px;
  font-family: "Noto Sans JP", sans-serif;
  margin-top: 4px;
}

@media screen and (max-width: 599px) {
  .event-card__pricing-other {
    font-size: 16px;
  }
}

/* ========================================
   Performers
======================================== */
.event-card__performers {
  font-size: 18px;
  font-weight: 500;
  color: #333333;
  line-height: 1.6;
  letter-spacing: 0.4px;
  font-family: "Noto Sans JP", sans-serif;
  word-break: break-word;
}

@media screen and (max-width: 599px) {
  .event-card__performers {
    font-size: 16px;
  }
}

/* ========================================
   Ticket Button
======================================== */
.event-card__ticket-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  width: 100%;
  /* max-width: 220px; */
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  background: #666666;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.4px;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  font-family: "Noto Sans JP", sans-serif;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
}

.event-card__ticket-btn .material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-size: 24px;
  width: 24px;
  height: 24px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-weight: normal;
}

@media (hover: hover) {
  .event-card__ticket-btn:hover {
    background-color: #555555;
    opacity: 1;
  }
}

@media screen and (max-width: 599px) {
  .event-card__ticket-btn {
    width: 100%;
    font-size: 16px;
    padding: 6px 12px;
  }
}

/* ========================================
   Actions Container
======================================== */
.event-card__actions {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 8px;
}

@media screen and (max-width: 1000px) {
  .event-card__actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
  }
}

/* ========================================
   Detail Button
======================================== */
.event-card__detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  width: 100%;
  /* max-width: 220px; */
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  background: #2a2727;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  line-height: 1.8;
  letter-spacing: 0.4px;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  font-family: "Noto Sans JP", sans-serif;
  box-sizing: border-box;
}

/* チケット予約ボタンがない場合、詳細ボタンを100%幅にする */
.event-card__detail-btn:only-child {
  flex: 1 1 100%;
  max-width: 100%;
}

.event-card__detail-arrow {
  font-family: 'Material Symbols Outlined' !important;
  font-size: 24px;
  width: 24px;
  height: 24px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-weight: normal;
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .event-card__detail-btn:hover {
    background-color: #1a1a1a;
    opacity: 1;
  }

  .event-card__detail-btn:hover .event-card__detail-arrow {
    transform: translateX(4px);
  }
}

@media screen and (max-width: 599px) {
  .event-card__detail-btn {
    font-size: 16px;
    padding: 6px 12px;
  }
}

/* ========================================
   Empty State
======================================== */
.event-list p {
  text-align: center;
  padding: 3rem 1rem;
  color: #646970;
  font-size: 16px;
  font-family: "Noto Sans JP", sans-serif;
}

/* ========================================
   Block Editor Preview
======================================== */
.wp-block-reborn-event-list {
  margin: 2rem 0;
}

/* エディタ内でのプレビュー表示調整 */
.editor-styles-wrapper .event-list__grid {
  max-width: 100%;
}

.editor-styles-wrapper .event-card {
  max-width: 100%;
}

/* ========================================
   Ticket Modal
======================================== */
.ticket-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ticket-modal.is-active {
  display: flex;
}

.ticket-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.ticket-modal__content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ticket-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 24px;
  font-family: "Noto Sans JP", sans-serif;
  text-align: center;
}

.ticket-modal__links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.ticket-modal__link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: #666666;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  font-family: "Noto Sans JP", sans-serif;
  transition: background-color 0.3s ease;
}

.ticket-modal__link-btn:hover {
  background: #555555;
}

.ticket-modal__close {
  display: block;
  width: 100%;
  padding: 12px 24px;
  background: #f5f5f5;
  color: #333333;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  font-family: "Noto Sans JP", sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.ticket-modal__close:hover {
  background: #e0e0e0;
}

body.modal-open {
  overflow: hidden;
}

@media screen and (max-width: 599px) {
  .ticket-modal__content {
    padding: 24px;
    max-width: 90%;
  }

  .ticket-modal__title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .ticket-modal__link-btn {
    font-size: 16px;
    padding: 10px 20px;
  }

  .ticket-modal__close {
    font-size: 16px;
    padding: 10px 20px;
  }
}
