/* attend.css - attend.php 専用スタイルシート */

/* ===== 検索機能のスタイル (attend.php専用) ===== */
.search-section {
    width: 100%;
    max-width: 800px;
    /* 検索フォームの最大幅 */
    display: flex;
    flex-direction: column;
    /* 縦に並べる */
    gap: 15px;
    /* 各フォーム間のスペース */
    align-items: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    /* 少し透明な暗い背景 */
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    /* ネオン効果 */
    box-sizing: border-box;
}

/* ★★★ 日付フィルタリングフォームのスタイル ★★★ */
.date-filter-form {
    display: flex;
    flex-direction: column;
    /* 全体を縦方向に */
    gap: 10px;
    /* 各要素間のスペース */
    width: 100%;
    justify-content: center;
    align-items: center;
    /* 中央寄せ */
}

.date-filter-form>label {
    /* 「日付で絞り込み:」ラベル */
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 0 0 5px #ff0000;
    margin-bottom: 5px;
    /* 下のセレクトボックスとの間隔 */
}

/* 日付選択のセレクトボックスをタブ風に */
.date-filter-form select#selected_date {
    display: flex;
    /* select自体をflexコンテナに */
    font-size: 1.3rem;
    height: 30px;
    width: 100%;
    max-width: 400px;
    /* 日付タブの最大幅 */
    padding: 0;
    /* デフォルトのパディングをリセット */
    border: none;
    /* ボーダーを削除 */
    border-radius: 0;
    /* 角丸を削除 */
    background-color: white;
    /* 背景を透明に */
    box-shadow: none;
    /* シャドウを削除 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    overflow-x: auto;
    /* 横スクロール可能に */
    white-space: nowrap;
    /* テキストが折り返さないように */
    scrollbar-width: none;
    /* Firefoxのスクロールバーを非表示に */
    -ms-overflow-style: none;
    /* IE/Edgeのスクロールバーを非表示に */
    border: 2px solid rgba(255, 0, 0, 0.5);
    /* タブ全体のボーダー */
    border-radius: 5px;
    /* タブ全体の角丸 */
}

/* Webkit系のスクロールバーを非表示に */
.date-filter-form select#selected_date::-webkit-scrollbar {
    display: none;
}

/* 各日付オプションのスタイル (optionタグには直接スタイルが適用しづらいですが、努力します) */
.date-filter-form select#selected_date option {
    flex-shrink: 0;
    /* オプションが縮まないように */
    padding: 10px 15px;
    text-align: center;
    background-color: rgba(51, 51, 51, 0.8);
    /* 非選択時の背景 */
    color: #eee;
    border-right: 1px solid rgba(255, 0, 0, 0.3);
    /* 区切り線 */
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
    /* 各オプションが折り返さないように */
}

.date-filter-form select#selected_date option:last-child {
    border-right: none;
}

/* 選択されているオプションのスタイル (ブラウザによってはoption:checkedのスタイリングに限界があります) */
.date-filter-form select#selected_date option:checked {
    background-color: #ff0000;
    /* 選択時の背景色 */
    color: white;
    font-weight: bold;
}


/* ===== 女の子情報カードのスタイル (attend.php専用) ===== */
/* グリッドコンテナ */
.girl-cards-grid {
    display: grid;
    /* ★★★修正: 5列固定にする★★★ */
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    padding: 30px;
    justify-content: center;
    border-radius: 8px;
    margin: 0 auto;
    /* 中央寄せ */
    max-width: 1200px;
    /* 必要に応じて調整 */
    width: calc(100% - 40px);
    box-sizing: border-box;
}

/* 各女の子のカード */
.girl-card-attend {
    background-color: #000000bb;
    /* 半透明の黒 */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    color: inherit;
    /* 親から色を継承 */
    border: 2px solid #ff0000;
    /* 赤いボーダー */
    /* ★★★追加/修正: カードの高さを揃える & position: relative を追加 ★★★ */
    height: 80%;
    /* グリッドの子要素として高さが揃うように */
    position: relative;
    /* shift-time-display の absolute 配置の基準 */
    padding-bottom: 50px;
    /* shift-time-display の高さ分、下部に余白 */
}

.girl-card-attend:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(255, 0, 0, 0.7);
    /* ホバーで赤のシャドウ */
}

