/* ── Hindamissüsteem ─────────────────────────────────────────── */
.hmr-title-ratings { text-align: center; margin-bottom: 12px; }
.hmr-rate-section  { text-align: center; }
.hmr-rate-section h3 { margin-bottom: 12px; }

.hmr-stars-input  { display: inline-flex; align-items: center; gap: 4px; }
.hmr-star-btn     { background: none; border: none; font-size: 28px; color: #ddd; cursor: pointer; padding: 0; line-height: 1; transition: color .1s, transform .1s; }
.hmr-star-btn.active, .hmr-star-btn.hover { color: #f4a80a; transform: scale(1.15); }
.hmr-rating-label { font-size: 14px; color: #888; margin-left: 8px; }

.hmr-stars-display { display: inline-flex; align-items: center; gap: 3px; }
.hmr-star          { font-size: 18px; color: #ddd; }
.hmr-star.filled   { color: #f4a80a; }
.hmr-rating-avg    { font-weight: 700; font-size: 15px; margin-left: 6px; }
.hmr-rating-count  { font-size: 13px; color: #888; margin-left: 4px; }

/* ── Toitumisinfo ────────────────────────────────────────────── */
.hmr-nutrition { background: #f8f9fa; border-radius: 10px; padding: 20px 24px; margin-bottom: 28px; }
.hmr-nutrition h3 { font-size: 15px; margin: 0 0 16px; color: #555; }
.hmr-nutrition h3 i { margin-right: 6px; color: #4caf50; }
.hmr-nutrition-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.hmr-nutrition-item { flex: 1; min-width: 80px; background: #fff; border-radius: 8px; padding: 12px; text-align: center; border: 1px solid #eee; }
.hmr-nutrition-val  { display: block; font-size: 22px; font-weight: 700; color: #222; }
.hmr-nutrition-val small { font-size: 12px; font-weight: 400; color: #888; margin-left: 2px; }
.hmr-nutrition-label { font-size: 12px; color: #666; margin-top: 4px; display: block; }

/* ── Ostunimekirja nupp retseptil ────────────────────────────── */
.hmr-add-to-shoplist {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    transition: all .2s;
}
.hmr-add-to-shoplist:hover      { background: #f0f0f0; }
.hmr-add-to-shoplist.in-list    { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
.hmr-sl-badge { background: #4caf50; color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 6px; margin-left: 4px; display: none; }

/* Sammu tehtuks märkimine */
.hmr-steps li { position: relative; }
.hmr-step-done { position: absolute; right: 0; top: 0; background: none; border: 1px solid #ddd; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; color: #ccc; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.hmr-steps li.done .hmr-step-done  { background: #4caf50; border-color: #4caf50; color: #fff; }
.hmr-steps li.done .hmr-step-content { opacity: .5; text-decoration: line-through; }

/* ── Ostunimekirja leht ───────────────────────────────────────── */
#hmr-shopping-list-page { max-width: 1000px; }
#hmr-sl-content { display: grid; grid-template-columns: 280px 1fr; gap: 28px; }
@media (max-width: 700px) { #hmr-sl-content { grid-template-columns: 1fr; } }

.hmr-sl-empty { text-align: center; padding: 60px 20px; color: #888; }
.hmr-sl-empty i { font-size: 48px; margin-bottom: 16px; display: block; color: #ccc; }

.hmr-sl-recipe-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.hmr-sl-recipe-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.hmr-sl-no-thumb { background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; }
.hmr-sl-recipe-info { flex: 1; min-width: 0; }
.hmr-sl-recipe-title { font-weight: 600; font-size: 14px; color: #333; text-decoration: none; display: block; }
.hmr-sl-recipe-title:hover { text-decoration: underline; }
.hmr-sl-recipe-meta { font-size: 12px; color: #999; }
.hmr-sl-remove { background: none; border: none; color: #ccc; cursor: pointer; font-size: 16px; padding: 4px; flex-shrink: 0; }
.hmr-sl-remove:hover { color: #a00; }

.hmr-sl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hmr-btn-primary  { background: #4caf50; color: #fff; border: none; border-radius: 6px; padding: 9px 18px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hmr-btn-primary:hover  { background: #388e3c; }
.hmr-btn-outline  { background: #fff; color: #333; border: 1px solid #ccc; border-radius: 6px; padding: 9px 18px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.hmr-btn-outline:hover  { background: #f5f5f5; }
.hmr-btn-danger   { background: #fff; color: #c62828; border: 1px solid #ef9a9a; border-radius: 6px; padding: 9px 18px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.hmr-btn-danger:hover   { background: #ffebee; }

.hmr-sl-ing-list { list-style: none; padding: 0; margin: 0; }
.hmr-sl-ing-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.hmr-sl-ing-item.done .hmr-sl-ing-text { text-decoration: line-through; opacity: .5; }
.hmr-sl-ing-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.hmr-sl-ing-label input { margin-top: 3px; accent-color: #4caf50; }
.hmr-sl-ing-product { margin-top: 4px; padding-left: 24px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hmr-sl-add-one { font-size: 12px; padding: 4px 12px; border-radius: 14px; }

/* Lemmikute leht teade */
.hmr-notice { background: #f8f9fa; border-radius: 8px; padding: 32px; text-align: center; color: #555; }
.hmr-notice i { font-size: 36px; margin-bottom: 12px; display: block; color: #ccc; }

/* Toast teade */
.hmr-toast { position: fixed; bottom: 24px; right: 24px; background: #333; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; z-index: 99999; opacity: 0; transform: translateY(10px); transition: all .3s; pointer-events: none; }
.hmr-toast a { color: #81c784; }
.hmr-toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Printimine */
@media print {
    #hmr-sl-recipes-col, .hmr-sl-actions, .hmr-sl-remove, .hmr-sl-add-one { display: none !important; }
    #hmr-sl-content { grid-template-columns: 1fr; }
    .hmr-sl-ing-item.done { display: none; }
}

/* ── Retseptid toote lehel ───────────────────────────────────── */
.hmr-product-recipes,
.hmr-product-recipes-auto {
    margin: 40px 0;
    padding-top: 32px;
    border-top: 1px solid #eee;
}
.hmr-product-recipes-title,
.hmr-product-recipes-auto > h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}
.hmr-cards-grid--1 { grid-template-columns: 1fr !important; max-width: 360px; }
.hmr-cards-grid--2 { grid-template-columns: repeat(2, 1fr) !important; }
.hmr-cards-grid--3 { grid-template-columns: repeat(3, 1fr) !important; }
.hmr-cards-grid--4 { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 600px) {
    .hmr-cards-grid--2,
    .hmr-cards-grid--3,
    .hmr-cards-grid--4 { grid-template-columns: repeat(2, 1fr) !important; }
}
