/* 都道府県ページスタイル */
.area-page-header {
    margin-bottom: 2rem;
}

.area-page-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

/* 導入文セクション */
.area-intro-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.area-intro-section p {
    margin-bottom: 0.5rem;
}

/* カードローン業者一覧（折りたたみ式） */
.area-companies-section {
    margin-bottom: 3rem;
}

.companies-header {
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.companies-title {
    margin: 0;
}

.companies-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s;
}

.companies-toggle:hover {
    background-color: #e8e8e8;
}

.toggle-icon {
    margin-right: 0.5rem;
    font-size: 0.8em;
    transition: transform 0.3s;
}

.companies-list {
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.company-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s;
}

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

.company-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.company-image {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.company-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.company-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.company-badge--nationwide {
    background: #28a745;
    color: white;
}

.company-badge--regional {
    background: #6c757d;
    color: white;
}

/* カードローン業者カード */
.outlet-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: visible;
}

.outlet-card--nationwide {
    border-color: #28a745;
}

.outlet-card__nationwide-badge,
.outlet-card__regional-badge {
    position: absolute;
    top: -1px;
    left: -1px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.5rem 2rem 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 11px 0 11px 0;
}

.outlet-card__regional-badge {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
}

.outlet-nationwide-badge-area,
.outlet-regional-badge-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ランキングバッジ */
.outlet-rank-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 15px auto 10px;
    text-align: center;
}

.outlet-rank-badge--gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
}

.outlet-rank-badge--silver {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
    color: #333;
}

.outlet-rank-badge--bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    color: white;
}

.outlet-rank-badge--green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

/* 店舗・ATM情報 */
.outlet-card__stores {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.outlet-card__stores h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #333;
}

.store-list {
    display: grid;
    gap: 1rem;
}

/* 店舗が3件以上ある場合のスクロール対応 */
.store-list.has-many-stores {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
    /* スクロールバーのスタイリング */
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 #f0f0f0;
}

/* Chrome, Edge, Safari用のスクロールバー */
.store-list.has-many-stores::-webkit-scrollbar {
    width: 8px;
}

.store-list.has-many-stores::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.store-list.has-many-stores::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.store-list.has-many-stores::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* モバイル用の調整 */
@media (max-width: 768px) {
    .store-list.has-many-stores {
        max-height: 350px;
    }
}

.store-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.store-item__name {
    color: #333;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.store-item p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

/* CTAボタン */
.btn-official {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-official:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    color: white;
    text-decoration: none;
}

/* サブエリア一覧 */
.area-subareas-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.sub-areas-list {
    margin-top: 1rem;
}

.sub-area-link {
    color: #007bff;
    text-decoration: none;
    margin-right: 1rem;
}

.sub-area-link:hover {
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .companies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .outlet-rank-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .btn-official {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}

/* 追加: バッジ位置の調整 */
.outlet-card__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* ロゴのセンタリング（スマホ） */
.outlet-card__header > .outlet-card__logo-link {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

/* バッジをロゴの下に配置 */
.outlet-card__header > .outlet-rank-badge {
    order: 2;
    width: 100%;
    margin: 0 auto 15px;
}

/* 商品情報 */
.outlet-card__header > .outlet-card__info {
    order: 3;
    width: 100%;
    text-align: center;
}

/* PC表示の調整 */
@media (min-width: 768px) {
    .outlet-card__header {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    
    .outlet-card__header > .outlet-card__logo-link {
        width: auto;
        margin-bottom: 0;
    }
    
    .outlet-card__header > .outlet-rank-badge {
        width: auto;
        order: 0;
        margin: 0 15px;
    }
    
    .outlet-card__header > .outlet-card__info {
        width: auto;
        text-align: left;
        flex: 1;
    }
}

/* 評価内訳表示 */
.outlet-card__rating-details {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.rating-details-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.rating-average-large {
    font-size: 2rem;
    font-weight: bold;
    color: #ff9800;
}

.rating-average-label {
    font-size: 0.9rem;
    color: #666;
}

.rating-breakdown-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.rating-stars {
    display: flex;
    color: #ff9800;
    min-width: 80px;
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.rating-bar {
    height: 100%;
    background: #ff9800;
    transition: width 0.3s ease;
}

.rating-count {
    min-width: 30px;
    text-align: right;
    color: #666;
    font-size: 0.8rem;
}

.rating-percentage {
    min-width: 45px;
    text-align: right;
    color: #999;
    font-size: 0.8rem;
}