/* カード内のリンク部分 */
.girl-link-card-attend {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 15px;
    text-align: center;
    /* ★★★追加: 残りのスペースを埋める★★★ */
    flex-grow: 1;
    /* 名前や情報部分が残りスペースを埋める */
    display: flex;
    /* 子要素（h3, p）をflexアイテムとして扱う */
    flex-direction: column;
    /* 子要素を縦に並べる */
    justify-content: space-between;
    /* 上下均等に配置 */
}

.girl-link-card-attend img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 0, 0, 0.5);
}

.girl-link-card-attend h3 {
    margin: 5px 0;
    font-size: 1.2em;
    color: #ffffff;
    text-shadow: 0 0 3px #ff0000;
    /* ★★★追加: 名前の高さを固定/最小化★★★ */
    min-height: 1.2em;
    /* 1行分の最小高さを確保 (font-sizeと合わせる) */
    white-space: nowrap;
    /* 名前が折り返さないように */
    overflow: hidden;
    /* はみ出た部分を隠す */
    text-overflow: ellipsis;
    /* はみ出た部分を「...」で表示 */
    line-height: 1.2;
    /* 行の高さを明示的に設定 */
}

.girl-link-card-attend p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #ccc;
    /* ★★★追加: 身長/カップサイズの高さを固定/最小化★★★ */
    min-height: 0.9em;
    /* 1行分の最小高さを確保 */
    line-height: 1.2;
    /* 行の高さを明示的に設定 */
    flex-grow: 0;
    /* この要素は伸縮させない */
    flex-shrink: 0;
    /* この要素は縮小させない */
}

/* シフト情報の部分全体を非表示にする (以前の shift-info はこのまま維持) */
.shift-info {
    display: none;
    /* 以下のプロパティはdisplay:none;で無視されますが、念のため残しておきます */
    border-top: 1px solid rgba(255, 0, 0, 0.3);
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    flex-grow: 1;
}

/* ★★★追加: 新しい出勤時間表示のスタイル ★★★ */
.shift-time-display {
    background-color: rgba(255, 0, 0, 0.7);
    /* 赤系の背景 */
    color: white;
    padding: 8px 10px;
    border-radius: 0 0 8px 8px;
    /* 下部のみ角丸 */
    text-align: center;
    font-weight: bold;
    font-size: 0.8em;
    width: 100%;
    /* カードの幅いっぱいに広げる */
    box-sizing: border-box;
    /* paddingを幅に含める */
    position: absolute;
    /* 親要素 .girl-card-attend を relative にして下部に固定 */
    bottom: 0;
    left: 0;
    box-shadow: 0 -2px 5px rgba(255, 0, 0, 0.3);
    /* 下からの影 */
    z-index: 2;
    /* 他の要素より手前に表示されるように */
}

.shift-time-display p {
    margin: 0;
    /* デフォルトのマージンをリセット */
    line-height: 1.2;
}


/* ===== レスポンシブ対応 (attend.php専用) ===== */
@media (max-width: 768px) {

    .container h1{
        font-size: 2em;
    }
    /* 検索セクションの調整 */
    .search-section {
        padding: 15px;
        gap: 10px;
    }

    /* 日付フィルタリングフォームの調整 */
    .date-filter-form select#selected_date {
        max-width: 100%;
        /* 小さい画面では全幅に */
    }

    /* カードグリッドの調整 */
    .girl-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
        width: calc(100% - 10px);
    }

    .girl-link-card-attend img {
        height: 180px;
    }

    .shift-time-display p {
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {

    /* 検索セクションの調整 */
    .search-section {
        padding: 10px;
    }

    .date-filter-form>label {
        font-size: 1rem;
    }

    .date-filter-form select#selected_date option {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    /* カードグリッドの調整 */
    .girl-cards-grid {
        /* ★★★修正: 480px以下では2列にする★★★ */
        grid-template-columns: repeat(2, 1fr);
        /* 1列だとカードが大きくなりすぎる場合を考慮して2列に */
        gap: 15px;
        padding: 15px;
        width: calc(100% - 10px);
    }

    .girl-link-card-attend img {
        height: 150px;
    }

    .girl-link-card-attend h3 {
        font-size: 1.1em;
        /* min-heightはここで調整するなら必要 */
    }

    .girl-link-card-attend p {
        /* このpは出勤情報以外のpタグ用 */
        font-size: 0.85em;
    }

    .girl-card-attend {
        padding-bottom: 40px;
    }
}