/* Smart QA Manager フロントエンドスタイル */

/* コンテナ */
.smart-qa-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

/* 検索フォーム */
.smart-qa-search {
    margin-bottom: 20px;
}

.smart-qa-search-form {
    display: flex;
    flex-direction: column;
}

.search-input-group {
    display: flex;
    position: relative;
}

#qa_search {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#qa_search:focus {
    border-color: #2271b1;
    box-shadow: 0 2px 12px rgba(34, 113, 177, 0.15);
    outline: none;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #777;
}

.search-button:hover {
    color: #2271b1;
}

.search-reset {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
}

.search-reset a {
    color: #777;
    text-decoration: none;
}

.search-reset a:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* フィルター */
.smart-qa-filters {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.smart-qa-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.qa-filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.filter-submit {
    display: flex;
    gap: 10px;
}

.qa-filter-button, .qa-reset-button {
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.qa-filter-button {
    background-color: #2271b1;
    color: white;
}

.qa-filter-button:hover {
    background-color: #135e96;
}

.qa-reset-button {
    background-color: #f0f0f0;
    color: #333;
}

.qa-reset-button:hover {
    background-color: #e0e0e0;
}

/* Q&Aリスト */
.smart-qa-list {
    margin-bottom: 30px;
}

.qa-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.qa-item:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.qa-question {
    position: relative;
    padding: 18px 50px 18px 22px;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.3s;
}

.qa-question:hover {
    background-color: #eaeaea;
}

.qa-question h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.qa-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.qa-toggle:before, .qa-toggle:after {
    content: '';
    position: absolute;
    background-color: #555;
    transition: all 0.3s ease;
}

.qa-toggle:before {
    top: 9px;
    left: 0;
    width: 100%;
    height: 2px;
}

.qa-toggle:after {
    top: 0;
    left: 9px;
    width: 2px;
    height: 100%;
}

.qa-question.active .qa-toggle:after {
    transform: rotate(90deg);
    opacity: 0;
}

.qa-meta {
    font-size: 12px;
    color: #777;
    margin-top: 8px;
}

.qa-answer {
    padding: 22px;
    background-color: white;
    border-top: 1px solid #eee;
    line-height: 1.6;
    color: #333;
}

.qa-answer p:first-child {
    margin-top: 0;
}

.qa-answer p:last-child {
    margin-bottom: 0;
}

/* アクションボタン共通コンテナ */
.qa-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* おすすめ事務所ボタン */
.qa-recommendation-button {
    display: inline-block;
    background-color: #ff6b6b;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 200px;
    text-align: center;
}

.qa-recommendation-button:hover {
    background-color: #ff5252;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transform: translateY(-2px);
    color: white;
}

.qa-recommendation-icon {
    display: inline-block;
    background-color: white;
    color: #ff6b6b;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    text-align: center;
    margin-right: 8px;
    font-weight: bold;
    font-size: 14px;
}

/* Xシェアボタン */
.qa-share-button {
    display: inline-block;
    background-color: #000;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 150px;
    text-align: center;
}

.qa-share-button:hover {
    background-color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    color: white;
}

.qa-share-icon {
    display: inline-block;
    background-color: white;
    color: #000;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    text-align: center;
    margin-right: 8px;
    font-weight: bold;
    font-size: 14px;
}

/* 検索結果がない場合のメッセージ */
.smart-qa-no-results {
    padding: 40px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-size: 15px;
}

/* アコーディオン開閉状態 */
.qa-question.active {
    background-color: #e7f0f7;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .smart-qa-filter-form {
        flex-direction: column;
    }
    
    .filter-group, .filter-submit {
        width: 100%;
    }
    
    .qa-question {
        padding: 15px 45px 15px 15px;
    }
    
    .qa-question h3 {
        font-size: 15px;
    }
    
    .qa-answer {
        padding: 15px;
    }
    
    .qa-action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .qa-recommendation-button,
    .qa-share-button {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    #qa_search {
        padding: 12px 15px;
        font-size: 15px;
    }
}

/* 検索結果ハイライト */
.search-highlight {
    background-color: #fff2a0;
    padding: 0 2px;
    border-radius: 2px;
}

/* 既存のCSSコードの後に以下を追加 */

/* パーマリンク関連 */
.qa-permalink {
    margin-left: 15px;
    display: inline-block;
}

.qa-anchor-link {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.qa-anchor-link:hover {
    opacity: 1;
    color: #2271b1;
}

.qa-link-icon {
    font-size: 16px;
}

/* アンカーターゲットのハイライト */
:target {
    animation: highlight-target 2s ease;
}

@keyframes highlight-target {
    0% {
        background-color: rgba(255, 251, 204, 0.8);
    }
    100% {
        background-color: transparent;
    }
}