/*
テーマ管理
 */
@import url("theme.css");

.header-top,
.toolbar,
.calendar-container {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

header {
    background-image: url('/static/images/table-2879201_1920_trimmed.jpg'); /* ✅ 用意した画像パス */
    background-size: cover;        /* 縮尺調整して全体にフィット（切り抜きあり） */
    background-position: center;   /* 中央揃え */
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 2rem 1rem;            /* 適度な上下余白 */
    background-color: #4CAF50;
}

.header-top {
    display: flex;                 /* 横並びにする */
    align-items: center;           /* 垂直方向で中央揃え */
    justify-content: space-between;/* ロゴとアバターを両端に配置 */
    /*padding: 10px 20px;
    border-bottom: 1px solid #ddd;*/
}

.title-container h2 {
    font-family: 'M PLUS Rounded 1c', sans-serif;  /* ✅ フォント変更 */
    font-size: 1.8rem;                              /* 少し大きめに */
    font-weight: 700;                               /* 太めで読みやすく */
    color: #fff;
    background-color: rgba(0, 0, 0, 0.4);           /* ✅ 半透明背景で読みやすさUP */
    padding: 0.5rem 1rem;
    border-radius: 12px;                            /* 丸みを追加 */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);     /* ✅ 光彩で明るい画像にも負けない */
    max-width: 90%;
    margin: 0 auto;
    display: inline-block;
}

/* ラベル全体を小さくする */
.sidebar-nav .infoBox {
    font-size: 0.85rem;   /* 小さめの文字サイズ */
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px;
}

/* チェックボックスのサイズを小さくする */
.sidebar-nav .infoBox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    transform: scale(0.85); /* ✅ 縮小（ブラウザによって互換性高） */
    cursor: pointer;
}

.calendar-container {
    /*献立計画未定義の場合以下の余白設定分の背景色が表示される*/
    padding: 2rem;
}

/* アイコンの色と表示強制 */
.icon {
    display: inline-block;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #2c3e50;
    font-size: 16px;
}

.icon.morning {
    color: #FFD700; /* 明るい黄色 */
}

.icon.noon {
    color: #32CD32; /* 明るいグリーン */
}

.icon.night {
    color: #745399; /* 藍色 */
}

/* カレンダー全体の設定 */
#calendar {
    display: grid;
    grid-template-columns: repeat(var(--calendar-cols, 7), 1fr); /* デフォルト7列 */
    gap: 8px;
}

/* 各週の行設定 */
.week-row {
    display: contents;
}

/* 各日のセル設定 */
.day-cell-plan,.day-cell-actual  {
    background-color:var(--primary-bg); /* 明るい背景色 */
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    cursor: default;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #2c3e50; /* テキストカラー */
}
.day-cell-plan{
        height: 200px; /* 通常のセル高さ */
}
.day-cell-actual{
        height: 370px; /* 通常のセル高さ */
}

.day-cell:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 詳細非表示の週の簡略化表示 */
.clickable {
    background-color: #ecf0f1;
    cursor: pointer;
    height: 50px; /* 高さを低く設定 */
}

/* 日付ラベルのスタイル */
.date-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #34495e;
    text-align: center;
    background-color: #dfe6e9;
    border-radius: 8px;
    padding: 5px 0;
}

/* 献立詳細部分のスタイル */
.meal-detail {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    padding: 5px;
    border-left: 4px solid #4caf50;
    background-color: #eafaf1;
    border-radius: 8px;
}

.meal-icon {
flex-shrink: 0; /* アイコンのサイズを固定 */
    font-size: 1.2em; /* アイコンサイズを調整 */
}

.meal-content {
    flex: 5; /* 右側の5割 */
    display: flex;
    flex-direction: column;
}

.meal-detail div {
    font-size: 12px;
    color: #34495e;
    margin-left: 10px;
}

/* レスポンシブ対応 */

/* スマホ表示では1列 */
@media screen and (max-width: 768px) {
    #calendar {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 767px) {
    #calendar {
        display: grid;
        grid-template-columns: 1fr; /* すべてのブラウザで1列表示を強制 */
    }
}

/* タブレット表示では2列 */
/* 768px以上1024px以下の場合 */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    #calendar {
        grid-template-columns: repeat(2, 1fr);
    }

    .day-cell-plan {
        height: 250px;
    }
    .day-cell-actual {
        height: 410px;
    }
}

/*
計画と実績の切り替え
 */
.view-toggle {
    margin-left: auto;
    padding-right: 20px;
    display: flex;
    align-items: center;
}
.toggle-label {
    margin-left: 8px;
    font-weight: bold;
}

input[type="date"] {
    font-size: 12px;
    height: 30px;
}

/*
食実績のスタイル
 */
/* 食事回ラベルのスタイル */
.meal-label {
    font-size: 14pt;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

/* 食事の詳細コンテナ */
.meal-container {
    display: flex;
    align-items: center;
    gap: 15px;  /* 画像とタイトルの間隔を広げる */
    margin-bottom: 10px;  /* 各食事の間隔を調整 */
}

/* 食事のサムネイル画像 */
.meal-thumb {
    width: 70px;  /* 画像のサイズ調整 */
    height: 70px;
    object-fit: cover;
}

/* 食事のタイトル */
.meal-container span {
    font-size: 12pt;
    color: var(--text-color);
}
