@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600&display=swap');

body {
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f2f2f7;
  color: #1c1c1e;
}
h1 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 10px;
}

/* HTML: <div class="ribbon">Your text content</div> */
.ribbon {
  font-size: 1.2em;
  font-weight: bold;
  color: #fff;
}
.ribbon {
  --r: .8em; /* control the cutout */
  
  padding-inline: 1lh calc(var(--r) + .25em);
  line-height: 1.8;
  clip-path: polygon(1lh 100%,calc(100% - var(--r)) 100%,100% 50%,calc(100% - var(--r)) 0,1lh 0,1lh -999px,0 -999px,0 0);
  border-image: conic-gradient(#D95B43 0 0) fill 0//999px;
  outline: 999px solid #0004;
  width: fit-content;
  margin: 0 auto 15px auto;
}


.date-container {
  display: flex;
  justify-content: center; /* ⭐ 水平置中 */
  align-items: center;
  gap: 10px;
  margin-bottom: 16px; /* optional: 保持與下方日曆距離 */
  margin-left: 35px;
}

.date-input {
  height: 40px;
  padding: 0 10px;
  border: none;
  border-bottom: 2px solid #B0BEC5;
  font-size: 1em;
  color: #999999;
  background-color: transparent;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  text-align: center;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  max-width: 140px;             /* ✅ 限制最大寬度 */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.date-input:focus {
  border-bottom-color: #42A5F5;
}

.separator {
  font-size: 18px;
  color: #424242;
}

.search-btn {
    height: auto;
    padding: 5px;
    background-color: rgb(183 183 183);
    color: white;
    border: none;
    /* border-radius: 6px; */
    cursor: pointer;
    font-size: 22px;
}

/* 日期範圍和過濾器控制欄 */
.date-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 10px;
}

.date-range-text {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  user-select: none;
  flex: 1;
  text-align: center;
  font-weight: 600;
  margin-left: 80px;
}

.date-range-text:hover {
  color: #42A5F5;
}

.filter-icons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 簡約風格的過濾器 Icon 按鈕（無 border） */
.filter-icon-btn-simple {
  width: 32px;
  height: 32px;
  border: none;
  background-color: transparent;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  position: relative;
  padding: 0;
}

.filter-icon-btn-simple:hover {
  color: #42A5F5;
  transform: scale(1.1);
}

.filter-icon-btn-simple.has-filters {
  color: #42A5F5;
}

.filter-badge-simple {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ff4444;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}

/* 簡約風格的分享按鈕（無 border） */
.share-icon-btn-simple {
  width: 32px;
  height: 32px;
  border: none;
  background-color: transparent;
  color: #42A5F5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s ease;
  padding: 0;
}

.share-icon-btn-simple:hover {
  color: #1a73e8;
  transform: scale(1.1);
}

.share-icon-btn-simple.share-success {
  color: #4CAF50;
  animation: successPulse 0.5s ease;
}

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

/* 分享成功提示 */
.share-success-message {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4CAF50;
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* 過濾面板 */
.filter-panel {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 16px auto;
  padding: 20px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  box-sizing: border-box;
  display: block;
}

.filter-section {
  margin-bottom: 24px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #424242;
  margin-bottom: 12px;
}

.filter-count {
  font-size: 12px;
  color: #42A5F5;
  font-weight: normal;
}

/* 修改 date-container 在過濾面板內的樣式 */
.filter-panel .date-container {
  margin-left: 0;
  margin-bottom: 0;
}

/* 過濾面板內的店家標籤樣式 */
.filter-panel .organizer-tags-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  justify-content: flex-end;
}

.filter-panel .tag-action-btn {
  padding: 6px 12px;
  border: 1px solid #B0BEC5;
  border-radius: 6px;
  background-color: white;
  color: #424242;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-panel .tag-action-btn:hover {
  background-color: #f0f0f0;
  border-color: #42A5F5;
}

.filter-panel .organizer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.filter-panel .organizer-tag {
  padding: 8px 16px;
  border: 2px solid;
  border-radius: 20px;
  background-color: #f0f0f0;
  color: #424242;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.filter-panel .organizer-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.filter-panel .organizer-tag-selected {
  font-weight: 600;
}

/* 店家過濾器樣式 */
.filter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.filter-toggle-btn {
  height: 40px;
  padding: 0 20px;
  border: 2px solid #B0BEC5;
  border-radius: 20px;
  background-color: white;
  color: #424242;
  font-size: 1em;
  cursor: pointer;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-toggle-btn:hover {
  border-color: #42A5F5;
  background-color: #f8f9fa;
}

.organizer-tags-container {
  width: 100%;
  max-width: 600px;
  padding: 15px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.organizer-tags-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  justify-content: flex-end;
}

.tag-action-btn {
  padding: 6px 12px;
  border: 1px solid #B0BEC5;
  border-radius: 6px;
  background-color: white;
  color: #424242;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-action-btn:hover {
  background-color: #f0f0f0;
  border-color: #42A5F5;
}

.organizer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.organizer-tag {
  padding: 8px 16px;
  border: 2px solid;
  border-radius: 20px;
  background-color: #f0f0f0;
  color: #424242;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.organizer-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.organizer-tag-selected {
  font-weight: 600;
}

/* 響應式設計 */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  .date-filter-bar {
    padding: 0 5px;
    margin-bottom: 12px;
  }
  
  .date-range-text {
    font-size: 12px;
  }
  
  .filter-icon-btn-simple,
  .share-icon-btn-simple {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .filter-badge-simple {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }
  
  .organizer-tags-container {
    max-width: 100%;
    padding: 10px;
  }
  
  .organizer-tag {
    font-size: 0.85em;
    padding: 6px 12px;
  }
  
  .filter-panel {
    padding: 15px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
  }
  
  .filter-panel .date-container {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }
  
  .filter-panel .date-input {
    max-width: 120px;
    font-size: 0.9em;
    flex: 0 0 auto;
  }
  
  .filter-panel .separator {
    font-size: 16px;
    flex: 0 0 auto;
  }
  
  .filter-panel .search-btn {
    flex: 0 0 auto;
  }
  
  .share-success-message {
    font-size: 12px;
    padding: 10px 20px;
    top: 70px;
    max-width: 90%;
    text-align: center;
  }
}

.hidden-date {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}



.filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
button {
  padding: 5px 10px;
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-list table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: inherit;
  margin-bottom: 20px;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  padding: 15px;
}
.event-list table:nth-child(odd) {
  background-color: #f9f9fa;

  }





.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 10px;
  background-color: #f2f2f7;
  border-radius: 16px;
  margin-bottom: 20px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 14px;
  color: #999;
  padding: 4px 10px;
}

.day-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  min-height: auto;
  border-radius: 12px;
  background-color: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  padding: 6px;
  overflow: visible;
}

