/* ===== テキストベース広告スタイル ===== */

/* パターン1: シンプルリスト */
.text-link-simple {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    max-width: 100%;
    overflow: hidden;
}

.text-link-simple:hover {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ff9900;
    transform: translateX(4px);
}

.text-link-simple .link-icon {
    font-size: 16px;
    margin-right: 10px;
    color: #ff9900;
}

.text-link-simple .link-title {
    flex: 1;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-link-simple .link-arrow {
    color: #999;
    margin-left: 10px;
    transition: transform 0.3s;
}

.text-link-simple:hover .link-arrow {
    transform: translateX(4px);
    color: #ff9900;
}

/* パターン2: カード風 */
.text-link-card {
    display: block;
    padding: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.text-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.1), transparent);
    transition: left 0.5s;
}

.text-link-card:hover::before {
    left: 100%;
}

.text-link-card:hover {
    border-color: #ff9900;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.2);
    transform: translateY(-2px);
}

.text-link-card .link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.text-link-card .link-badge {
    background: #ff9900;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.text-link-card .link-tag {
    font-size: 11px;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
}

.text-link-card .link-title {
    font-size: 13px;
    font-weight: 500;
    color: #0066c0;
    line-height: 1.4;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-link-card .link-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-link-card .link-cta {
    font-size: 13px;
    color: #666;
}

.text-link-card .link-icon {
    color: #ff9900;
    font-weight: bold;
}

/* パターン3: ミニマル */
.text-link-minimal {
    display: inline-block;
    color: #0066c0;
    text-decoration: none;
    font-size: 14px;
    position: relative;
    padding-right: 30px;
    margin: 5px 0;
    transition: color 0.3s;
}

.text-link-minimal:hover {
    color: #ff9900;
    text-decoration: underline;
}

.text-link-minimal .link-badge-mini {
    position: absolute;
    right: 0;
    top: 0;
    background: #ff9900;
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* パターン4: リッチテキスト */
.text-link-rich {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.text-link-rich .link-label {
    font-size: 12px;
    color: #795548;
    margin-bottom: 8px;
    font-weight: 600;
}

.text-link-rich .link-main {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #0066c0;
    text-decoration: none;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s;
}

.text-link-rich .link-main:hover {
    color: #ff9900;
    text-decoration: underline;
}

.text-link-rich .link-tags {
    margin-bottom: 15px;
}

.text-link-rich .tag {
    display: inline-block;
    font-size: 11px;
    color: #666;
    background: white;
    padding: 3px 8px;
    border-radius: 12px;
    margin-right: 5px;
}

.text-link-rich .btn-amazon {
    display: inline-block;
    background: #ff9900;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.text-link-rich .btn-amazon:hover {
    background: #e47911;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* パターン5: コンパクトリスト */
.text-links-compact {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.text-links-compact .compact-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff9900;
}

.text-links-compact .header-icon {
    font-size: 18px;
    margin-right: 8px;
}

.text-links-compact .header-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.text-links-compact .compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.text-links-compact .compact-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.text-links-compact .compact-list li:last-child {
    border-bottom: none;
}

.text-links-compact .compact-list a {
    color: #0066c0;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    display: block;
    position: relative;
    padding-left: 16px;
    transition: all 0.3s;
}

.text-links-compact .compact-list a::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #ff9900;
    transition: transform 0.3s;
}

.text-links-compact .compact-list a:hover {
    color: #ff9900;
    padding-left: 20px;
}

.text-links-compact .compact-list a:hover::before {
    transform: translateX(4px);
}

.text-links-compact .compact-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    text-align: right;
}

.text-links-compact .compact-footer small {
    color: #999;
    font-size: 10px;
}

/* アニメーション効果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-link-card,
.text-link-simple,
.text-link-rich,
.text-links-compact {
    animation: slideIn 0.5s ease-out;
}

/* サイドバー広告のサイズ最適化 */
.sidebar-ad .ad-container {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-ad .text-link-card {
    padding: 10px;
    margin-bottom: 8px;
}

.sidebar-ad .text-link-simple {
    padding: 8px 10px;
    margin-bottom: 6px;
}

.sidebar-ad .text-link-card .link-title,
.sidebar-ad .text-link-simple .link-title {
    font-size: 12px;
}

.sidebar-ad .text-links-compact {
    font-size: 12px;
}

.sidebar-ad .compact-list {
    max-height: 200px;
    overflow-y: auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .text-link-card .link-title,
    .text-link-simple .link-title {
        font-size: 13px;
    }
    
    .text-link-rich .link-main {
        font-size: 14px;
    }
    
    .text-link-rich .btn-amazon {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* 広告であることを明示 */
.ad-disclosure {
    font-size: 10px;
    color: #999;
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* ローディング中の表示 */
.text-links-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.text-links-loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}