/* Uni1Kuji Calendar React 版本樣式 */

/* 標籤容器樣式 */
.uni1kuji-calendar-container .container {
  margin-bottom: 1.5rem;
  max-width: 100%;
  overflow: visible;
  padding-bottom: 10px;
}

.uni1kuji-calendar-container .tabs {
  display: flex;
  position: relative;
  background-color: #fff;
  box-shadow: 0 0 1px 0 rgba(140, 150, 168, 0.15), 0 6px 12px 0 rgba(92, 101, 117, 0.15);
  padding: 0.75rem;
  border-radius: 25px;
  max-width: 100%;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  justify-content: space-around;
  flex-wrap: wrap;
  min-height: 50px;
}

.uni1kuji-calendar-container .tabs * {
  z-index: 2;
}

.uni1kuji-calendar-container .container input[type="radio"] {
  display: none;
}

.uni1kuji-calendar-container .tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  width: 60px;
  font-size: 0.9rem;
  color: black;
  font-weight: 500;
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.15s ease-in;
  white-space: nowrap;
  position: relative;
  margin: 2px;
  padding: 0 0 0 5px;
}

.uni1kuji-calendar-container .month-text {
  display: block;
  text-align: center;
  width: 100%;
}

.uni1kuji-calendar-container .notification {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  border-radius: 50%;
  margin: 0px;
  background-color: #e6eef9;
  transition: 0.15s ease-in;
  transform: translate(30%, -30%);
}

.uni1kuji-calendar-container .container input[type="radio"]:checked + label {
  color: #000;
  padding-left: 5px;
}

.uni1kuji-calendar-container .container input[type="radio"]:checked + label > .notification {
  background-color: #9CADBA;
  color: #fff;
  margin: 0px;
}

/* 動態計算滑動指示器位置 */
.uni1kuji-calendar-container .glider {
  position: absolute;
  display: flex;
  height: 38px;
  width: 60px; /* 增加寬度 */
  background-color: #e6eef9;
  z-index: 1;
  border-radius: 99px;
  transition: 0.25s ease-out;
  top: 0.75rem;
  left: 0;
  margin: 2px;
}

/* 卡片樣式優化 */
.uni1kuji-calendar-container .grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .uni1kuji-calendar-container .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .uni1kuji-calendar-container .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 響應式調整 - 手機版月份選擇器樣式 */
/* 手機版月份選擇器容器 - 無論螢幕大小都先設定基本樣式 */
.mobile-month-selector {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
  display: block !important;
  z-index: 100;
}

/* 當前月份顯示區 */
.current-month {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
}