.day-card.today {
  background-color: #DDDEAB;
}

.day-number {
  align-self: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.event-tag {
  display: inline-block;
  background-color: #007aff;
  color: white;
  font-size: 12px;
  padding: 1px 5px;
  margin: 2px 2px 0 0;
  border-radius: 8px;
  white-space: nowrap;
  text-align: center;
}
.company-logo {
  position: fixed;   /* 固定在視窗 */
  right: 0;          /* 緊貼右邊 */
  bottom: 0;         /* 緊貼下方 */
  margin: 0;         /* 取消任何預設外距 */
  width: 10em;       /* 視需要調整 Logo 大小 */
  height: auto;      /* 保持比例 */
  z-index: 1000;     /* 確保不被其它元素蓋住 */
}

/* 桌機/大螢幕時，活動列表改用多欄 Grid 排版 */
@media (min-width: 800px) {
  .event-list {
    display: grid;
    /* 自動填滿，每欄最小寬度 320px，最大平均分配 */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    /* 欄與欄間隔 */
    padding: 0 20px;
    /* 左右內距，看你需要 */
  }

  .event-list a {
    /* 讓 <a> 跟 Grid 單元格同寬 */
    display: block;
  }

  .event-list table {
    /* 移除原本的 margin-bottom，改用 Grid gap */
    margin-bottom: 0;
  }
}

@media (min-width: 1024px) {

  /* 1. 讓 day-card 水平排列，且靠左開始 */
  .calendar-grid .day-card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    /* 從左邊開始排 */
  }

  /* 2. event-tag 固定順序，左邊間隔 */
  .calendar-grid .day-card .event-tag {
    order: 1;
    margin-right: 4px;
  }

  /* 3. day-number 排在最後並靠右 */
  .calendar-grid .day-card .day-number {
    order: 2;
    margin-left: auto;
    /* 把自己推到最右 */
  }
}
.weekday-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border: 2px solid;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
}