/* ================================
   DogSalon LOOP — Custom Calendar
   サイトのデザイントークンに準拠
   ================================ */

/* コンテナ */
#loop-calendar {
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.25rem 1.25rem;
  position: relative;
  overflow: hidden;
}

/* 背景のさりげない装飾 */
#loop-calendar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-accent-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ── ヘッダー（年月 + ナビ） ── */
.lc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.lc-title {
  text-align: center;
  line-height: 1.2;
}

.lc-year {
  display: block;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}

.lc-month-num {
  display: block;
  font-family: var(--font-accent);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.1;
}

.lc-month-label {
  display: block;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--color-primary);
  letter-spacing: 0.08em;
}

.lc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-light);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lc-nav:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}

/* ── 凡例 ── */
.lc-legend {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding-right: 0.25rem;
}

.lc-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.lc-badge-sample {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: #8b5e3c;
  position: relative;
}

.lc-badge-sample::after {
  content: '休';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 0.5rem;
  font-weight: 700;
}

/* ── グリッド共通 ── */
.lc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

/* ── 曜日行 ── */
.lc-weekdays {
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 0.25rem;
}

.lc-wday {
  text-align: center;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  padding: 0.35rem 0;
}

.lc-wday.lc-sun { color: #c75555; }
.lc-wday.lc-sat { color: #5580a0; }

/* ── 日付セル ── */
.lc-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.45rem 0 0.55rem;
  min-height: 52px;
}

.lc-day.lc-empty {
  min-height: 0;
  padding: 0.45rem 0;
}

.lc-date {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1;
}

.lc-day.lc-sun .lc-date  { color: #c75555; }
.lc-day.lc-sat .lc-date  { color: #5580a0; }

/* 今日 */
.lc-day.lc-today .lc-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 500;
}

/* 休業バッジ */
.lc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #8b5e3c;
  color: var(--color-white);
  font-size: 0.6rem;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(139, 94, 60, 0.3);
}

/* 休業日のセル背景をやや薄く */
.lc-day.lc-closed {
  background: rgba(139, 94, 60, 0.04);
  border-radius: var(--radius-sm);
}

/* ── 注意書き ── */
.lc-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

/* ── レスポンシブ ── */
@media (max-width: 560px) {
  #loop-calendar {
    padding: 1.25rem 0.75rem 1rem;
    border-radius: var(--radius-md);
  }

  .lc-month-num {
    font-size: 2rem;
  }

  .lc-day {
    min-height: 46px;
    padding: 0.35rem 0 0.45rem;
  }

  .lc-date {
    font-size: 0.78rem;
  }

  .lc-badge {
    width: 19px;
    height: 19px;
    font-size: 0.52rem;
  }
}
