/**
 * Year-Month Picker Styles
 * tower-tumarデザインシステムに適合
 */

.ymc-wrapper {
  position: relative;
  display: inline-block;
}

.ymc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--primary);
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Antonio', sans-serif;
}

.ymc-trigger:hover {
  background: var(--primary);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(251, 203, 21, 0.3);
}

.ymc-trigger:hover svg {
  fill: var(--black);
}

.ymc-trigger-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ドロップダウン */
.ymc-dropdown {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0px 5px 5px -3px rgba(0,0,0,0.2), 
              0px 8px 10px 1px rgba(0,0,0,0.14), 
              0px 3px 14px 2px rgba(0,0,0,0.12);
  padding: 16px;
  min-width: 240px;
  animation: ymc-fadeIn 0.2s ease;
}

@keyframes ymc-fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 年ナビゲーション */
.ymc-year-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.ymc-year-prev,
.ymc-year-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.54);
  transition: all 0.2s ease;
}

.ymc-year-prev:not([disabled]):hover,
.ymc-year-next:not([disabled]):hover {
  background: rgba(251, 203, 21, 0.1);
  color: var(--primary);
}

.ymc-year-prev[disabled],
.ymc-year-next[disabled] {
  color: rgba(0, 0, 0, 0.26);
  cursor: default;
}

.ymc-year-display {
  font-family: 'Antonio', sans-serif;
  font-size: 20px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.87);
  transform: skew(5deg);
  display: inline-block;
}

/* 月グリッド */
.ymc-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ymc-month-btn {
  height: 40px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  color: rgba(0, 0, 0, 0.87);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  font-family: 'Lato', 'Noto Sans JP', sans-serif;
}

.ymc-month-btn:not([disabled]):hover {
  background: rgba(251, 203, 21, 0.15);
  transform: scale(1.05);
}

.ymc-month-btn[disabled] {
  color: rgba(0, 0, 0, 0.26);
  cursor: default;
}

/* 選択中の月 */
.ymc-month-btn.ymc-current {
  background: var(--primary);
  color: var(--black);
  font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .ymc-trigger {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .ymc-trigger-text {
    font-size: 16px;
  }
  
  .ymc-dropdown {
    min-width: 200px;
    padding: 12px;
  }
  
  .ymc-month-btn {
    height: 36px;
    font-size: 13px;
  }
}

/* ダークモード対応 */
.section-bg-dark .ymc-trigger {
  background: rgba(0, 0, 0, 0.9);
  border-color: var(--primary);
}

.section-bg-dark .ymc-trigger:hover {
  background: var(--primary);
}

/* 赤バリアント（events用） */
.ymc-wrapper.ymc-red .ymc-trigger {
  border-color: var(--secondary);
}

.ymc-wrapper.ymc-red .ymc-trigger:hover {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 4px 8px rgba(215, 0, 15, 0.3);
}

.ymc-wrapper.ymc-red .ymc-trigger:hover svg {
  fill: #fff;
}

.ymc-wrapper.ymc-red .ymc-trigger svg {
  fill: var(--secondary);
}

/* アニメーション: ピッカー配置エリア */
.ymc-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
  background: transparent;
}

.ymc-container-inner {
  max-width: 1200px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
