@charset 'utf-8';

.afls {
	margin-top:1em;
	margin-bottom:1em;
	border: 1px solid #ccc;
	padding: .5em;
	background:white;
	color:#888;
}

.afls-img amp-img img,
.afls-img > img {
	display:block;
	max-height:100vw;
	max-height:calc(100vw - 1em - 30px);
	object-fit:contain;
	object-position:center center;
	margin-left:auto;
	margin-right:auto;
}

.afls-info {
	margin-top:.75em;
}

@media (min-width:768px) {
	.afls-img > img {
		max-height: none;
	}
	.afls-info {
		margin-top:0;
	}
}

.afls-title {
	font-weight:bold;
	color:#000;
}
.afls-description {
	font-size:80%;
	line-height:1.4;
	padding:.5em 0;
}

.afls-price {
	font-size:80%;
	line-height:1.4;
	padding:.5em 0;
}

.afls-container:not([data-afls]) .afls-price,
.afls-container:not([data-afls]) .afls-note {
	display:none;
}
.afls-note { font-size:80%; /* opacity:.5; */ }
.afls-ts:not(:empty)::before { content:'( '; margin-left:.5em; }
.afls-ts:not(:empty)::after  { content:' )'; margin-right:.5em; }

.afls-container[data-afls-src="amazonpa"] .afls-note::before {
	content:'Amazon調べ';
}
.afls-container[data-afls-src="rakutenapi"] .afls-note::before {
	content:'楽天市場調べ';
}


.afls-container[data-afls-src="amazonpa"] .afls-note-disclaimer::before,
.afls-container[data-afls-src="rakutenapi"] .afls-note-disclaimer::before {
	content:'- 詳細はこちら';
	cursor:pointer;
}

.afls-container .afls-note { position:relative; }
.afls-container[data-afls-src="amazonpa"] .afls-note-disclaimer:hover::after,
.afls-container[data-afls-src="rakutenapi"] .afls-note-disclaimer:hover::after {
	content:'';
	border:1px solid #888;
	background:white;
	padding:.5em;
	color:#888;
	white-space:pre-wrap;
	
	position:absolute;
	top:auto;
	bottom:100%;
	left:0;
	right:0;
}


.afls-links {
	margin-top:auto;
	padding-top:.75em;
	display:flex;
	flex-wrap:wrap;
	justify-content:space-evenly;
}

.btn.afls-link {
	border:1px solid #ccc;
	background:#eee;
	color:black;
	padding:.125em .75em;
	text-decoration:none;
	font-size:90%;
	white-space:nowrap;
	margin-bottom:0;
	text-align:center;
}
.btn.afls-link[href="#"] { display:none; }

.btn.afls-link[data-afls="amazon"] {
	border-color:hsl(36, 100%, 40%);
	background:hsl(36, 100%, 50%);
	color:white;
}
.btn.afls-link[data-afls="yahoo"] {
	border-color:hsl(207, 77%, 50%);
	background:hsl(207, 77%, 62%);
	color:white;
}
.btn.afls-link[data-afls="rakuten"] {
	border-color:hsl(0, 100%, 30%);
	background:hsl(0, 100%, 37%);
	color:white;
}

/*
.afls-link[data-afls="amazon"]  > span:empty::before { content:'Amazon.co.jp'; }
.afls-link[data-afls="yahoo"]   > span:empty::before { content:'Yahoo!ショッピング'; }
.afls-link[data-afls="rakuten"] > span:empty::before { content:'楽天市場'; }
.afls-link[data-afls="free"] > span:empty::before { content:'その他'; }
*/

.afls-link[data-afls="amazon"]  > span:empty::before { content:'Amazon'; }
.afls-link[data-afls="yahoo"]   > span:empty::before { content:'Yahoo!'; }
.afls-link[data-afls="rakuten"] > span:empty::before { content:'楽天市場'; }
.afls-link[data-afls="free"] > span:empty::before { content:'その他'; }

.btn.afls-link {
	/* .btn 系が .common-not-amp にあるので、AMP用に最低限つけておく */
	width:100%;
	line-height:1.6;
	vertical-align:middle;
	overflow:hidden;
	text-overflow:ellipsis;
	margin:.25em 0 0 0;
	cursor:pointer;
}