.current-month.open {
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.month-title {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.arrow {
  border-style: solid;
  border-width: 0.15em 0.15em 0 0;
  content: '';
  display: inline-block;
  height: 0.45em;
  width: 0.45em;
  position: relative;
  transform: rotate(135deg);
  transition: transform 0.3s ease;
}

.current-month.open .arrow {
  transform: rotate(-45deg);
}

/* 月份選項列表 */
.month-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.month-options.open {
  max-height: 300px;
  overflow-y: auto;
}

.month-option {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.month-option:hover {
  background-color: #f5f5f5;
}

.month-option.active {
  background-color: #f0f0f0;
  font-weight: 600;
}

.month-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 月份輪播器 */
.month-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 15px 0;
  margin-top: 15px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.month-carousel::-webkit-scrollbar {
  display: none;
}

.month-carousel-item {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  margin: 0 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #f5f5f5;
  border-radius: 50%;
  scroll-snap-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.month-carousel-item.active {
  background-color: #007bff;
  color: white;
  transform: scale(1.1);
}

.month-number {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.month-text {
  font-size: 12px;
  margin-top: 2px;
}

/* 通知徽章樣式 */
.mobile-month-selector .notification {
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 5px;
}

.month-carousel-item .notification {
  position: absolute;
  top: -5px;
  right: -5px;
  margin-left: 0;
}

@media (max-width: 767px) {
  /* 隱藏桌面版標籤 */
  .container .tabs,
  .tabs-container .tabs,
  .uni1kuji-calendar-container .container .tabs {
    display: none !important;
  }
  
  .current-month.open {
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }
  
  .month-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
  }
  
  .arrow {
    border-style: solid;
    border-width: 0.15em 0.15em 0 0;
    content: '';
    display: inline-block;
    height: 0.45em;
    width: 0.45em;
    position: relative;
    transform: rotate(135deg);
    transition: transform 0.3s ease;
  }
  
  .current-month.open .arrow {
    transform: rotate(-45deg);
  }
  
  /* 月份選項列表 */
  .month-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 10;
  }
  
  .month-options.open {
    max-height: 300px;
    overflow-y: auto;
  }
  
  .month-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  
  .month-option:hover {
    background-color: #f5f5f5;
  }
  
  .month-option.active {
    background-color: #f0f0f0;
    font-weight: 600;
  }
  
  .month-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  /* 月份輪播器 */
  .month-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 15px 0;
    margin-top: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  
  .month-carousel::-webkit-scrollbar {
    display: none;
  }
  
  .month-carousel-item {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    margin: 0 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 50%;
    scroll-snap-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
  }
  
  .month-carousel-item.active {
    background-color: #007bff;
    color: white;
    transform: scale(1.1);
  }
  
  .month-number {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
  }
  
  .month-text {
    font-size: 12px;
    margin-top: 2px;
  }
  
  /* 通知徽章樣式 */
  .notification {
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 5px;
  }
  
  .month-carousel-item .notification {
    position: absolute;
    top: -5px;
    right: -5px;
    margin-left: 0;
  }
  
  /* 確保手機版選擇器在所有情況下都顯示 */
  .uni1kuji-calendar-container .mobile-month-selector {
    display: block !important;
  }
  
  /* 確保所有手機版元素都正確顯示 */
  .mobile-month-selector * {
    display: block;
  }
  
  .mobile-month-selector .current-month {
    display: flex !important;
  }
  
  .mobile-month-selector .month-carousel {
    display: flex !important;
  }
  
  .mobile-month-selector .month-carousel-item {
    display: flex !important;
  }
  
  .mobile-month-selector .notification {
    display: flex !important;
  }
}

/* 卡片樣式 */
.uni1kuji-calendar-container .block {
  display: block;
  text-decoration: none;
  color: inherit;
}

.uni1kuji-calendar-container .bg-white {
  background-color: #fff;
}

.uni1kuji-calendar-container .rounded,
.uni1kuji-calendar-container .rounded-t {
  border-radius: 0.375rem;
}

.uni1kuji-calendar-container .rounded-t {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.uni1kuji-calendar-container .shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.uni1kuji-calendar-container .hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.uni1kuji-calendar-container .transition {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.uni1kuji-calendar-container .w-full {
  width: 100%;
}

.uni1kuji-calendar-container .h-48 {
  height: 12rem;
}

.uni1kuji-calendar-container .object-cover {
  object-fit: cover;
}

.uni1kuji-calendar-container .p-4 {
  padding: 1rem;
}

.uni1kuji-calendar-container .font-medium {
  font-weight: 500;
}

.uni1kuji-calendar-container .line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.uni1kuji-calendar-container .text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.uni1kuji-calendar-container .text-gray-500 {
  color: #6b7280;
}

.uni1kuji-calendar-container .mt-1 {
  margin-top: 0.25rem;
}

.uni1kuji-calendar-container .mt-4 {
  margin-top: 1rem;
}

.uni1kuji-calendar-container .mb-3 {
  margin-bottom: 0.75rem;
}

.uni1kuji-calendar-container .mb-8 {
  margin-bottom: 2rem;
}

.uni1kuji-calendar-container .text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.uni1kuji-calendar-container .font-semibold {
  font-weight: 600;
}

.uni1kuji-calendar-container .text-red-500 {
  color: #ef4444;
}

.uni1kuji-calendar-container .text-gray-400 {
  color: #9ca3af;
}

.uni1kuji-calendar-container .text-center {
  text-align: center;
}

.uni1kuji-calendar-container .py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}
