/* 待ち時間共有システムのスタイル */
.wait-time-container {
    max-width: 600px;
    margin: 0 auto;
    /* padding: 20px; */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* フォームラッパー */
.wait-time-form-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
}


/* フォームグループ */
.form-group {
    margin-top: 24px;
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label i {
    color: #e85d41;
    font-size: 1.1em;
}

/* 店舗選択 */
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #e85d41;
    box-shadow: 0 0 0 3px rgba(232, 93, 65, 0.1);
}

/* ラジオボタン */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.radio-option:hover {
    border-color: #e85d41;
    background: #fdf7f6;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #e85d41;
    background: #e85d41;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radio-text {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
}

/* 待ち時間レベルごとの色 */
.radio-option.crowded input[type="radio"]:checked + .radio-custom {
    border-color: #dc3545;
    background: #dc3545;
}

.radio-option.crowded:hover,
.radio-option.crowded input[type="radio"]:checked ~ .radio-text {
    color: #dc3545;
}

.radio-option.normal input[type="radio"]:checked + .radio-custom {
    border-color: #ffc107;
    background: #ffc107;
}

.radio-option.normal:hover,
.radio-option.normal input[type="radio"]:checked ~ .radio-text {
    color: #ffc107;
}

.radio-option.empty input[type="radio"]:checked + .radio-custom {
    border-color: #28a745;
    background: #28a745;
}

.radio-option.empty:hover,
.radio-option.empty input[type="radio"]:checked ~ .radio-text {
    color: #28a745;
}

/* テキストエリア */
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #e85d41;
    box-shadow: 0 0 0 3px rgba(232, 93, 65, 0.1);
}

.form-textarea::placeholder {
    color: #999;
}

/* 文字カウンター */
.character-counter {
    text-align: right;
    margin-top: 4px;
    font-size: 0.9em;
    color: #666;
}

/* 送信ボタン */
.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(45deg, #e85d41, #f4a261);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(232, 93, 65, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(232, 93, 65, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 投稿結果メッセージ */
.submit-message {
    margin-top: 16px;
    padding: 16px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #155724;
    font-weight: 500;
}

.message-content i {
    color: #28a745;
    font-size: 1.2em;
}

/* 最近の投稿一覧 */
.recent-posts-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.recent-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recent-posts-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-posts-title i {
    color: #e85d41;
}

.refresh-btn {
    background: none;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #666;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    border-color: #e85d41;
    color: #e85d41;
}

.refresh-btn i {
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(90deg);
}

.history-btn {
    background: none;
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #6c757d;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-btn:hover {
    border-color: #495057;
    color: #495057;
}

/* 投稿アイテム */
.post-item {
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fafafa;
}

.post-item:last-child {
    margin-bottom: 0;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wait-level-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
}

.wait-level-badge.crowded {
    background: #dc3545;
}

.wait-level-badge.normal {
    background: #ffc107;
    color: #333;
}

.wait-level-badge.empty {
    background: #28a745;
}

.post-time {
    font-size: 0.9em;
    color: #666;
}

.post-comment {
    margin: 8px 0 0 0;
    color: #333;
    line-height: 1.4;
}

/* ローディング */
.loading-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-spinner i {
    font-size: 2em;
    color: #e85d41;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .wait-time-container {
        /* padding: 16px; */
    }
    
    .wait-time-form-wrapper,
    .recent-posts-wrapper {
        padding: 20px;
        border-radius: 12px;
    }
    
    .form-title {
        font-size: 1.2em;
    }
    
    .form-subtitle {
        font-size: 1em;
    }
    
    
    .radio-option {
        padding: 12px 16px;
    }
    
    .submit-btn {
        padding: 14px 20px;
        font-size: 1em;
    }
    
    .recent-posts-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .refresh-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .wait-time-container {
        /* padding: 12px; */
    }
    
    .radio-text {
        font-size: 1em;
    }
    
    .form-textarea {
        min-height: 60px;
    }
}

/* モーダル */
.store-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    /* overflow-y: auto; */
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
}

