/* ===================================================
   コーヒー価格トラッカー - お得情報
   =================================================== */

/* --- Base container (shortcode wrapper) --- */
.coffee-price {
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* --- Widget (added by JS to .coffee-price) --- */
.cp-widget {
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 1.25rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: all 0.3s ease;
}

.cp-widget:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	border-color: #c4a882;
}

/* --- Price Header --- */
.cp-price-header {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	flex-wrap: wrap;
}

/* --- Current Price (Large Bold) --- */
.cp-current-price {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1;
}

/* --- Trend Indicator --- */
.cp-trend {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.2rem 0.5rem;
	border-radius: 9999px;
}

.cp-trend svg {
	width: 14px;
	height: 14px;
}

/* --- "過去最安値!" Badge (Animated Pulse) --- */
.cp-lowest-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.7rem;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(135deg, #c45a5a, #d4815e);
	padding: 0.25rem 0.65rem;
	border-radius: 9999px;
	animation: pricePulse 2s ease-in-out infinite;
}

@keyframes pricePulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(196, 90, 90, 0.4); }
	50% { box-shadow: 0 0 0 6px rgba(196, 90, 90, 0); }
}

/* --- Sparkline Canvas --- */
.cp-sparkline {
	display: block;
	width: 100%;
	height: 40px;
	margin: 0.5rem 0;
}

/* --- Lowest Price Info --- */
.cp-lowest-info {
	font-size: 0.82rem;
	color: #555;
	margin-bottom: 0.5rem;
}

.cp-lowest-date {
	color: #999;
	font-size: 0.78rem;
}

/* --- Stores Section --- */
.cp-stores {
	margin-top: 0.75rem;
}

.cp-stores-title {
	font-size: 0.9rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 0.5rem 0;
}

.cp-store-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cp-store-item {
	border-radius: 8px;
	transition: background-color 0.15s ease;
}

.cp-store-item:nth-child(even) {
	background-color: #fafafa;
}

.cp-store-item:hover {
	background-color: #f8f8f8;
}

.cp-store-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0.75rem;
	font-size: 0.82rem;
	color: #8b5e3c;
	text-decoration: none;
	font-weight: 600;
}

.cp-store-link:hover {
	color: #6d4830;
	text-decoration: underline;
}

.cp-store-name {
	color: #1a1a1a;
	font-weight: 500;
}

.cp-store-price {
	font-weight: 700;
	color: #1a1a1a;
}

.cp-store-item:first-child .cp-store-price {
	color: #34a853;
	font-weight: 700;
}

/* --- Alert Button --- */
.cp-alert-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	width: 100%;
	padding: 0.65rem 1rem;
	border: 1.5px solid #e5e5e5;
	border-radius: 9999px;
	background-color: transparent;
	color: #555;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: 0.75rem;
}

.cp-alert-btn:hover {
	border-color: #8b5e3c;
	color: #8b5e3c;
	background-color: rgba(139, 94, 60, 0.04);
}

.cp-alert-btn--active {
	border-color: #8b5e3c;
	background-color: #8b5e3c;
	color: #ffffff;
}

.cp-alert-btn--active:hover {
	border-color: #6d4830;
	background-color: #6d4830;
	color: #ffffff;
}

.cp-alert-btn svg {
	width: 16px;
	height: 16px;
}

/* --- Toast Notification --- */
.cp-toast {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #1a1a1a;
	color: #ffffff;
	padding: 12px 24px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	font-size: 14px;
	font-weight: 500;
	z-index: var(--z-toast);
	max-width: 360px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.cp-toast--show {
	opacity: 1;
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (max-width: 640px) {
	.cp-current-price {
		font-size: 1.5rem;
	}

	.cp-toast {
		bottom: 16px;
		left: 16px;
		right: 16px;
		max-width: none;
		transform: none;
	}
}

@media (max-width: 480px) {
	.cp-widget {
		padding: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-lowest-badge {
		animation: none;
	}
}
