/*
 * Madarao Activity Status - フロント表示
 * モダンで洗練されたデザイン (Tailwindライクなスタイル)
 */

.mas-board {
    --mas-text: #334155;
    --mas-text-light: #64748b;
    --mas-line: #f1f5f9;
    --mas-bg: transparent;

    background: var(--mas-bg);
    color: var(--mas-text);
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mas-board * {
    box-sizing: border-box;
}

/* 見出し (ボーダーや背景をなくし、スッキリとしたタイポグラフィに) */
.mas-board__head {
    background: transparent;
    color: #0f172a;
    text-align: left;
    font-weight: 800;
    font-size: 18px;
    padding: 0 0 12px 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    letter-spacing: 0.02em;
}

/* ステータスバッジ (ピル型でモダンに) */
.mas-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}
.mas-status__sym {
    font-size: 1.15em;
    font-weight: 800;
    line-height: 1;
    margin-right: 2px;
}

.mas-status--open {
    background: #d1fae5;
    color: #047857;
}
.mas-status--closed {
    background: #fee2e2;
    color: #b91c1c;
}
.mas-status--tbd {
    background: #fef3c7;
    color: #b45309;
}
.mas-status--full {
    background: #ffedd5;
    color: #c2410c;
}
.mas-status--out {
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}
/* 満席(空席=none)は彩度を落として「実質受付終了」を伝える */
.mas-status--muted {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

/* セル内の日付ラベル(v1.6 窓シフトでブロックごとに異なるため明示) */
.mas-celllabel {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

/* 空席記号の凡例 */
.mas-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--mas-line);
}
.mas-legend__item { white-space: nowrap; }

/* コメント */
.mas-comment-note {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-top: 6px;
    white-space: normal;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
}
.mas-comment-note__day {
    font-weight: 700;
    color: #475569;
}

.mas-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}
.mas-link:hover { text-decoration: underline; color: #0284c7; }

.mas-hours {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-top: 2px;
}

/* 最終更新フッター */
.mas-updated {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    padding: 12px 0 0;
    margin-top: 16px;
}
.mas-updated--inline {
    margin-top: 0;
    padding: 4px 0 0;
}

/* ============================================================= */
/* フルボード                                                    */
/* ============================================================= */
.mas-table {
    width: 100%;
    border-collapse: collapse;
}
.mas-table .mas-th {
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    padding: 10px 12px;
    text-align: center;
    border-bottom: 2px solid var(--mas-line);
}
.mas-table .mas-th--name { text-align: left; }
.mas-th__date {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}
.mas-row > .mas-name {
    text-align: left;
    padding: 16px 12px;
    font-size: 15px;
    color: #0f172a;
    font-weight: 700;
    border-bottom: 1px solid var(--mas-line);
    vertical-align: middle;
}
.mas-row > .mas-cell {
    text-align: center;
    padding: 16px 12px;
    border-bottom: 1px solid var(--mas-line);
    vertical-align: middle;
}
.mas-row:last-child > * { border-bottom: none; }

/* ============================================================= */
/* サイドバー版                                                  */
/* ============================================================= */
.mas-board--sidebar { max-width: 100%; }
.mas-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mas-list__item {
    padding: 0 0 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--mas-line);
}
.mas-list__item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}
.mas-list__name {
    font-weight: 800;
    font-size: 16px;
    color: #0f172a;
    margin-bottom: 12px;
}

.mas-list__cells {
    display: flex;
    gap: 8px;
}
.mas-list__cell {
    flex: 1 1 0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
}
.mas-list__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

/* ============================================================= */
/* コンパクト帯                                                  */
/* ============================================================= */
.mas-board--compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}
.mas-compact__name {
    font-weight: 800;
    color: #0f172a;
    font-size: 16px;
}
.mas-compact__cells {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}
.mas-compact__cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mas-compact__label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

/* ============================================================= */
/* スロット(フライト便)                                          */
/* ============================================================= */
/* フルボード セル内の便縦積み */
.mas-slots--stack { display: flex; flex-direction: column; gap: 8px; }
.mas-slotitem { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mas-slotitem__name { font-size: 12px; font-weight: 600; color: #64748b; }
.mas-slots--inline { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; }

/* サイドバー: 便グリッド(便名 | 本日 | 明日) */
.mas-slotgrid {
    display: table;
    width: 100%;
    table-layout: fixed; /* 文字が見切れないように固定幅に */
    border-collapse: collapse;
}
.mas-slotgrid__head, .mas-slotgrid__row { display: table-row; }

.mas-slotgrid__slotname,
.mas-slotgrid__day {
    display: table-cell;
    padding: 10px 4px;
    border-top: 1px solid var(--mas-line);
    vertical-align: middle;
    text-align: center;
}
/* 列幅を調整 */
.mas-slotgrid__slotname { width: 44%; text-align: left; font-size: 12px; font-weight: 700; color: #334155; }
.mas-slotgrid__day { width: 28%; }

.mas-slotgrid__head .mas-slotgrid__slotname,
.mas-slotgrid__head .mas-slotgrid__day {
    border-top: none;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    padding-top: 0;
    padding-bottom: 8px;
}

/* コンパクト: 便を横並び */
.mas-compact__slots { display: flex; flex-wrap: wrap; gap: 12px; }
.mas-compact__slot { background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.mas-compact__slotname { font-size: 13px; font-weight: 800; color: #334155; margin-bottom: 8px; }
.mas-compact__slotdays { display: flex; gap: 12px; }

/* 準備中バッジ + 案内文 */
.mas-prep {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    background: #f0f9ff;
    border: 1px dashed #bae6fd;
    padding: 12px;
    border-radius: 8px;
}
.mas-prep__badge {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}
.mas-prep__notice {
    font-size: 13px;
    color: #0c4a6e;
    line-height: 1.5;
    font-weight: 600;
}
.mas-row--preparing .mas-cell { text-align: left; }

/* 予約リンク (リッチなボタン) */
.mas-booking {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: #10b981;
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    line-height: 1;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    transition: all 0.2s ease;
}
.mas-booking:hover {
    background: #059669;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.4);
    text-decoration: none;
    transform: translateY(-1px);
}
.mas-cell--booking { text-align: right !important; padding: 12px 10px; }
.mas-row--booking td { border-bottom: 1px solid var(--mas-line); }

/* ============================================================= */
/* レスポンシブ                                                  */
/* ============================================================= */
@media (min-width: 768px) {
    .mas-board { font-size: 15px; }
    .mas-board__head { font-size: 18px; }
    .mas-board--compact { flex-direction: row; align-items: center; justify-content: space-between; }
    .mas-board--compact .mas-updated--inline { width: 100%; text-align: right; }
}

@media (max-width: 360px) {
    .mas-list__cells { flex-direction: column; }
    .mas-slotgrid__slotname { width: 40%; font-size: 11px; }
    .mas-slotgrid__day { width: 30%; }
    .mas-status { padding: 4px; font-size: 11px; }
    .mas-status__label { font-size: 10px; }
}