/* 店舗検索セクション */
.store-search-section {
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.store-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.store-search-input:focus {
    outline: none;
    border-color: #e85d41;
    box-shadow: 0 0 0 3px rgba(232, 93, 65, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1em;
}

.create-store-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.create-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* 店舗一覧 */
.store-list-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.store-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.store-item {
    padding: 16px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.store-item:hover {
    border-color: #e85d41;
    background: #fdf7f6;
}

.store-item.selected {
    border-color: #e85d41;
    background: #fdf7f6;
}

.store-item-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.store-item-location {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.store-item-description {
    font-size: 0.85em;
    color: #888;
    line-height: 1.4;
}

/* 新規店舗作成フォーム */
.create-store-form {
    max-width: none;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #e85d41;
    box-shadow: 0 0 0 3px rgba(232, 93, 65, 0.1);
}

.required {
    color: #dc3545;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.cancel-btn {
    padding: 12px 24px;
    background: none;
    border: 2px solid #6c757d;
    color: #6c757d;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #6c757d;
    color: white;
}

.create-btn {
    padding: 12px 24px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.create-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* メッセージ */
.no-stores-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-stores-message i {
    font-size: 2em;
    margin-bottom: 12px;
    color: #ccc;
}

.no-stores-message p {
    margin: 0;
    font-style: italic;
}

.loading-stores {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .modal-content {
        /* max-width: 90%;
        max-height: 90vh; */
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cancel-btn,
    .create-btn {
        width: 100%;
    }
}

/* 履歴モーダル */
.history-modal-content {
    max-width: 800px;
    max-height: 90vh;
}

.history-store-name {
    color: #e85d41;
    font-weight: 500;
}

.history-store-name:before {
    content: "（";
}

.history-store-name:after {
    content: "）";
}

/* フィルター */
.history-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
    min-width: 120px;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #e85d41;
}

.apply-filters-btn {
    padding: 8px 16px;
    background: #e85d41;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    height: fit-content;
}

.apply-filters-btn:hover {
    background: #d44a2a;
    transform: translateY(-1px);
}

/* 統計情報 */
.history-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* 履歴投稿一覧 */
.history-posts-wrapper {
    max-height: 500px;
    overflow-y: auto;
}

.history-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.history-post-item {
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.history-post-item:hover {
    border-color: #e85d41;
    box-shadow: 0 2px 8px rgba(232, 93, 65, 0.1);
}

.history-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-post-date {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.history-post-comment {
    margin: 8px 0 0 0;
    color: #333;
    line-height: 1.4;
}

/* ページネーション */
.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid #e9ecef;
}

.pagination-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #e85d41;
    color: #e85d41;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.load-more-btn {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e85d41;
    color: #e85d41;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.load-more-btn:hover {
    background: #e85d41;
    color: white;
}

/* メッセージ */
.no-history-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-history-message i {
    font-size: 2em;
    margin-bottom: 12px;
    color: #ccc;
}

.no-history-message p {
    margin: 0;
    font-style: italic;
}

.loading-history {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* チェーン店舗一覧 */
.chain-stores-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
}

.chain-stores-header {
    margin-bottom: 20px;
    text-align: center;
}

.chain-stores-title {
    margin: 0 0 1em 0 !important;
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chain-stores-title i {
    color: #e85d41;
}

.chain-stores-subtitle {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.chain-stores-list-wrapper {
    margin-bottom: 16px;
}

.chain-stores-list {
    list-style: none;
    padding: 0 !important;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.chain-store-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin: 0 !important;
}

.chain-store-item:hover {
    background: #f8f9fa;
    border-color: #e85d41;
    box-shadow: 0 2px 8px rgba(232, 93, 65, 0.1);
}

.chain-store-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chain-store-main {
    flex: 1;
    min-width: 0;
}

.chain-store-name {
    margin: 0 0 6px 0;
    margin-bottom: 0.5em !important;
    font-size: 1em;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    /* テーマのCSS解除 */
    padding: 0 !important;
    border: none !important;
}

.chain-store-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 4px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    margin-bottom: 0px !important;
}

.info-label {
    font-size: 0.7em;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.chain-store-official {
    font-size: 0.8em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chain-store-official.has-info {
    color: #e85d41;
    font-weight: 500;
}

.chain-store-official.has-info.external-api {
    color: #007cba;
    font-weight: 600;
    background-color: #f0f8ff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #007cba;
}

.chain-store-official.no-info {
    color: #999;
    font-style: italic;
    font-weight: 400;
}

.chain-store-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.status-value {
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 1em;
    line-height: 1.2;
    display: inline-block;
}

/* 待ち時間レベルのスタイル */
.wait-level-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    line-height: 1.2;
}

.wait-level-badge.empty {
    background-color: #4CAF50;
    color: white;
}

.wait-level-badge.normal {
    background-color: #FF9800;
    color: white;
}

.wait-level-badge.crowded {
    background-color: #F44336;
    color: white;
}

.status-time {
    font-size: 1em;
    color: #666;
    margin-left: 4px;
}

.no-status {
    color: #999;
    font-size: 1em;
    font-style: italic;
}

.error-status {
    color: #F44336;
    font-size: 0.75em;
}

/* 外部APIデータ用スタイル */
.external-data {
    border: 1px solid #4CAF50;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    position: relative;
}

.external-data::before {
    content: '公式';
    position: absolute;
    top: -6px;
    right: -6px;
    background: #FF5722;
    color: white;
    font-size: 0.6em;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 600;
}

.chain-store-arrow {
    flex-shrink: 0;
    color: #999;
    font-size: 0.9em;
    margin-left: 8px;
}

.chain-store-item:hover .chain-store-arrow {
    color: #e85d41;
}

.show-more-stores-btn {
    width: 100%;
    background: white;
    border: 2px solid #e85d41;
    color: #e85d41;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.show-more-stores-btn:hover {
    background: #e85d41;
    color: white;
}

.show-more-stores-btn i {
    transition: transform 0.3s ease;
}

.show-more-stores-btn.expanded i {
    transform: rotate(180deg);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .chain-store-content {
        gap: 8px;
    }
    
    .chain-store-name {
        font-size: 0.95em;
        margin-bottom: 4px;
    }
    
    .chain-store-info-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .info-label {
        font-size: 0.65em;
    }
    
    .chain-store-official {
        font-size: 0.75em;
    }
    
    .status-value {
        font-size: 0.7em;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .chain-store-item {
        padding: 10px 12px;
    }
    
    .chain-store-content {
        gap: 6px;
    }
    
    .chain-store-name {
        font-size: 0.9em;
        margin-bottom: 3px;
    }
    
    .chain-store-info-grid {
        gap: 6px;
        margin-top: 2px;
    }
    
    .info-label {
        font-size: 0.6em;
    }
    
    .chain-store-official {
        font-size: 0.7em;
    }
    
    .status-value {
        font-size: 0.65em;
        padding: 1px 3px;
    }
    
    .chain-store-arrow {
        font-size: 0.8em;
    }
}

/* レスポンシブ */
@media (max-width: 768px) {
    .history-modal-content {
        max-width: 95%;
    }
    
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .history-stats {
        justify-content: space-around;
    }
    
    .history-pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
    
    .recent-posts-header {
        gap: 8px;
    }
    
    .refresh-btn,
    .history-btn {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}

/* ショートコード用スタイル */
.wait-time-shortcode-container {
    max-width: 100%;
}

.shortcode-version .wait-time-container {
    max-width: 100%;
    margin: 0;
    /* padding: 16px; */
}

.shortcode-version .wait-time-form-wrapper,
.shortcode-version .recent-posts-wrapper {
    margin-bottom: 20px;
}

/* ヘッダーボタン */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.show-more-btn {
    background: linear-gradient(45deg, #e85d41, #f4a261);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 93, 65, 0.3);
}

/* ショートコード用レスポンシブ */
@media (max-width: 768px) {
    .shortcode-version .wait-time-container {
        /* padding: 12px; */
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    
    .show-more-btn {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}

/* 店舗タブ */
.store-tabs-wrapper {
    margin: 16px 0 24px 0;
    padding: 0;
}

.store-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 4px 0;
}

.store-tab {
    background: white;
    border: 2px solid #e9ecef;
    color: #666;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.store-tab:hover {
    border-color: #e85d41;
    color: #e85d41;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(232, 93, 65, 0.2);
}

.store-tab.active {
    background: linear-gradient(45deg, #e85d41, #f4a261);
    border-color: #e85d41;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 93, 65, 0.3);
}

.store-tab.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(232, 93, 65, 0.4);
}

/* グループ名のスタイル */
.group-name {
    color: #e85d41;
    background: linear-gradient(45deg, #e85d41, #f4a261);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* タブのブランドカラー対応 */
.store-tab[style*="border-color"] {
    border-width: 2px;
    border-style: solid;
}

.store-tab.active[style*="border-color"] {
    background: var(--tab-color, linear-gradient(45deg, #e85d41, #f4a261));
    border-color: var(--tab-color, #e85d41) !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .store-tabs {
        gap: 6px;
        justify-content: flex-start;
    }
    
    .store-tab {
        padding: 8px 12px;
        font-size: 0.85em;
        border-radius: 16px;
    }
    
    .store-tabs-wrapper {
        margin: 12px 0 20px 0;
    }
}

@media (max-width: 480px) {
    .store-tab {
        padding: 6px 10px;
        font-size: 0.8em;
        border-radius: 14px;
    }
    
    .store-tabs {
        gap: 4px;
    }
}

/* 新規店舗作成フォーム - グループ選択 */
.group-selection {
    margin-bottom: 8px;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #e85d41;
    box-shadow: 0 0 0 3px rgba(232, 93, 65, 0.1);
}

/* フォームセクション */
.form-group-section {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.section-title {
    margin: 0 0 16px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e85d41;
    padding-bottom: 8px;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9ecef, transparent);
    margin: 24px 0;
}

/* カラーピッカー */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-color {
    width: 50px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-color:hover {
    border-color: #e85d41;
    transform: scale(1.05);
}

.color-preview {
    flex: 1;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: var(--preview-color, #ff6b35);
    position: relative;
    transition: all 0.3s ease;
}

.color-preview::after {
    content: attr(data-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8em;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 既存グループ選択のスタイル強化 */
.form-select option {
    padding: 12px;
    background: white;
}

.form-select option:hover {
    background: #f8f9fa;
}

/* 新規グループ作成フォームの追加スタイル */
.form-group-section .form-group {
    margin-bottom: 16px;
}

.form-group-section .form-group:last-child {
    margin-bottom: 0;
}

.form-group-section .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    font-weight: 500;
    color: #555;
}

/* アニメーション */
.form-group-section {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .form-group-section {
        padding: 16px;
        margin: 20px 0;
    }
    
    .section-title {
        font-size: 1em;
    }
    
    .color-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .form-color {
        width: 100%;
        height: 50px;
    }
    
    .color-preview {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .form-select {
        font-size: 0.9em;
        padding: 10px 14px;
        padding-right: 36px;
    }
    
    .form-group-section {
        padding: 12px;
    }
}

/* 店舗グループバッジ */
.store-group-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 500;
    color: white;
    margin-right: 8px;
    vertical-align: middle;
}

.store-item-name {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* チェーン選択タブ */
.chain-selection-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.chain-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 4px 0;
}

.chain-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.9em;
}

.chain-tab:hover {
    border-color: #e85d41;
    background: #fdf7f6;
    transform: translateY(-1px);
}

.chain-tab.active {
    border-color: #e85d41;
    background: #e85d41;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 93, 65, 0.3);
}

.chain-tab-name {
    font-weight: 500;
}

.chain-tab-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.chain-tab.active .chain-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ブランドカラー対応 */
.chain-tab[style*="border-color"]:not(.active):hover {
    background: var(--hover-bg, #fdf7f6);
}

.chain-tab[style*="border-color"].active {
    background: var(--brand-color, #e85d41);
    border-color: var(--brand-color, #e85d41);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .chain-selection-section {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .chain-tabs {
        gap: 6px;
    }
    
    .chain-tab {
        padding: 8px 12px;
        font-size: 0.85em;
        gap: 6px;
    }
    
    .chain-tab-count {
        padding: 1px 4px;
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    .chain-tab {
        padding: 6px 10px;
        font-size: 0.8em;
        gap: 4px;
    }
    
    .chain-tab-count {
        padding: 1px 3px;
        font-size: 0.7em;
    }
}

/* 投稿モーダル */
.post-modal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    max-height: 80vh;
}

.post-form-section {
    flex: 1;
    min-width: 300px;
}

.recent-posts-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e9ecef;
    /* padding-left: 24px; */
}

.recent-posts-section .section-title, .post-form-section .section-title {
    margin: 0px 0 0.5em 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
    padding: 0.5em 1em;
}

.recent-posts-section .section-title i {
    color: #e85d41;
}

.post-modal-recent-posts {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding-right: 8px;
    margin-right: -8px;
}

.post-modal-recent-posts::-webkit-scrollbar {
    width: 6px;
}

.post-modal-recent-posts::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.post-modal-recent-posts::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.post-modal-recent-posts::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.post-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.post-modal-loading .loading-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.no-posts-message,
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-posts-message i,
.error-message i {
    font-size: 2em;
    margin-bottom: 12px;
    color: #ccc;
}

.error-message i {
    color: #dc3545;
}

.no-posts-message p,
.error-message p {
    margin: 0;
    font-style: italic;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .post-modal-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .recent-posts-section {
        border-left: none;
        border-top: 1px solid #e9ecef;
        padding-left: 0;
        padding-top: 20px;
        max-height: 300px;
    }
    
    .post-modal-recent-posts {
        max-height: 250px;
    }
}

/* 折りたたみ機能 */
.collapsible-title {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.collapsible-title:hover {
    opacity: 0.8;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.9em;
    color: #666;
}

.collapsible-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.collapsible-content[style*="display: none"] {
    opacity: 0;
    max-height: 0;
}

.collapsible-content[style*="display: block"] {
    opacity: 1;
    max-height: none;
}

/* 店舗グループヘッダー */
.store-group-header {
    background: #f8f9fa;
    border: none;
    padding: 12px 16px;
    margin: 16px 0 8px 0;
    border-radius: 8px;
    list-style: none;
}

.group-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-label {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-count {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 店舗アイテムのステータス別スタイル */
.chain-store-item.status-empty {
    border-left: 4px solid #4CAF50;
}

.chain-store-item.status-normal {
    border-left: 4px solid #FF9800;
}

.chain-store-item.status-crowded {
    border-left: 4px solid #F44336;
}

.chain-store-item.status-no-info {
    border-left: 4px solid #9E9E9E;
}