/* ========================================
   Common CSS for CakePHP Application
   ======================================== */

/* パンくずナビゲーション */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 8px 15px;
    margin-bottom: 0;
    list-style: none;
    background-color: #4CAF50;
    border-radius: 4px;
    border: 1px solid #45a049;
}

.breadcrumb-item {
    display: flex;
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 8px;
    padding-left: 8px;
    color: #ffffff;
    content: "";
}

.breadcrumb-item a {
    color: #ffffff;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #ffffff;
}

/* アコーディオンスタイル */
.accordion-search {
    margin-bottom: 20px;
}

.accordion-toggle {
    width: 100%;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: background-color 0.3s ease;
}

.accordion-toggle:hover {
    background-color: #e9ecef;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-content {
    display: none;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: #fff;
    padding: 20px;
}

.accordion-content.active {
    display: block;
}

/* 検索フォーム */
.search-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.search-form-grid > div {
    flex: 1 1 45%;
    min-width: 200px;
}

.no-range-row {
    min-width: 200px;
}

.no-range-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: normal;
}

.no-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.no-inputs input {
    width: 80px !important;
}

.no-inputs span {
    margin: 0;
}

.search-form-grid select {
    max-width: 100%;
    width: 100%;
}

/* モーダルウィンドウ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    /*max-width: 800px;*/
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-body {
    padding: 20px;
}

/* 事務局店舗一覧 事務局店舗一覧(イベント指定) 申し込み状況 報告 テキストカラー */
.status-report {
    color: #ff0000;
}
.status-report2 {
    color: #ff6600;
}
.status-report3 {
    color: #0044ff;
}

/* 共通ボタンスタイル */
.btn {
    display: inline-block;
    /*padding: 8px 16px;*/
    margin: 2px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #d33c43;
    border: 0.1rem solid #d33c43;
    border-radius: .4rem;
    color: #fff;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-warning {
    background-color: #f1c40f;
    border-color: #f1c40f;
    color: #fff;
}

.btn-warning:hover {
    background-color: #d4ac0d;
    border-color: #d4ac0d;
}

.btn-gray {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
    font-size: 1.1rem;
}

.btn-gray:hover {
    background-color: #545b62;
    border-color: #545b62;
    color: #ffffff;
}


/* 登録時の必須マーク - */
.required-mark {
    color: red;
    font-size: 12px;
}

.event-apply {
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* エラーメッセージ */
.error-message {
    color: #d00;
    font-weight: bold;
    margin-top: 4px;
    margin-bottom: 4px;
    display: block;
}
.form-error {
    background: #FEE3D7;
}

/* ページネーション用CSS */
.paginate {
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.paginate ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.paginate li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.paginate a, .paginate span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #007bff;
    border-radius: 4px;
    background-color: #fff;
}

.paginate a:hover {
    background-color: #e9ecef;
}

.paginate .current {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.paginate .disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}


/* フレックスレイアウトユーティリティ */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

/* マージンユーティリティ */
.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.mr-10 {
    margin-right: 10px;
}

.ml-10 {
    margin-left: 10px;
}

/* テキストユーティリティ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

.text-muted {
    color: #6c757d;
}

/* 表示/非表示ユーティリティ */
.d-none {
    display: none;
}

.d-block {
    display: block;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .search-form-grid > div {
        flex: 1 1 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .btn {
        font-size: 12px;
        padding: 0px 12px;
    }
}
