/* Hundimaitsed Retseptid – frontend styles */

/* ── Archive ─────────────────────────────────────────── */
.hmr-archive-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

.hmr-filters { background: #f8f8f6; border-radius: 8px; padding: 20px 24px; margin-bottom: 36px; }
.hmr-filter-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.hmr-filter-top { margin-bottom: 16px; }

.hmr-search-input { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; }
.hmr-search-input:focus { outline: none; border-color: #4caf50; }

.hmr-cats strong { display: block; margin-bottom: 8px; font-size: 14px; }
.hmr-cats-list { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hmr-cats-list label { font-size: 14px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.hmr-cats-list input { accent-color: #4caf50; }

.hmr-filter-group { display: flex; flex-direction: column; gap: 4px; }
.hmr-filter-group label { font-size: 13px; font-weight: 600; }
.hmr-filter-group select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 140px; background: #fff; }

.hmr-filter-actions { display: flex; gap: 8px; align-items: flex-end; padding-bottom: 2px; }
.hmr-btn-primary  { background: #333; color: #fff; border: none; border-radius: 6px; padding: 9px 20px; font-size: 14px; cursor: pointer; }
.hmr-btn-primary:hover  { background: #111; }
.hmr-btn-secondary { background: #fff; color: #555; border: 1px solid #ccc; border-radius: 6px; padding: 9px 20px; font-size: 14px; cursor: pointer; }
.hmr-btn-secondary:hover { background: #f0f0f0; }

/* ── Kaardid ─────────────────────────────────────────── */
.hmr-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px)  { .hmr-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .hmr-cards-grid { grid-template-columns: 1fr; } }

.hmr-card { background: #fff; border-radius: 8px; overflow: hidden; }
.hmr-card-img { aspect-ratio: 4/3; overflow: hidden; }
.hmr-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.hmr-card:hover .hmr-card-img img { transform: scale(1.04); }
.hmr-card-body { padding: 14px 6px 10px; }
.hmr-card-body h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
.hmr-card-body h3 a { color: inherit; text-decoration: none; }
.hmr-card-body h3 a:hover { text-decoration: underline; }
.hmr-card-meta { display: flex; gap: 14px; font-size: 13px; color: #666; }
.hmr-card-meta i { margin-right: 3px; }

.hmr-no-results { color: #666; padding: 20px 0; }

/* ── Pagination ──────────────────────────────────────── */
.hmr-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hmr-pagination button { padding: 8px 14px; border: 1px solid #ddd; border-radius: 5px; background: #fff; cursor: pointer; font-size: 14px; }
.hmr-pagination button.active { background: #333; color: #fff; border-color: #333; }
.hmr-pagination button:hover:not(.active) { background: #f5f5f5; }

/* ── Single recipe ───────────────────────────────────── */
.hmr-single-wrap { max-width: 760px; margin: 0 auto; padding: 0 20px 60px; }
.hmr-single { }

.hmr-title { text-align: center; font-size: 2rem; margin-bottom: 14px; }

.hmr-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; font-size: 15px; color: #444; margin-bottom: 20px; }
.hmr-meta i { margin-right: 4px; color: #666; }
.hmr-meta a { color: inherit; }

.hmr-actions { text-align: center; margin-bottom: 24px; }
.hmr-bookmark { 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; }
.hmr-bookmark.saved { border-color: #4caf50; color: #2e7d32; }
.hmr-bookmark:hover { background: #f8f8f8; }

/* Jagamine */
.hmr-share { background: #f5f5f5; border-radius: 8px; padding: 20px; text-align: center; margin-bottom: 28px; }
.hmr-share h3 { margin: 0 0 14px; font-size: 16px; }
.hmr-share-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.hmr-share-btns a, .hmr-share-btns button { padding: 10px 20px; border-radius: 6px; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.hmr-share-fb    { background: #1877f2; color: #fff; }
.hmr-share-pin   { background: #e60023; color: #fff; }
.hmr-share-email { background: #6c757d; color: #fff; }
.hmr-share-btns--outline a, .hmr-share-btns--outline button { background: #fff; color: #333; border: 1px solid #ccc; }
.hmr-share-btns--outline button { font-family: inherit; }

/* Pilt */
.hmr-hero-img { text-align: center; margin-bottom: 28px; }
.hmr-hero-img img { max-width: 100%; border-radius: 8px; }
.hmr-desc { font-style: italic; color: #555; margin-top: 10px; }

/* Koostisosad */
.hmr-section { margin-bottom: 36px; }
.hmr-section h2 { font-size: 1.3rem; margin-bottom: 16px; }

.hmr-servings { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 15px; }
.hmr-srv-btn { width: 32px; height: 32px; border-radius: 50%; background: #4caf50; color: #fff; border: none; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }
.hmr-srv-btn:hover { background: #388e3c; }
#hmr-srv-num { font-weight: 700; font-size: 17px; min-width: 20px; text-align: center; }

.hmr-ing-list { list-style: none; padding: 0; margin: 0; }
.hmr-ing-item { padding: 10px 0; border-bottom: 1px solid #eee; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hmr-ing-left { display: flex; align-items: baseline; gap: 5px; flex: 1; min-width: 160px; }
.hmr-ing-amount { font-weight: 700; font-size: 16px; }
.hmr-ing-unit { color: #555; }
.hmr-ing-name { }

.hmr-ing-product { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hmr-product-name { font-size: 13px; color: #444; }
.hmr-product-price { font-weight: 600; color: #222; font-size: 14px; }
.hmr-add-to-cart { background: #4caf50; color: #fff; border: none; border-radius: 20px; padding: 6px 16px; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .2s; }
.hmr-add-to-cart:hover { background: #388e3c; }
.hmr-add-to-cart.added { background: #888; }

/* Sammud */
.hmr-steps { padding-left: 0; counter-reset: steps; list-style: none; }
.hmr-steps li { counter-increment: steps; display: flex; gap: 16px; margin-bottom: 18px; font-size: 15px; line-height: 1.6; }
.hmr-steps li::before { content: counter(steps); min-width: 28px; height: 28px; background: #222; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; margin-top: 2px; }

/* Eelmine/järgmine */
.hmr-nav { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 36px; }
.hmr-nav a { text-decoration: none; color: #333; display: flex; flex-direction: column; gap: 4px; }
.hmr-nav-label { font-size: 13px; color: #888; }
.hmr-nav-title { font-size: 15px; font-weight: 600; }
.hmr-nav-next { text-align: right; }
.hmr-nav a:hover .hmr-nav-title { text-decoration: underline; }

/* Sarnased retseptid */
.hmr-similar h2 { text-align: center; margin-bottom: 20px; }

@media (max-width: 600px) {
    .hmr-title { font-size: 1.5rem; }
    .hmr-ing-item { flex-direction: column; }
    .hmr-ing-product { margin-top: 6px; }
    .hmr-nav { flex-direction: column; }
}

@media print {
    .hmr-share, .hmr-actions, .hmr-nav, .hmr-similar, header, footer { display: none !important; }
}

/* ── Retseptisoovitaja widget ────────────────────────────────── */
#hmr-suggestions-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    width: 320px;
    font-size: 14px;
    font-family: inherit;
}

/* Minimeeritud olek */
.hmr-sug-mini {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color: #333;
    font-size: 13px;
}
.hmr-sug-mini:hover { background: #f9f9f9; }
.hmr-sug-mini i { color: #4caf50; }

/* Põhibox */
.hmr-sug-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    overflow: hidden;
}

/* Header */
.hmr-sug-header {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}
.hmr-sug-header-left { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.hmr-sug-header-left i { color: #4caf50; font-size: 16px; }
.hmr-sug-toggle { background: #4caf50; color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.hmr-sug-toggle:hover { background: #388e3c; }

/* Kategooria filtrid */
.hmr-sug-cats {
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #f0f0f0;
}
.hmr-sug-cat {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    color: #444;
    transition: all .15s;
}
.hmr-sug-cat:hover, .hmr-sug-cat.active { background: #4caf50; color: #fff; border-color: #4caf50; }

/* Retseptide nimekiri */
.hmr-sug-list { max-height: 340px; overflow-y: auto; }

.hmr-sug-recipe {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.hmr-sug-recipe:last-child { border-bottom: none; }
.hmr-sug-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}
.hmr-sug-info { flex: 1; min-width: 0; }
.hmr-sug-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; line-height: 1.3; }
.hmr-sug-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.hmr-sug-tag { background: #e8f5e9; color: #2e7d32; font-size: 11px; padding: 2px 7px; border-radius: 10px; }
.hmr-sug-link { color: #4caf50; font-size: 12px; text-decoration: none; }
.hmr-sug-link:hover { text-decoration: underline; }

/* Empty state */
.hmr-sug-empty { padding: 20px 16px; text-align: center; color: #888; font-size: 13px; }

/* Footer */
.hmr-sug-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}
.hmr-sug-hide { background: none; border: none; color: #999; font-size: 12px; cursor: pointer; padding: 0; }
.hmr-sug-hide:hover { color: #333; }

/* Laadimise animatsioon */
.hmr-sug-loading { padding: 20px; text-align: center; color: #aaa; font-size: 13px; }
