@charset "UTF-8";

/** 全体共通スタイル設定 **/
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f4f8;
    color: #333;
    margin: 1px 6px;
    line-height: 1.6;
    caret-color: transparent;   /* 点滅カーソルを非表示 */
}

h1, h2 {
    margin-top: 1px;
    margin-bottom: 2px;
    min-width: 120px;
}
h1 {
    text-align: center;
    color: #444;
}

.alert-danger ul {
    list-style-type: none; /* "・" を消す */
    padding-left: 0; /* 左側の余白を削除 */
    color: #d6006d; /* 濃いピンク色 */
    font-weight: bold; /* 文字を太字にする（オプション） */
}


form {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: inline-block; /* formをインラインブロック要素として扱い、中央寄せを可能にする */
    text-align: left;
    min-width: 580px;

    width: auto; /* 幅を内容に基づいて自動調整 */
    max-width: 100%; /* formの最大幅を設定 */
}

#delete-event-form {
    width: 740px;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

div {
    vertical-align: middle;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 285px;
    caret-color: gray;
}

textarea {
    resize: vertical;
}

button {
    display: inline-block;
    min-width: 150px;
    min-height: 44px;
    background: #5cb85c;
    color: white;
    margin: 5px 20px;
    padding: 5px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

button:hover {
    background: #4cae4c;
}

.caution {
    background-color: orange;
}

button.caution:hover {
    background: orangered;
}

div.button-center {
    text-align: center;
}

.container {
    text-align: center; /* コンテナ内のテキスト（およびインラインブロック要素）を中央寄せに */
    max-width: 1400px; /* コンテナの最大幅を設定 */
    margin: 0 auto; /* コンテナを画面の中央に配置 */
}

.candidate_date {
    height: 100px;
}

.default_none_display {
    display: none;
}

@media screen and (max-width: 600px) {
    body {
        padding: 4px;
    }
    form {
        padding: 10px;
        width: 95%; /* スマートフォンなどの小さい画面では、幅を100%に設定 */
        min-width: auto;
    }
}

header {
    display: flex;
    flex-direction: column; /* 要素を縦方向に並べる */
    align-items: center; /* 横軸に沿って中央寄せ */
    justify-content: center; /* 縦軸に沿って中央寄せ（必要に応じて） */
    text-align: center; /* テキストを中央揃え */
    line-height: 0.8px;
}

#header_logo {
    display: flex;
    align-items: center; /* 縦方向の中央揃え */
    flex-direction: row; /* 子要素を横並びにする */
    text-align: center;
}

#appli_subtitle {
    vertical-align: middle;
    margin-left: 5px; /* ロゴとサブタイトルの間のスペースを調整 */ 
    font-size:13px;
    line-height: 14.0px;
}


/*** イベント作成画面、カレンダー周りのレイアウト調整 ***/
#eventDescription {
    height:50px;
}

/** カレンダー表示 **/
.flex-container {
    display: flex;
    align-items: center; /* 縦方向の中央揃え */
    justify-content: center; /* 横方向の中央揃え */
    margin: 5px;
}
.flex-container h2 {
    margin-right:10px;
}

/* flatpickr入力フィールドを非表示にするスタイル */
#calendar .flatpickr-input {
    display: none;
}

.form-group {
    display: flex;
    align-items: flex-start;
    flex-direction: row; /* 横方向に並べる */
}
.form-group > div:first-child {
    margin-right: 25px;
}

#event_image {
    max-width: 40%;
    height: auto;
}

#image-preview {
    width: 300px;
    height: 100px;
    margin: 10px;
    object-fit: contain; /* 縦横比を保持 */
}

#calendar-container {
/*    margin-left: 20px; / * 横並び時のマージン */
}

/* スマホの時だけ改行させるクラス */
.br-sp {
    display: none;
}


/*** イベント詳細画面 ***/
div.event_description {
    margin: 10px;
}

/* 自動で横スクロール */
div.scroll-container {
    overflow-x: auto;
    width: 100%; /* 必要に応じて調整 */
}
/* テーブルのスタイル設定 */
table {
    width: auto; /* テーブルの幅を内容に基づいて自動調整 */
    max-width: 85%; /* テーブルが親要素より大きくならないように制限 */
    margin-left: 0; /* テーブルを親要素の左端に寄せる */
    margin-right: auto; /* 右側のマージンを自動で調整 */
    border-collapse: collapse; /* セル間の境界線を一重に */
}

