/**
 * 審査体験談集約ページスタイル
 */

/* ヘッダー */
.aggregate-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.aggregate-header h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.aggregate-logo {
    max-width: 200px;
    margin: 0 auto;
}

.aggregate-logo img {
    max-width: 100%;
    height: auto;
}

/* カスタムHTMLエリア */
.custom-html-area {
    margin-bottom: 40px;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* 統計セクション */
.statistics-section {
    margin-bottom: 60px;
}

.statistics-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

/* 満足度セクション */
.satisfaction-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.satisfaction-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.satisfaction-content {
    text-align: center;
}

.satisfaction-score {
    font-size: 48px;
    color: #f39c12;
    margin-bottom: 10px;
}

.satisfaction-score .score-number {
    font-weight: bold;
}

.satisfaction-score .score-max {
    font-size: 24px;
    color: #666;
}

.satisfaction-content .star-rating {
    font-size: 24px;
    margin-bottom: 10px;
}

.satisfaction-count {
    font-size: 14px;
    color: #f39c12;
    margin-top: 10px;
}

/* 注釈ボックス */
.statistics-disclaimer {
    margin-top: 30px;
    padding: 15px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.statistics-disclaimer p {
    font-size: 12px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.statistics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #f39c12;
}

/* 審査結果の内訳 */
.result-breakdown {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-breakdown h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.result-chart {
    display: flex;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.result-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    transition: width 0.3s ease;
}

.result-bar.approved {
    background-color: #27ae60;
}

.result-bar.rejected {
    background-color: #e74c3c;
}

.result-bar.pending {
    background-color: #95a5a6;
}

.result-label {
    white-space: nowrap;
    padding: 0 10px;
}

/* 属性別統計 */
.attribute-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-group {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-group h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.stat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.stat-list li:last-child {
    border-bottom: none;
}

/* 体験談一覧 */
.experiences-section {
    margin-bottom: 60px;
}

.experiences-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

.experiences-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.experience-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    scroll-margin-top: 80px;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.experience-title {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.experience-title-large {
    font-size: 28px;
    font-weight: bold;
    color: #007cba;
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fd 100%);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 5px solid #007cba;
    margin-bottom: 10px;
    line-height: 1.4;
}

.experience-date {
    font-size: 14px;
    color: #666;
}

/* 体験談メタ情報 */
.experience-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-label {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.meta-value {
    font-size: 14px;
    color: #333;
}

.meta-value.result-approved {
    color: #27ae60;
    font-weight: bold;
}

.meta-value.result-rejected {
    color: #e74c3c;
    font-weight: bold;
}

.meta-value.result-pending {
    color: #95a5a6;
    font-weight: bold;
}

/* 体験談詳細テーブル */
.experience-details {
    margin-bottom: 20px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th {
    background-color: #f8f9fa;
    padding: 10px 15px;
    text-align: left;
    font-weight: bold;
    color: #333;
    width: 30%;
    border: 1px solid #e0e0e0;
}

.details-table td {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
}

/* 体験談コンテンツ */
.experience-content {
    margin-bottom: 20px;
}

.experience-content h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.experience-content p {
    line-height: 1.8;
    color: #555;
}

/* 体験談写真 */
.experience-photos {
    margin-top: 20px;
}

.experience-photos h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-width: 330px;
}

.photo-link {
    display: block;
    border-radius: 5px;
    overflow: hidden;
}

.photo-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-link:hover .photo-thumb {
    transform: scale(1.05);
}

/* ページネーション */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination-wrapper ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination-wrapper li {
    display: inline-block;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: block;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-wrapper a:hover {
    background-color: #f39c12;
    color: #fff;
    border-color: #f39c12;
}

.pagination-wrapper .current span {
    background-color: #f39c12;
    color: #fff;
    border-color: #f39c12;
}

/* 記事エリア */
.article-section {
    margin-bottom: 60px;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.article-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.article-section h3 {
    font-size: 18px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

/* 体験談投稿フォーム */
.experience-form-section {
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.experience-form-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.experience-submission-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 3つの入力フィールドを含む行用のスタイル */
.form-row-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* フォーム要素の可視性を確保 */
.form-row-three .form-group {
    display: block;
    visibility: visible;
}

/* 適用金利フィールドのスタイル */
#applied_interest_rate {
    width: 100%;
    display: block;
    visibility: visible;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="month"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.required {
    color: #e74c3c;
}

.photo-upload-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.photo-input-wrapper {
    position: relative;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #f39c12;
    color: #fff;
}

.btn-primary:hover {
    background-color: #e67e22;
}

.btn-outline {
    background-color: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-outline:hover {
    background-color: #f8f9fa;
}

.btn-official {
    background-color: #27ae60;
    color: #fff;
}

.btn-official:hover {
    background-color: #229954;
}

/* 関連情報リンク */
.related-links {
    margin-top: 60px;
    text-align: center;
}

.related-links h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.link-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* フォームメッセージ */
#experience-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

#experience-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#experience-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 写真プレビュー */
.photo-preview {
    position: relative;
    margin-top: 10px;
}

.photo-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.remove-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-photo:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

/* 文字数カウンター */
.char-counter {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    text-align: right;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .aggregate-header h1 {
        font-size: 24px;
    }
    
    .statistics-overview {
        grid-template-columns: 1fr;
    }
    
    .attribute-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* モバイルでも3つの入力フィールドを含む行は1列表示 */
    .form-row-three {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .experience-header {
        flex-direction: column;
    }
    
    .experience-meta {
        grid-template-columns: 1fr;
    }
    
    .photo-upload-area {
        grid-template-columns: 1fr;
    }
    
    .link-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .link-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* 満足度分布の横棒グラフ */
.satisfaction-distribution {
    margin: 40px 0;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.satisfaction-distribution h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.satisfaction-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.satisfaction-bar-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.satisfaction-label {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.satisfaction-label .star-rating {
    color: #ffc107;
    font-size: 16px;
}

.satisfaction-label .label-text {
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

.satisfaction-bar-container {
    flex: 1;
    background: #f0f0f0;
    height: 35px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.satisfaction-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 15px;
    transition: width 0.8s ease-out;
    min-width: fit-content;
}

.satisfaction-bar .bar-text {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

/* 空の場合のテキスト表示 */
.satisfaction-bar[style*="width: 0%"] .bar-text {
    color: #666;
    position: absolute;
    left: 10px;
}

@media (max-width: 768px) {
    .satisfaction-label {
        min-width: 100px;
    }
    
    .satisfaction-label .star-rating {
        font-size: 14px;
    }
    
    .satisfaction-bar-row {
        gap: 10px;
    }
}