/* ── My Favorite Recipes — style.css ───────────────────────────────────────── */

/* ── Save Button ─────────────────────────────────────────────────────────── */

.mfr-btn {
	display:         inline-flex;
	align-items:     center;
	gap:             6px;
	padding:         10px 18px;
	background:      #fff;
	border:          2px solid #e2e8f0;
	border-radius:   50px;
	cursor:          pointer;
	font-size:       0.95rem;
	font-weight:     600;
	color:           #4a5568;
	transition:      background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
	line-height:     1;
}

.mfr-btn:hover,
.mfr-btn:focus {
	border-color: #e53e3e;
	color:        #e53e3e;
	outline:      none;
}

.mfr-btn.mfr-saved {
	background:   #fff5f5;
	border-color: #e53e3e;
	color:        #e53e3e;
}

.mfr-btn:active {
	transform: scale(0.96);
}

/* ── Heart Icon ──────────────────────────────────────────────────────────── */

.mfr-heart-icon {
	display:     flex;
	align-items: center;
	justify-content: center;
	transition:  transform 0.2s;
}

.mfr-btn:hover .mfr-heart-icon,
.mfr-btn.mfr-saved .mfr-heart-icon {
	transform: scale(1.15);
}

.mfr-heart-outline .mfr-heart-path {
	fill:   none;
	stroke: currentColor;
	stroke-width: 1.8;
	transition: fill 0.25s, stroke 0.25s;
}

.mfr-heart-filled .mfr-heart-path {
	/* fill color set inline via JS (heartColor) */
	stroke: none;
	transition: fill 0.25s;
}

/* ── Floating Button ─────────────────────────────────────────────────────── */

.mfr-floating {
	position:    fixed;
	bottom:      24px;
	z-index:     9999;
	display:     flex;
	flex-direction: column;
	align-items: center;
	gap:         4px;
	background:  #fff;
	border:      2px solid #e2e8f0;
	border-radius: 50px;
	padding:     10px 14px;
	cursor:      pointer;
	box-shadow:  0 4px 16px rgba(0,0,0,.12);
	transition:  border-color 0.2s, box-shadow 0.2s, transform 0.15s;
	min-width:   54px;
}

.mfr-float-right { right: 24px; }
.mfr-float-left  { left:  24px; }

.mfr-floating:hover,
.mfr-floating:focus {
	border-color: #e53e3e;
	box-shadow:   0 6px 20px rgba(229,62,62,.2);
	outline:      none;
}

.mfr-floating:active {
	transform: scale(0.95);
}

.mfr-float-count {
	font-size:   0.78rem;
	font-weight: 700;
	color:       #4a5568;
	line-height: 1;
}

/* ── Favorites Grid ──────────────────────────────────────────────────────── */

.mfr-grid {
	display:               grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap:                   24px;
	padding:               8px 0;
}

.mfr-card {
	background:    #fff;
	border:        1px solid #e2e8f0;
	border-radius: 12px;
	overflow:      hidden;
	display:       flex;
	flex-direction: column;
	transition:    box-shadow 0.2s, transform 0.2s;
}

.mfr-card:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,.1);
	transform:  translateY(-2px);
}

.mfr-card-img-wrap {
	display: block;
	overflow: hidden;
	aspect-ratio: 16/9;
}

.mfr-card-img-wrap img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	transition: transform 0.3s;
}

.mfr-card:hover .mfr-card-img-wrap img {
	transform: scale(1.04);
}

.mfr-card-body {
	padding:        16px;
	display:        flex;
	flex-direction: column;
	gap:            8px;
	flex:           1;
}

.mfr-card-title {
	margin:      0;
	font-size:   1rem;
	font-weight: 700;
	line-height: 1.3;
}

.mfr-card-title a {
	color:           inherit;
	text-decoration: none;
}

.mfr-card-title a:hover {
	color: #e53e3e;
}

.mfr-card-meta {
	display:  flex;
	gap:      12px;
	flex-wrap: wrap;
	font-size: 0.82rem;
	color:     #718096;
}

.mfr-view-btn {
	display:         inline-block;
	margin-top:      auto;
	padding:         8px 16px;
	background:      #e53e3e;
	color:           #fff !important;
	border-radius:   50px;
	text-decoration: none;
	font-size:       0.85rem;
	font-weight:     600;
	text-align:      center;
	transition:      background 0.2s;
}

.mfr-view-btn:hover {
	background: #c53030;
}

/* ── Empty / Loading states ──────────────────────────────────────────────── */

.mfr-empty,
.mfr-loading {
	color:      #718096;
	font-style: italic;
	padding:    24px 0;
}

/* ── Mobile adjustments ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.mfr-btn {
		padding:   9px 14px;
		font-size: 0.88rem;
	}

	.mfr-floating {
		bottom:    16px;
		padding:   8px 12px;
	}

	.mfr-float-right { right: 16px; }
	.mfr-float-left  { left:  16px; }

	.mfr-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 16px;
	}
}
