/* css/style.css */

/* 基本設定とフォント */
body {
    font-family: 'Segoe UI', 'BIZ UDPGothic', 'メイリオ', Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* 背景を少し暗めに */
    color: #333;
    line-height: 1.6;
    display: flex; /* 中央寄せのためにflexboxを使用 */
    justify-content: center;
    align-items: flex-start; /* 上部に寄せる */
    min-height: 100vh; /* 画面全体の高さ */
    box-sizing: border-box; /* パディングを考慮したボックスサイズ */
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px; /* 少し大きめの角丸 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* 深めの影 */
    margin: 40px auto; /* 上下に余白を追加 */
    max-width: 800px; /* 最大幅を調整 */
    width: 90%; /* レスポンシブ対応 */
    text-align: center;
}

h1 {
    color: #2c3e50; /* 濃いめのグレー */
    margin-bottom: 30px;
    font-size: 2em; /* フォントサイズを大きく */
    font-weight: 600; /* 少し太めに */
}

/* ボタンの共通スタイル */
button {
    background-color: #3498db; /* 青系のメインカラー */
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 8px;
    border-radius: 8px; /* 角丸を適用 */
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease; /* ホバーアニメーション */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); /* 影を追加 */
}

button:hover {
    background-color: #2980b9; /* ホバーで少し暗く */
    transform: translateY(-2px); /* 少し上に浮き上がる */
}

button:active {
    transform: translateY(0); /* クリック時に元の位置に戻る */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- admin.html のスタイル --- */
.reception-list {
    margin-top: 30px;
    overflow-x: auto; /* テーブルがはみ出る場合にスクロール可能に */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden; /* 角丸を有効にする */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

th, td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: middle;
}

thead th {
    background-color: #f8f9fa; /* ヘッダーの背景色 */
    color: #555;
    font-weight: 600;
    white-space: nowrap; /* ヘッダーのテキストが改行されないように */
}

tbody tr:nth-child(even) {
    background-color: #fbfbfb; /* 交互の行の背景色 */
}

tbody tr:hover {
    background-color: #eaf6ff; /* ホバーで薄い青 */
}

/* リセットボタンのスタイル (admin.html) */
.reset-btn {
    background-color: #e74c3c; /* 赤系の色 */
    margin-bottom: 20px;
}
.reset-btn:hover {
    background-color: #c0392b;
}

/* --- reception.html のスタイル --- */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
    font-size: 1.1em;
}

input[type="number"],
input[type="text"] {
    width: calc(100% - 22px); /* パディング分を考慮 */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box; /* パディングを考慮 */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); /* フォーカス時の影 */
    outline: none;
}

.smoking-pref-buttons {
    display: flex;
    gap: 15px; /* ボタン間のスペース */
    margin-top: 10px;
}

.pref-button {
    flex: 1; /* 親要素に合わせて幅を均等に */
    background-color: #ecf0f1; /* 非選択時の背景色 */
    color: #7f8c8d; /* 非選択時の文字色 */
    border: 1px solid #bdc3c7;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: none; /* デフォルトのボタン影を削除 */
}

.pref-button:hover:not(.active) {
    background-color: #e0e6e9;
    color: #34495e;
    transform: translateY(-1px);
}

.pref-button.active {
    background-color: #3498db; /* 選択時の背景色 */
    color: white; /* 選択時の文字色 */
    border-color: #3498db;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.25); /* 選択時の影 */
    transform: translateY(-2px);
}

#message {
    margin-top: 25px;
    font-size: 1.1em;
    font-weight: bold;
    color: #28a745; /* 成功メッセージの色 */
}

/* レスポンシブ対応 (reception.htmlのボタン) */
@media (max-width: 600px) {
    .smoking-pref-buttons {
        flex-direction: column; /* 小さい画面では縦に並べる */
    }
    .pref-button {
        width: 100%;
    }
}