/* 検索機能拡張スタイル */

/* 除外キーワードフィールド */
#TopicExcludeKeyword {
    background-color: #fff5f5;
    border-color: #dc3545;
}

#TopicExcludeKeyword:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* 日付クイック選択ボタン */
.date-quick-buttons {
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.date-quick-btn {
    margin-right: 5px;
    margin-bottom: 5px;
}

.date-quick-btn.btn-primary {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* 検索・クリアボタン */
.search-buttons {
    text-align: center;
    padding: 15px 0;
}

#clearSearch {
    margin-left: 10px;
}

/* 検索結果件数表示 */
.search-result-count {
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    color: #0c5460;
}

.search-result-count i {
    margin-right: 5px;
}

/* ハイライト表示 */
.search-highlight {
    background-color: #ffff00;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 2px;
}

/* オートコンプリートのスタイル */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ui-autocomplete li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.ui-autocomplete li:hover,
.ui-autocomplete li.ui-state-focus {
    background-color: #f5f5f5;
}

.ui-autocomplete li div {
    font-size: 14px;
    color: #333;
}

/* フィールドセットのスタイル改善 */
fieldset {
    margin-bottom: 15px;
}

.legendclass {
    font-size: 14px;
    color: #666;
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #dc3545;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .date-quick-buttons {
        text-align: center;
    }
    
    .date-quick-btn {
        display: inline-block;
        width: 48%;
        margin: 1%;
    }
    
    .search-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    #clearSearch {
        margin-left: 0;
    }
}

/* Material Design風の改善 */
.form-control {
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.1);
}

/* プレースホルダーのアニメーション */
.form-control::-webkit-input-placeholder {
    transition: opacity 0.3s ease;
}

.form-control:focus::-webkit-input-placeholder {
    opacity: 0.5;
}

/* ボタンのホバーエフェクト */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 検索フォーム全体のスタイル */
.panel-body.toppagepanel {
    padding: 20px;
}

/* 日付入力フィールドのレイアウト改善 */
.form-inline.form-omake {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.xssize {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* エラー状態のスタイル */
.has-error .form-control {
    border-color: #dc3545;
}

.has-error .help-block {
    color: #dc3545;
}

/* ローディング状態 */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #dc3545;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}