/**
 * FP Character Frontend Styles
 */

/* Character info in meigen pages */
.fp-character-info {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.fp-character-profile h3 {
    margin: 0 0 20px 0;
    font-size: 1.3em;
    color: #333;
    font-weight: 700;
}

/* SWELLのテーブルスタイルを補完 */
.fp-character-info .swell-block-table,
.fp-character-item .swell-block-table {
    margin: 20px 0;
}

.fp-character-info .swell-block-table th,
.fp-character-item .swell-block-table th {
    width: 35%;
}

/* Character link button */
.fp-character-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007cba;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.fp-character-link:hover {
    background-color: #005a87;
    text-decoration: none;
}

/* Character single page styles */
.post_content .swell-block-table {
    margin: 30px 0;
}

/* 画像のマージン調整 */
.fp-character-featured-image {
    margin: 20px auto 30px;
    text-align: center;
}

.fp-character-featured-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* PC表示での画像サイズ制限（featured-image用） */
@media (min-width: 1200px) {
    .fp-character-featured-image {
        max-width: 400px !important;
    }
    
    .fp-character-featured-image img {
        max-height: 500px !important;
    }
}

/* タブレット表示での画像サイズ制限（featured-image用） */
@media (min-width: 768px) and (max-width: 1199px) {
    .fp-character-featured-image {
        max-width: 350px !important;
    }
    
    .fp-character-featured-image img {
        max-height: 400px !important;
    }
}

/* スマホ表示での画像サイズ制限（featured-image用） */
@media (max-width: 767px) {
    .fp-character-featured-image img {
        max-height: 300px !important;
    }
}

/* Character list styles */
.fp-character-list {
    margin: 40px 0;
}

.fp-character-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s;
}

.fp-character-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.fp-character-item h2 {
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    font-size: 1.6em;
    font-weight: 700;
}

/* SWELL互換のため post_content クラス内でのスタイル調整 */
.post_content h2 {
    margin-top: 3em;
    margin-bottom: 1.5em;
}

.post_content h2:first-child {
    margin-top: 0;
}

.fp-character-image {
    text-align: center;
    margin: 0 auto 20px;
}

.fp-character-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: contain;
}

/* PC表示での画像サイズ制限 */
@media (min-width: 1200px) {
    .fp-character-image {
        max-width: 400px !important;
    }
    
    .fp-character-image img {
        max-height: 500px !important;
    }
}

/* タブレット表示での画像サイズ制限 */
@media (min-width: 768px) and (max-width: 1199px) {
    .fp-character-image {
        max-width: 350px !important;
    }
    
    .fp-character-image img {
        max-height: 400px !important;
    }
}

/* スマホ表示での画像サイズ制限 */
@media (max-width: 767px) {
    .fp-character-image img {
        max-height: 300px !important;
    }
}

.fp-character-summary {
    overflow: hidden;
}

/* テーブルを見やすくする */
.fp-character-item .fp-profile-table {
    margin-bottom: 25px;
}

/* Responsive design */
@media (max-width: 768px) {
    .fp-character-image {
        margin: 0 auto 20px !important;
        max-width: 100% !important;
        text-align: center;
    }
    
    .fp-profile-table th,
    .fp-profile-table td {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .fp-character-link {
        display: block;
        text-align: center;
    }
}

/* Archive page styles */
.fp-character-archive h1 {
    margin-bottom: 20px;
    color: #333;
}

.fp-archive-intro,
.fp-archive-outro {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}