/* --------------------レスポンシブユーティリティクラス --------------------*/
/* ページ全体の横スクロール防止 */
/* * {
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    width: 100%;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
} */

/* Chrome用の追加設定 */
body > * {
    max-width: 100vw !important;
}

#app, main, .container-fluid, form {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* ナビゲーションバーの制限 */
/* nav, .navbar, .navbar-collapse {
    max-width: 100vw !important;
    overflow-x: hidden !important;
} */

/* PCのみ表示（999px以上） */
@media (max-width: 999px) {
    .pc-title-only {
        display: none !important;
    }
}

/* SPのみ表示（1000px以下） */
@media (min-width: 1000px) {
    .sp-title-only {
        display: none !important;
    }
}

/* PCのみ表示（768px以上） */
@media (max-width: 767px) {
    .pc-only {
        display: none !important;
    }
}

/* SPのみ表示（767px以下） */
@media (min-width: 768px) {
    .sp-only {
        display: none !important;
    }
}

/* PC時にインライン、SP時にブロック */
.pc-inline-sp-block {
    display: block;
}
@media (min-width: 768px) {
    .pc-inline-sp-block {
        display: inline;
    }
}

.section-header {
    color: #fff;
    padding: 0.4rem 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.section-header-blue-color {
    background-color: #007ac1;
}

.text-blue-color {
    color: #007ac1;
}

.section-header-green-color {
    background-color: #98d761;
}

.table th,
.table td {
    vertical-align: middle;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.add-button,
.original-button {
    background-color: #007ac1;
    color: white;
    font-weight: bold;
    border: none;
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
}

.add-button:hover,
.original-button:hover {
    background-color: #005a8d;
}

.no-hover:hover {
    color: #fff !important;
}

.uniform-button-width {
    width: 200px;
    max-width: 90%;
}

/* レスポンシブフォントサイズ */
@media (max-width: 767px) {
    .navbar-brand h3 {
        font-size: 1.25rem !important; /* fs-4相当 */
    }
}

@media (min-width: 768px) {
    .navbar-brand h3 {
        font-size: 1.75rem !important; /* fs-3相当 */
    }
}

/* モバイル時のボタンセンタリング */
@media (max-width: 767px) {
    .d-flex.flex-column .uniform-button-width {
        align-self: center;
    }
}

.remove-button {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
}

.member-id-box {
    background: #eee;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-block;
    margin-right: 0.5rem;
}

input[type="text"],
input[type="email"],
select {
    font-size: 0.85rem;
}

/* ドラッグハンドルのスタイル */
.drag-handle {
    cursor: grab;
    text-align: center;
    padding: 8px;
    color: #6c757d;
    user-select: none;
    font-weight: bold;
}

.drag-handle:hover {
    color: #007ac1;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

/* ドラッグ中の視覚的フィードバック */
.sortable-ghost {
    opacity: 0.5;
    background-color: #f8f9fa;
}

.sortable-chosen {
    background-color: #e3f2fd;
}

/* 空行の視覚的区別 */
.empty-row {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.empty-row td {
    border-style: dashed !important;
    border-color: #dee2e6 !important;
}

.empty-row .drag-handle {
    opacity: 0.3;
    color: #adb5bd;
}

/* 入力済み行のスタイル */
.filled-row {
    background-color: white;
}

.filled-row:hover {
    background-color: #f5f5f5;
}

.filled-row .drag-handle:hover {
    color: #007ac1;
    cursor: grab;
}

.participant-image:hover {
    opacity: 0.8;
    transition: opacity 0.2s;
}

/* NEWS一覧画面用スタイル */
.news-list .card {
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-list .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.news-title-link:hover {
    color: #3b80c4 !important;
    text-decoration: none !important;
}

.news-excerpt {
    font-size: 14px;
    line-height: 1.5;
}

.news-list .badge {
    font-size: 12px;
    border-radius: 20px;
}

.news-list .card-body {
    background-color: #fafafa;
}

/* NEWS一覧のレスポンシブ対応 */
@media (max-width: 768px) {
    .news-list .badge {
        font-size: 11px;
        padding: 8px 16px !important;
    }

    .news-excerpt {
        font-size: 13px;
    }
}

/* レスポンシブテーブル（価格・参加人数） */
/* PC時のテーブル幅設定 */
@media (min-width: 768px) {
    .responsive-count-table {
        width: 75% !important;
    }
}

@media (max-width: 767px) {
    /* スマホ時はテーブルを横幅いっぱいに */
    .responsive-price-table,
    .responsive-count-table {
        width: 100% !important;
    }

    .responsive-price-table tr {
        display: block;
        border: 2px solid #dee2e6;
        margin-bottom: 1rem;
        border-radius: 0.375rem;
    }

    .responsive-price-table td {
        display: block;
        border: none;
        padding: 0.75rem;
        text-align: left !important;
        border-bottom: 1px solid #dee2e6;
    }

    .responsive-price-table td:last-child {
        border-bottom: none;
    }

    .responsive-price-table .entry-status {
        background-color: #f8f9fa !important;
        font-weight: bold;
        text-align: center !important;
    }

    .responsive-price-table .total-price {
        background-color: #f8f9fa !important;
        font-weight: bold;
    }

    .responsive-price-table .calculation {
        font-size: 0.875rem;
        color: #6c757d;
        margin-top: 0.25rem;
    }

    /* 参加人数テーブルのレスポンシブ対応 */
    .responsive-count-table tr {
        display: block;
        border: 2px solid #dee2e6;
        margin-bottom: 1rem;
        border-radius: 0.375rem;
    }

    .responsive-count-table td {
        display: block;
        border: none;
        padding: 0.75rem;
        text-align: left !important;
        border-bottom: 1px solid #dee2e6;
    }

    .responsive-count-table td:last-child {
        border-bottom: none;
    }

    .responsive-count-table .count-header {
        background-color: #f8f9fa !important;
        font-weight: bold;
        text-align: center !important;
    }

    .responsive-count-table .count-total {
        background-color: #f8f9fa !important;
        font-weight: bold;
    }

    /* 説明カードのレスポンシブ対応 */
    .description-cards .col-12 {
        margin-bottom: 1rem;
    }

    .description-cards .col-12:last-child {
        margin-bottom: 0;
    }
}

/* テーブル横スクロール設定 */
.table-scroll-container {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch; /* iOSでスムーズスクロール */
}

/* コンテナの横幅制限 */
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
    padding-left: 15px;
    padding-right: 15px;
}

/* スマホ時のコンテナパディング調整 */
@media (max-width: 767px) {
    .container-fluid {
        padding-left: 0px;
        padding-right: 0px;
    }

    /* スマホ時にはみ出る可能性のある要素を制限 */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }

    /* table-scroll-containerは画面幅に収める */
    .table-scroll-container {
        max-width: calc(100vw - 20px) !important;
        width: 100% !important;
    }

    /* table-scroll-container内の要素はスクロール可能に */
    .table-scroll-container > div,
    .table-scroll-container > table {
        max-width: none; /* 内側の要素は制限しない（スクロールさせるため） */
    }

    /* フォームや見出しの制限 */
    h1, h2, h3, h4, h5, h6, p {
        max-width: 100% !important;
        word-wrap: break-word;
    }
}