/* テーブルのセルの枠線設定 */
td, th {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
    white-space: nowrap; /* 改行を防ぐ */
}

/* 選択候補テーブル */
#dateList th {
    min-width: 20px;
    background-color: #f2f2f2;
    font-size: 85%;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 選択候補列は左寄せ */
#dateList tr td:first-child {
    text-align: left;
}

th#newParticipantName {
    white-space: normal;  /* 改行を許可 */
    overflow: visible;    /* はみ出しを許可 */
    text-overflow: clip;  /* "..." を解除 */
    word-wrap: break-word; /* 長い単語も折り返し */
    max-width: none;      /* 最大幅制限を解除 */
}


/* ボタンのスタイル設定 */
.btnsp {
    display: inline-block;
    text-align: center;
    width: 30px;  /* 幅を設定 */
    height: 30px; /* 高さを設定 */
    line-height: 30px; /* テキストを垂直中央に配置 */
    margin: 2px;
    cursor: pointer;
    background-color: #f2f2f2;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ボタンのホバー効果 */
.btnsp:hover {
    background-color: #ddd;
}


/* 出欠ボタン */
.btnsp.active_1, th.active_1, td.active_1 {
    background-color: #808e92;
    font-weight: bold;
}
.btnsp.active_2, th.active_2, td.active_2 {
    background-color: #58ace4;
    font-weight: bold;
}
.btnsp.active_3, th.active_3, td.active_3 {
    background-color: #f179a1;
    font-weight: bold;
}
.btnsp.active_4, th.active_4, td.active_4 {
    background-color: #ee9528;
    font-weight: bold;
}
.btnsp.active_5, th.active_5, td.active_5 {
    background-color: #4CAF50;
    font-weight: bold;
}


/** Cookie使用同意確認モーダル **/
/* 同意ポップアップバナー */
.consent-banner {
    width: 100%;
    background-color: #007bff;
    color: white;
    text-align: center;
    margin-bottom: 10px;
}

.vertical-top {
    vertical-align: top;
    margin: 15px;
}

.break-text {
    white-space: normal; /* 自然なテキストの折り返し */
    display: inline-block;
    word-wrap: break-word;
}


/* コピー ボタンのデザイン */
.copy-btn {
    background-color: #f3f3f3;
    color: darkolivegreen;
    border: 1px solid #ccc;
    padding: 3px 8px;  /* サイズを小さく */
    border-radius: 3px; /* 角を少し丸く */
    font-size: 12px;  /* フォントを小さく */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;  /* アイコンとの間隔を狭める */
    transition: background-color 0.3s ease, transform 0.1s ease-in-out;
    min-width: 80px;  /* ボタンの高さを縮小 */
    min-height: 30px;  /* ボタンの高さを縮小 */
}

.copy-btn:hover {
    background-color: #e0e0e0;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* コピーアイコン */
.copy-icon {
    width: 14px;
    height: 14px;
    fill: #555;
}

/* トースト通知のデザイン（画面中央＆半透明） */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 完全に中央配置 */
    background-color: rgba(0, 0, 0, 0.6); /* 半透明の背景 */
    color: white;
    padding: 15px 30px;
    border-radius: 8px; /* 角を少し丸く */
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    z-index: 1000;
    max-width: 80%; /* 画面幅に応じて適度なサイズに */
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* ふんわりした影を追加 */
}

/* トーストが表示されるときのスタイル */
.toast.show {
    opacity: 1;
}

/* 成功メッセージ */
.toast.success {
    background-color: rgba(76, 175, 80, 0.8); /* 半透明の緑 */
}

/* エラーメッセージ */
.toast.error {
    background-color: rgba(244, 67, 54, 0.8); /* 半透明の赤 */
}


/* スマートフォンなどの狭い画面でのスタイル */
@media screen and (max-width: 600px) {
    .form-group {
        flex-direction: column; /* 狭い画面では縦方向に並べる */
    }
    #calendar-container {
        margin-left: 0;
        margin-top: 10px; /* 縦並び時のマージン */
        order: -1; /* 選択候補の入力欄の上に移動 */
    }
    .br-sp {
        display: block;
    }
    .break-text {
        max-width: 340px;
    }
}
