@charset "utf-8";

* {
    box-sizing: border-box;
}

@media screen and (min-width: 768px) {
    .hamburger {
        display: none;
    }

    main {
        width: fit-content;
        margin: 0 auto;
        padding: 1em;
        padding-right: 150px;
    }

    .content-wrapper {
        display: flex;
        /* ナビとメインコンテンツを横並びにするFlexコンテナ */
        flex-grow: 1;
        /* 残りの垂直方向のスペースを全て占める */
        width: 100%;
        /* 幅は親要素に合わせる */
        overflow: hidden;
        /* コンテンツがはみ出た場合に備える */
    }

    .poly-image {
        width: 30vw;
        height: auto;
    }

    input.flatpickr-mobile {
        display: none !important;
    }

    /* PC向け連絡一覧スクロール設定 */
    .notify-list-container {
        max-height: 450px;
        overflow-y: auto;
        padding: 15px;
        background: #fff;
    }
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

header {
    background-color: #333;
    color: white;
    padding: 1em;
}

nav {
    width: 165px;
    background-color: #f4f4f4;
    padding-top: 1em;
}

nav ul {
    list-style: none;
    padding-left: 30px;
    margin: 0;
}

nav li {
    margin: 0.5em 0;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em;
}

.container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.login-status {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.9em;
}

.delete-button {
    display: block;
    margin: 0 auto;
    text-align: center;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #c82333;
}

.error {
    color: red;
    font-weight: bold;
}

.success {
    color: green;
    font-weight: bold;
}

/* 連絡一覧関連のスタイル */
.notify-detail {
    background: #f9f9f9;
    padding: 12px;
    margin: 8px 0;
    border-left: 4px solid #007bff;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notify-detail:hover {
    background: #f0f0f0;
}

.notify-meta {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.periods-list {
    color: #e74c3c;
    font-weight: bold;
}

.notify-record {
    margin-bottom: 10px;
}

.notify-record label {
    cursor: pointer;
    display: block;
}

.notify-record input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}



/* スクロールバーのスタイリング（Webkit系ブラウザ） */
.notify-list-container::-webkit-scrollbar {
    width: 8px;
}

.notify-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.notify-list-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.notify-list-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox用のスクロールバースタイル */
.notify-list-container {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* タブレット・スマートフォン向け */
@media (max-width: 767px) {
    main {
        width: fit-content;
        margin: 0 auto;
        padding: 1em;
    }

    html,
    body {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    #nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    #nav li {
        margin: 0.5rem 1rem;
    }

    #nav li a {
        display: block;
        background-color: #b1b1b1;
        color: white;
        padding: 0.75rem 1.25rem;
        border-radius: 8px;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.3s, transform 0.2s;
    }

    #nav li a:hover {
        background-color: #959595;
        transform: translateY(-2px);
    }

    #nav {
        width: 250px;
        transform: translateX(100vw);
        transition: transform 0.3s ease-in-out;
        position: fixed;
        top: 20px;
        right: 0;
        z-index: 10;
        display: flex;
        flex-direction: column;
    }

    #nav.is-active {
        transform: translateX(0);
    }

    .hamburger {
        position: absolute;
        right: 1rem;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 0.375rem;
        background-color: transparent;
        border: none;
        outline: none;
        display: flex;
        align-items: center;
    }

    .poly-image {
        width: 80vw;
        height: auto;
    }

    input.flatpickr-mobile {
        position: absolute;
        left: -9999px;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }

    /* モバイル向け連絡一覧スクロール設定 */
    .notify-list-container {
        max-height: 350px;
        overflow-y: auto;
        padding: 8px;
        margin-top: 8px;
    }

    .notify-detail {
        padding: 10px;
        margin: 6px 0;
    }

    .delete-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}