/* モバイル用の基本スタイル */
:root {
    --primary-color: #0066cc;
    --secondary-color: #ff0000;
    --background-color: #f5f5f5;
    --text-color: #333333;
    --border-color: #ddd;
    --read-color: #de821e;
    --unread-color: #ff0202;
}

.wrapper {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 10px 12px 30px 12px;
  border-radius: 10px;
}

/* フッターメニューの下に余白を確保 */
body {
    padding-bottom: 70px;
}

/* ヘッダー */

h2 {
    text-align: center;
    color: #0066cc;
    margin-top: 10px;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #e9e9e9;
    border-radius: 5px;
}

.calendar-nav a {
    text-decoration: none;
    color: #0066cc;
    font-weight: bold;
}

.calendar-nav strong {
    font-size: 1.2em;
}

.shift-input-day {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.shift-input-day strong {
    flex: 0 0 60px; /* 日付の幅を固定 */
    margin-right: 10px;
}

.shift-input-day input[type="text"] {
    flex-grow: 1; /* 残りのスペースを埋める */
    max-width: 100px; /* はみ出し防止のため最大幅を設定 */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.shift-input-day input[type="checkbox"] {
    margin-left: 15px;
    transform: scale(1.2); /* チェックボックスを少し大きく */
}

.shift-input-day label {
    margin-left: 5px; /* チェックボックスとの間隔 */
    white-space: nowrap;
}

.shift-input-day {
    display: flex;
    align-items: center;
    gap: 5px; /* 要素間のスペースを小さくする */
}

.save-button {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 20px auto;
  padding: 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
}

.save-button:hover {
  background: #0056b3;
}

.back-link {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 80px; /* フッターと被らないように余白を追加 */
}

.back-link a {
    color: #333; /* 文字色を黒に */
    text-decoration: none;
    font-weight: bold;
    display: inline-block; /* インラインブロック要素に */
    padding: 0; /* パディングをリセット */
    background: none; /* 背景色を透明に */
    border-radius: 0; /* 角丸をリセット */
}

/* ヘッダー */
.header {
    background: var(--primary-color);
    color: #fff;
    padding: 3px;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header h1 {
    margin: 0;
    font-size: 14px;
}

h3 {
    font-size: 1.4em;
    margin: 0 0 15px 0;
    padding: 10px 0;
    border-bottom: 2px solid var(--primary-color);
}

/* リンクスタイル */
a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    padding: 8px 0;
}

a:hover {
    text-decoration: underline;
}

/* フォーム要素 */
form {
    margin: 15px 0;
}

input[type="submit"], 
input[type="button"] {
    background: linear-gradient(145deg, var(--primary-color), #0052a3);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    margin: 10px 0;
    width: 100%;
    max-width: 300px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 
                0 4px 8px rgba(0, 102, 204, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

input[type="submit"]:hover, 
input[type="button"]:hover {
    background: linear-gradient(145deg, #0074e0, var(--primary-color));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 
                0 8px 16px rgba(0, 102, 204, 0.25);
    transform: translateY(-1px);
}

input[type="submit"]:active, 
input[type="button"]:active {
    background: linear-gradient(145deg, #004c96, #005db3);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

/* テーブル */
table {
    width: 100%;
    margin: 10px 0;
    border-collapse: collapse;
}

td {
    padding: 10px;
}

/* 区切り線 */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

/* ステータス表示 */
.status-text {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
    margin: 5px 0;
}

/* お知らせ掲示板セクション */
.page-header {
    margin-bottom: 20px;
}

.notice-list {
    margin: 15px 0;
}

.notice-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    overflow: hidden;
}

.notice-content {
    padding: 15px;
}

.notice-link {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 0;
}

.notice-title {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.notice-date {
    font-size: 0.9em;
    color: #666;
}

.notice-status {
    padding: 0 15px 15px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status-badge.read {
    background: linear-gradient(145deg, #de821e, #c97516);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.status-badge.unread {
    background: linear-gradient(145deg, #ff0202, #e60000);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 2, 2, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 2, 2, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 2, 2, 0);
    }
}

/* ページネーション */
.pagination-container {
    margin: 20px 0;
}

.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9em;
    text-decoration: none;
    transition: background-color 0.2s;
}

.page-link:hover {
    background-color: #0052a3;
    text-decoration: none;
}

.page-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    border-radius: 20px;
    font-size: 0.9em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 戻るリンク */
.back-link {
    margin: 20px 0;
}

.back-link a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    text-decoration: none;
}

/* 未読メッセージ */
span[style*="color:#FF0000"] {
    background-color: rgba(255, 0, 0, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
}

/* ナビゲーションリンク */
p a:not([href*="mypage_kinmu.php"]) {
    display: block;
    background-color: white;
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 勤務状態表示 */
a[href*="mypage_kinmu.php"] {
    display: inline-block;
    padding: 8px;
    border-radius: 5px;
    margin: 10px 0;
}

/* レスポンシブ対応 */
@media screen and (max-width: 480px) {
    body {
        padding: 12px;
    }

    h3 {
        font-size: 1.3em;
        margin-bottom: 8px;
    }

    h4 {
        font-size: 1.1em;
    }

    .notice-title {
        font-size: 1em;
    }

    .notice-date {
        font-size: 0.85em;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 0.85em;
    }

    .pagination-nav {
        gap: 6px;
    }
}

/* お知らせ詳細ページ */
.notice-detail {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 15px 0;
    padding: 20px;
}

.notice-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.notice-title {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.4;
    color: var(--text-color);
}

.notice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9em;
    color: #666;
}

.notice-date, .notice-author {
    display: flex;
    align-items: center;
}

.notice-content {
    line-height: 1.6;
    font-size: 1em;
}

.notice-content a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 2px 0;
}

.notice-content a:hover {
    text-decoration: underline;
}

.back-link {
    margin: 20px 0;
}

.back-link.top {
    margin-bottom: 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #0052a3;
    text-decoration: none;
}

/* タッチデバイス用の調整 */
@media screen and (max-width: 480px) {
  .fixed-footer {
    width: 98%;
    max-width: 98%;
  }
}

@media (hover: none) {
    a, button {
        min-width: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* 詳細ページのレスポンシブ対応 */
@media screen and (max-width: 480px) {
    .notice-detail {
        padding: 15px;
        margin: 10px 0;
    }

    .notice-title {
        font-size: 1.2em;
    }

    .notice-meta {
        font-size: 0.85em;
    }

    .notice-content {
        font-size: 0.95em;
    }

    .back-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

/* 固定フッターメニュー */
.fixed-footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 15px;
    z-index: 1000;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.fixed-footer.footer-hidden {
    transform: translate(-50%, 100%);
    opacity: 0;
}

.fixed-footer.footer-visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.footer-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
}

.footer-menu-item {
    display: flex!important;
    flex-direction: column!important;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 0.8em;
    padding: 5px;
}

.footer-menu-item i {
    font-size: 1.5em;
    margin-bottom: 4px;
    color: white;
}

.footer-menu-item.active {
    color: white;
    opacity: 0.7;
}

/* フッターメニューの下に余白を违加 */
body {
    padding-bottom: 70px;
}
