/*
Simple Popular Posts
Version: 1.0.4
*/

.custom-popular-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cpp-card {
    background: #d6c6c0; /* 背景色（必要に応じて調整） */
    border: 1px solid #eaeaea; /* 薄いグレーで細い線を追加 */
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.cpp-card:hover {
    transform: translateY(-2px);
}

.cpp-link-wrap {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 12px;
}

/* 上半分エリア：ランキング番号とサムネイルを重ねて配置 */
.cpp-header-area {
    position: relative;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* 左上の大きなランキング番号 */
.cpp-rank {
    position: absolute;
    top: 0;
    left: 0;
    
    /* 円にするためのサイズ調整（例：48px x 48pxの正円） */
    width: 48px;
    height: 48px;
    
    /* テキストを中央に配置するためのFlexbox */
    display: flex;
    justify-content: center; /* 横方向中央 */
    align-items: center;     /* 縦方向中央 */
    
    /* フォントサイズ（円のサイズに合わせて微調整） */
    font-size: 24px;
    
    font-weight: bold;
    color: #ffffff;
    font-family: sans-serif;
    z-index: 2;
    background: #db5520;
    
    /* paddingは不要になるので削除、または0に */
    padding: 0;
    
    /* 角丸を50%にして正円にする */
    border-radius: 50%;
}

/* 右上の小ぶりなサムネイル */
.cpp-thumb {
    width: 120px;
    height: 70px;
    overflow: hidden;
    border-radius: 7px;
}

.cpp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 下半分エリア：タイトルと日付 */
.cpp-content-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cpp-title {
    font-size: 14px;
    line-height: 1.4;
    color: #333333;
    margin: 0;
    font-weight: 500;
    /* 2行以上は省略するなどの調整も可能 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cpp-date {
    font-size: 11px;
    color: #555555;
    letter-spacing: 0.05em;
}

/* サイドバーの Popular Posts などのサムネイル画像も角丸にする場合の一例 */
.widget-popular-posts img,
.popular-posts img,
aside img {
  border-radius: 7px !important;
}