/* 基本スタイル */
.container {
    max-width: 100%;
}

hr {
    margin: 2.0rem 0;
}

form {
    margin: 0;
}

/* 強化されたナビゲーションのスタイル */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: #357ABD;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.top-nav-title {
    flex: 0 0 auto;
}

.top-nav-title a {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-nav-title a:hover {
    opacity: 0.9;
}

.top-nav.login .top-nav-title span {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.top-nav-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.menu-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.4rem;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.menu-link:active {
    transform: translateY(0);
}

.user-name {
    font-size: 1.4rem;
    color: #ecf0f1;
    padding: 0.8rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* 強化されたページネーションのスタイル */
.paginator {
    margin: 2rem 0;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.pagination li {
    margin: 0;
    border-right: 1px solid #eee;
}

.pagination li:last-child {
    border-right: none;
}

.pagination li a {
    display: inline-block;
    padding: 1.2rem 1.6rem;
    color: #2c3e50;
    text-decoration: none;
    min-width: 4.4rem;
    text-align: center;
    transition: all 0.3s ease;
}

.pagination li.active a {
    background-color: #3498db;
    color: #ffffff;
    font-weight: 600;
}

.pagination li:not(.active) a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.pagination .first a,
.pagination .last a,
.pagination .prev a,
.pagination .next a {
    background-color: #f8f9fa;
    font-weight: 500;
}

.paginator p {
    color: #666;
    font-size: 1.4rem;
    margin: 1rem 0 0 0;
}

/* メインコンテンツエリアのスタイル */
.items.index.content.item_table {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* テーブルのスタイル */
.item_table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: white;
    font-size: 1.4rem;
    table-layout: auto;
}

.item_table th {
    background-color: #f8f9fa;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 60px;
    z-index: 900;
}

.item_table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    max-width: 200px;
}

/* 行のホバー効果 */
.item_table tr:hover {
    background-color: #f5f5f5;
}

/* アクションリンクのスタイル */
.item_action_link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    border-radius: 4px;
    text-decoration: none;
    color: #0066cc;
}

.item_action_link:hover {
    background-color: #f0f0f0;
}

/* ボタンのスタイル改善 */
.multiprocess_button {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 600;
    background-color: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.multiprocess_button:hover {
    background-color: #357ABD;
    transform: translateY(-1px);
}

.multiprocess_button:active {
    transform: translateY(0);
}

/* 検索フォームのスタイル */
.search_text {
    padding: 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-right: 1rem;
    font-size: 1.4rem;
}

/* チェックボックスコンテナのスタイル */
.input.checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 警告メッセージのスタイル */
.cake-error {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 4px;
}

/* メッセージスタイル */
.message {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 6px;
    position: relative;
    font-size: 1.4rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: slideIn 0.3s ease-out;
}

/* エラーメッセージ */
.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message.error:hover {
    background-color: #fecaca;
    transform: translateY(-1px);
}

.message.error::before {
    content: "⚠";
    margin-right: 0.8rem;
    font-size: 1.6rem;
}

/* 成功メッセージ */
.message.success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message.success:hover {
    background-color: #d1fae5;
    transform: translateY(-1px);
}

.message.success::before {
    content: "✓";
    margin-right: 0.8rem;
    font-size: 1.6rem;
    font-weight: bold;
}

.message.hidden {
    display: none;
}

/* アニメーション効果 */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* カラムレイアウトの調整 */
.row.item-view {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 2rem;
    padding: 2rem;
}

/* サイドバー（左カラム）*/
.row.item-view aside.column.large-3.medium-4 {
    flex: 0 0 15%;
    max-width: 15%;
    width: 15%;
}

/* メインコンテンツ（右カラム）*/
.row.item-view div.column.large-9.medium-8 {
    flex: 0 0 85%;
    max-width: 85%;
    width: 85%;
}

/* サイドナビゲーション */
.side-nav {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.side-nav .heading {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #dee2e6;
}

.list-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.list-group-item {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #495057;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1.3rem;
}

.list-group-item:hover {
    background-color: #e9ecef;
    color: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* メインコンテンツエリア */
.items.view.content {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.items.view.content h3 {
    color: #2c3e50;
    font-size: 2.4rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

/* 記事情報ヘッダーのスタイル改善 */
#item_under_line {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 500;
    margin: 2rem 0;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
    line-height: 1.4;
}

/* テーブルスタイルの改善 */
.items.view.content table {
    width: 100%;
    margin-bottom: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.items.view.content table th {
    background-color: #f8f9fa;
    padding: 0.8rem 1.2rem;
    width: 25%;
    color: #495057;
    font-weight: 600;
    font-size: 1.3rem;
}

/* ポスター一覧ページ固有のスタイル */
.posters .items.view.content table th {
    width: 10%;
}

/* NG一覧ページ固有のスタイル */
.ng-items .items.view.content table th {
    width: 10%;
}

/* 管理者一覧ページ固有のスタイル */
.managers .items.view.content table th {
    width: 10%;
}

.items.view.content table td {
    padding: 0.8rem 1.2rem;
    color: #212529;
    background: #ffffff;
    font-size: 1.3rem;
}

.items.view.content table tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.items.view.content table tr:hover {
    background-color: #f8f9fa;
}

.items.view.content table tr:last-child {
    border-bottom: none;
}

/* テキストセクション */
.row.item-view .text {
    background: #f8f9fa;
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.row.item-view .text .text-label {
    display: block;
    color: #495057;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.row.item-view .text p {
    color: #212529;
    font-size: 1.5rem;
    line-height: 1.6;
    margin: 0;
    padding: 0.5rem 0;
}

.row.item-view .text p + p {
    margin-top: 1rem;
}

/* リンクボタンのスタイル */
.link_button {
    margin: 20px 0;
}

.link_button_a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #dc3545; /* 警告的な意味を持つ赤系色 */
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

/* ホバー時の効果 */
.link_button_a:hover {
    background-color: #c82333;
    text-decoration: none;
    color: #ffffff;
}

/* アクティブ（クリック）時の効果 */
.link_button_a:active {
    background-color: #bd2130;
    transform: translateY(1px);
}

/* フォーカス時のアウトライン */
.link_button_a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/* 検索フォームコンテナ */
.search-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

/* 検索フォームの内部レイアウト */
.search-form-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ラベルのスタイル */
.search-form-label {
    font-size: 1.4rem;
    color: #495057;
    font-weight: 600;
    margin-right: 1rem;
    min-width: 60px;
}

/* 入力フィールドのコンテナ */
.search-form-input {
    flex: 1;
    min-width: 200px;
}

/* 入力フィールドのスタイル */
.search-form-input .search_text {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.search-form-input .search_text:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 検索ボタンのスタイル */
.search-form-button {
    flex: 0 0 auto;
}

.search-form-button .multiprocess_button {
    padding: 0.8rem 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    background-color: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.search-form-button .multiprocess_button:hover {
    background-color: #357ABD;
    transform: translateY(-1px);
}

/* コメントアコーディオンのスタイル */
.comment-accordion {
    width: 100%;
    margin: 2rem 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-accordion__item {
    border: 1px solid #99ceff;
    background: #fff;
}

.comment-accordion__trigger {
    width: 100%;
    padding: 1rem;
    background: #7ab8ff;
    border: none;
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.comment-accordion__trigger:hover {
    background: #7ab8ff;
}

.comment-accordion__trigger:active {
    background: #7ab8ff;
    transform: translateY(0);
}

.comment-accordion__trigger:focus {
    background: #7ab8ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(153, 206, 255, 0.5);
}

.comment-accordion__title {
    display: inline-block;
    position: relative;
    padding-right: 1.5rem;
    font-size: 1.4rem;
}

.comment-accordion__title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 0.8rem;
    height: 0.8rem;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translateY(-75%) rotate(45deg);
    transition: transform 0.3s ease;
}

[aria-expanded="true"] .comment-accordion__title::after {
    transform: translateY(-25%) rotate(-135deg);
}

.comment-accordion__content {
    background: #cce6ff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.comment-accordion__content--open {
    max-height: none;
    padding: 1.5rem;
}

/* コメントフォームのスタイル */
.comment-form {
    max-width: 800px;
    margin: 0 auto;
}

.comment-form__group {
    margin-bottom: 1.5rem;
}

.comment-form__group:last-child {
    margin-bottom: 0;
}

.comment-form__select,
.comment-form__textarea {
    width: 100%;
    max-width: 80%;
    margin: 0 auto;
    display: block;
    padding: 0.8rem 1.2rem;
    border: 1px solid #99ceff;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    background-repeat: no-repeat !important;
}

.comment-form__select:focus,
.comment-form__textarea:focus {
    outline: none;
    border-color: #7ab8ff;
    box-shadow: 0 0 0 3px rgba(153, 206, 255, 0.25);
}

.comment-form__textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form__button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    background-color: #4A90E2;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    height: 40px;
    line-height: 1;
}

.comment-form__button:hover {
    background-color: #357ABD;
    transform: translateY(-1px);
}

.comment-form__button:active {
    transform: translateY(0);
}

/* コメントの子フォーム */
.input.select select, .input.textarea textarea {
    background-color: #fff;
}

/* コメントの子フォーム */
.commentChildForm {
    display: none;
    background: #cce6ff;
    border-left: medium solid #99ceff;
    border-right: medium solid #99ceff;
    border-bottom: medium solid #99ceff;
    transition: all 0.3s ease;
}

.commentChildForm.show {
    display: table-row;
    opacity: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .top-nav-menu {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 1rem;
        gap: 1rem;
    }

    .item_table td, 
    .item_table th {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
    
    .multiprocess_button {
        width: 100%;
        margin-top: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination li a {
        padding: 1rem 1.2rem;
    }
    
    .row.item-view {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem;
    }

    .row.item-view aside.column.large-3.medium-4,
    .row.item-view div.column.large-9.medium-8 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .side-nav {
        margin-bottom: 1.5rem;
    }

    .items.view.content {
        padding: 1.5rem;
    }

    .items.view.content table th {
        width: 35%;
    }

    .row.item-view .text {
        padding: 1.5rem;
    }

    .row.item-view .text .text-label {
        font-size: 1.3rem;
    }

    .row.item-view .text p {
        font-size: 1.4rem;
    }

    .search-form {
        padding: 1rem;
    }
    
    .search-form-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form-label {
        margin-bottom: 0.5rem;
    }
    
    .search-form-button {
        width: 100%;
    }
    
    .search-form-button .multiprocess_button {
        width: 100%;
    }

    .comment-form__select,
    .comment-form__textarea {
        max-width: 95%;
    }
    
    .comment-accordion__content--open {
        padding: 1rem 0.5rem;
    }
}

/* プリント対応 */
@media print {
    .row.item-view {
        display: block;
        padding: 0;
    }

    .row.item-view aside.column.large-3.medium-4 {
        display: none;
    }

    .row.item-view div.column.large-9.medium-8 {
        width: 100%;
        max-width: 100%;
    }

    .items.view.content {
        box-shadow: none;
        padding: 0;
    }

    .row.item-view .text {
        break-inside: avoid;
        border: none;
        padding: 1rem 0;
    }
}

/* コメント行のステータス表示用スタイル */
.item_table tr.item_checked {
    background-color: #e6f3ff !important;  /* 薄い青色の背景 */
}

.item_table tr.item_checked:hover {
    background-color: #d1e8ff !important;  /* ホバー時のやや濃い青色 */
}

.item_table tr.item_deleted {
    background-color: #ffe6e6 !important;  /* 薄い赤色の背景 */
}

.item_table tr.item_deleted:hover {
    background-color: #ffd1d1 !important;  /* ホバー時のやや濃い赤色 */
}

.item_table tr.item_normal:has(td.child) {
    background-color: #f8faff;  /* 通常の子コメント背景色 */
}

.item_table tr.item_normal:has(td.child):hover {
    background-color: #eef2ff;  /* 通常の子コメントホバー時背景色 */
}

/* 子コメント用のスタイル */
.item_table tr td.child {
    border-left: 4px solid #7ab8ff;
    padding-left: 20px;
}

/* 子コメントが削除済みの場合のボーダー色 */
.item_table tr.item_deleted td.child {
    border-left-color: #ffb3b3;
}

/* 子コメントが確認済みの場合のボーダー色 */
.item_table tr.item_checked td.child {
    border-left-color: #90caf9;
}

