/**
 * YouTube Comment Manager - フロントエンド用スタイル
 */

/* コメント検索コンテナ */
.ytcm-search-container {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ytcm-search-container input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ytcm-search-container button {
    padding: 8px 15px;
    background: #4fc3f7; /* Cocoonのメインカラー */
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
}

.ytcm-search-container button:hover {
    background: #0288d1; /* Cocoonのホバーカラー */
}

/* 検索結果エリア */
#ytcm-search-results {
    margin-top: 20px;
    margin-bottom: 30px;
}

.ytcm-no-results, .ytcm-loading, .ytcm-error {
    padding: 10px;
    background: #f5f5f5;
    border-left: 4px solid #ddd;
    margin-bottom: 20px;
}

.ytcm-loading {
    border-left-color: #2271b1;
}

.ytcm-error {
    border-left-color: #dc3232;
    background-color: #fbeaea;
}

.ytcm-search-result {
    margin-bottom: 15px;
}

/* YouTubeの埋め込み動画をレスポンシブに表示 */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5em;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .ytcm-search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ytcm-search-container input[type="text"] {
        width: 100%;
    }
    
    .ytcm-search-container button {
        width: 100%;
    }
}

/* 青色ボックス - st-myboxからの移行 */
.blue-box {
    position: relative;
    margin: 25px 0;
    padding: 0 20px;
    border-radius: 8px;
    background: #E1F5FE;
}

.in-box {
    padding: 20px 0;
    z-index: 1;
}

.in-box p {
    margin-bottom: 10px;
}

.in-box > *:last-child {
    margin-bottom: 0;
}

/* YouTubeの埋め込み動画をレスポンシブに表示 */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9のアスペクト比 */
    height: 0;
    overflow: hidden;
    margin-bottom: 1.5em;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 関連記事のグリッド表示 */
.related-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.related-post-item {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
}

.related-post-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.related-post-title {
    padding: 10px;
}

.related-post-title a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* クイックタグのスタイル */
#ytcm-quick-tags-container {
    margin-top: 15px;
}

#ytcm-quick-tags-container p {
    margin-bottom: 8px;
    font-size: 14px;
}

#ytcm-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ytcm-quick-tag {
    background: #e0f7fa;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.ytcm-quick-tag:hover {
    background-color: #b2ebf2;
}
