/* =========================================================
   app-extensions.css
   Workerアプリ用の拡張CSS（Bulma後に読み込む）
   =========================================================
   Bulmaで代替できないカスタムコンポーネントのみ定義
   ========================================================= */

/* =========================================================
   カスタム変数
   ========================================================= */
:root {
  --bottom-nav-height: 64px;
  --color-incentive: #7C3AED;
}

/* =========================================================
   App Container（モバイル幅制限）
   ========================================================= */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: calc(100vh - var(--bulma-navbar-height));
}

/* =========================================================
   Page Content（ボトムナビ分のpadding）
   ========================================================= */
.page-content {
  padding-bottom: calc(var(--bottom-nav-height) + 1rem);
}

/* =========================================================
   Period Navigator（週切り替えナビ）
   ========================================================= */
.period-navigator {
  position: sticky;
  top: var(--bulma-navbar-height);
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid hsl(var(--bulma-border-h, 0) var(--bulma-border-s, 0%) var(--bulma-border-l, 86%));
}

/* =========================================================
   Bottom Navigation（Bulmaにない）
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: #fff;
  border-top: 1px solid hsl(var(--bulma-border-h, 0) var(--bulma-border-s, 0%) var(--bulma-border-l, 86%));
  z-index: 50;
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1;
  min-height: 56px;
  border-radius: var(--bulma-radius);
  text-decoration: none;
  color: hsl(var(--bulma-text-weak-h) var(--bulma-text-weak-s) var(--bulma-text-weak-l));
  transition: color 0.15s;
  position: relative;
}

.bottom-nav-item:hover {
  color: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
}

.bottom-nav-item.is-active {
  color: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
}

.bottom-nav-item.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 2.5rem;
  height: 2px;
  background: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
  border-radius: 1px 1px 0 0;
}

.bottom-nav-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.bottom-nav-item.is-active .bottom-nav-icon {
  stroke-width: 2.5;
}

.bottom-nav-label {
  font-size: 0.75rem;
  font-weight: 500;
}

/* =========================================================
   Bottom Sheet Modal（Bulma modalの拡張）
   ========================================================= */
.modal.is-bottom-sheet {
  align-items: flex-end;
}

.modal.is-bottom-sheet .modal-card {
  width: 100%;
  max-width: 32rem;
  margin: 0;
  border-radius: 1rem 1rem 0 0;
}

.modal.is-bottom-sheet .modal-card-head {
  background: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
  border-radius: 1rem 1rem 0 0;
  border-bottom: none;
}

.modal.is-bottom-sheet .modal-card-title {
  color: white;
}

.modal.is-bottom-sheet .modal-card-foot {
  justify-content: stretch;
  gap: 0.75rem;
}

.modal.is-bottom-sheet .modal-card-foot .button {
  flex-grow: 1;
}

/* =========================================================
   Radio Card（Bulmaにない）
   ========================================================= */
.radio-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid hsl(var(--bulma-border-h) var(--bulma-border-s) var(--bulma-border-l));
  border-radius: var(--bulma-radius-large);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.radio-card:has(input:checked) {
  border-color: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
  background: hsl(var(--bulma-primary-h) var(--bulma-primary-s) 97%);
}

.radio-card input[type="radio"] {
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid hsl(var(--bulma-border-h) var(--bulma-border-s) var(--bulma-border-l));
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.radio-card input[type="radio"]:checked {
  border-color: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
}

.radio-card input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.625rem;
  height: 0.625rem;
  background: hsl(var(--bulma-primary-h) var(--bulma-primary-s) var(--bulma-primary-l));
  border-radius: 50%;
}

.radio-card span {
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--bulma-text-h) var(--bulma-text-s) var(--bulma-text-l));
}

.radio-card.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================================
   Shift Card（Bulma cardの拡張）
   ========================================================= */
.card.is-flex {
  display: flex;
  overflow: hidden;
}

.shift-card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  padding: 0.75rem 0;
  flex-shrink: 0;
  background: hsl(var(--bulma-primary-h, 195) var(--bulma-primary-s, 100%) var(--bulma-primary-l, 32%));
  border-radius: var(--bulma-radius-large, 16px) 0 0 var(--bulma-radius-large, 16px);
}

.shift-card-date.is-incentive {
  background: hsl(var(--bulma-warning-h, 44) var(--bulma-warning-s, 100%) var(--bulma-warning-l, 77%));
}

.shift-card-date.is-done {
  background: #94A3B8;
}

.shift-card-date.is-empty {
  background: #CBD5E1;
}

.shift-card-date-num {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.shift-card-day {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.375rem;
  line-height: 1;
}

/* =========================================================
   Toast Container
   ========================================================= */
.toast-container {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* =========================================================
   Gap Utilities（Bulmaに存在しない）
   ========================================================= */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.5rem; }
.gap-6 { gap: 2rem; }

