/**
 * /user-routes/ 専用スタイル
 * route-archive.css / single-route.css / common.css に依存
 */

/* ===== 一覧カード（投稿者表示の追加分） ===== */
.user-route-card {
    display: flex;
    flex-direction: column;
}

.user-route-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 16px 0;
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.user-route-card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e5e5;
    flex-shrink: 0;
}

.user-route-card-avatar--placeholder {
    background: linear-gradient(135deg, #e5e5e5, #d4d4d4);
}

.user-route-card-author-name {
    font-size: 13px;
    color: var(--sub, #666);
    font-weight: 500;
}

/* ===== 詳細：地図 ===== */
.user-route-map {
    width: 100%;
    max-width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    margin: 16px 0 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    box-sizing: border-box;
}

.user-route-map > div {
    max-width: 100%;
}

.user-route-map-cta {
    margin: -16px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}
.user-route-map-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--red);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.user-route-map-cta-btn:hover {
    background: var(--red-d);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 36, 36, 0.3);
}
.user-route-map-cta-btn svg {
    width: 18px;
    height: 18px;
}

.article-body p.user-route-map-note,
p.user-route-map-note {
    margin: 0;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #92400e;
}

/* チェックポイントは公式ルート用 single-route.css の .article-checkpoints / .checkpoint / .cp-* を流用 */

/* ===== 詳細：アクションボタン ===== */
.user-route-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0 8px;
}

.user-route-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-route-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.user-route-action--fav {
    background: #fff;
    color: var(--color-brand, #dc2424);
    border: 2px solid var(--color-brand, #dc2424);
}

.user-route-action--drive {
    background: var(--color-brand, #dc2424);
    color: #fff;
    border: 2px solid var(--color-brand, #dc2424);
}

.user-route-action--drive:hover {
    background: var(--color-brand-hover, #b91c1c);
    border-color: var(--color-brand-hover, #b91c1c);
}

.user-route-action-icon {
    font-size: 20px;
    line-height: 1;
}

.article-body p.user-route-actions-note,
p.user-route-actions-note {
    margin: 8px 0 32px;
    font-size: 11px;
    color: var(--sub);
    text-align: center;
    line-height: 1.6;
}

/* ===== 詳細：投稿者カード ===== */
.user-route-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-route-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e5e5;
    flex-shrink: 0;
}

.user-route-author-avatar--placeholder {
    background: linear-gradient(135deg, #e5e5e5, #d4d4d4);
}

.user-route-author-meta {
    flex: 1;
    min-width: 0;
}

.user-route-author-name {
    font-weight: 700;
    font-size: 15px;
}

.user-route-author-username {
    font-size: 12px;
    color: var(--sub, #888);
}

.user-route-author-bio {
    font-size: 13px;
    line-height: 1.6;
    color: var(--sub, #555);
    margin: 8px 0 12px;
    white-space: pre-wrap;
}

.user-route-author-sns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.user-route-author-sns-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--sub, #555);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-route-author-sns-link svg {
    width: 16px;
    height: 16px;
}

.user-route-author-sns-link:hover {
    background: var(--color-brand, #dc2424);
    color: #fff;
}

/* ===== モバイル ===== */
@media (max-width: 640px) {
    .user-route-actions {
        grid-template-columns: 1fr;
    }
    .user-route-map {
        height: 280px;
    }
}

/* 詳細ページ全体の横はみ出し防止（保険） */
.roadly-user-route-single .article-layout,
.roadly-user-route-single .article-body {
    max-width: 100%;
    overflow-x: hidden;
}

.roadly-user-route-single .cp-desc {
    overflow-wrap: break-word;
    word-break: break-word;
}
