/*
 * seeding.css — Таблиця норм висадки мікрозелені
 * Підключається тільки на page-seeding.php через functions.php
 */

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */

.seed-hero {
    background: var(--gradient-hero);
    padding: var(--sp-5) 0 var(--sp-6);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* grid texture */
.seed-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.seed-hero .container { position: relative; }

.seed-hero__eyebrow {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin: 0 0 .5rem;
}

.seed-hero__title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 1.25rem;
    line-height: 1.15;
}

.seed-hero__search {
    display: flex;
    justify-content: center;
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.seed-hero__search .seed-bar__input {
    max-width: 480px;
    width: 100%;
    padding: .6rem 2.5rem .6rem 1rem;
    font-size: 1rem;
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
    color: #fff;
}

.seed-hero__search .seed-bar__input::placeholder {
    color: rgba(255,255,255,.55);
}

.seed-hero__search .seed-bar__input:focus {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.6);
    box-shadow: 0 0 0 3px rgba(255,255,255,.15);
    color: #fff;
}

.seed-hero__clear {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.6);
    font-size: 1rem;
    line-height: 1;
    padding: .25rem .4rem;
    border-radius: 50%;
    transition: color .15s, background .15s;
}

.seed-hero__clear:hover {
    color: #fff;
    background: rgba(255,255,255,.15);
}


.seed-bar__input {
    width: 100%;
    padding: .45rem .45rem .45rem 2.2rem;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    font-size: .875rem;
    line-height: 1.5;
    background: #f9fafb;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none;
}

.seed-bar__input:focus {
    outline: none;
    border-color: #1F6F43;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31,111,67,.12);
}

.seed-bar__input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ══════════════════════════════════════════════════════════════
   SECTION
══════════════════════════════════════════════════════════════ */

.seed-section {
    background: #f8fafc;
    padding: var(--sp-2) 0 var(--sp-12);
    overflow-x: hidden;
}

.seed-content { position: relative; }

/* ══════════════════════════════════════════════════════════════
   TABLE
══════════════════════════════════════════════════════════════ */

.seed-table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h, 88px) - 120px);
    -webkit-overflow-scrolling: touch;
    border-radius: .75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

.seed-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: .875rem;
    color: #1f2937;
    white-space: nowrap;
}

.seed-table .col-name { width: 155px; }

/* Header row — sticky within scrollable wrapper */
.seed-table thead tr {
    background: #1a3d2a;
}

.seed-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1a3d2a;
    padding: .75rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.9);
    border-bottom: 2px solid rgba(255,255,255,.08);
    white-space: nowrap;
}

/* Body rows */
.seed-table tbody tr {
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    transition: background .12s;
}

.seed-table tbody tr:nth-child(even) {
    background: #f9fdfb;
}

.seed-table tbody tr:hover {
    background: #f0fdf4;
}

.seed-table tbody td {
    padding: .625rem 1rem;
    vertical-align: middle;
}

/* Sticky first column */
.seed-table .col-name {
    position: sticky;
    left: 0;
    z-index: 2;
}

.seed-table thead th.col-name {
    left: 0;
    z-index: 12; /* sticky top + sticky left corner */
}

.seed-table tbody td.col-name {
    background: inherit; /* inherits from row */
    min-width: 180px;
    max-width: 220px;
}

/* shadow to indicate sticky scroll */
.seed-table .col-name::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(to right, rgba(0,0,0,.06), transparent);
    pointer-events: none;
}

/* Col widths */
.seed-table .col-rate  { width: 90px;  text-align: center; }
.seed-table .col-soak  { width: 130px; text-align: center; }
.seed-table .col-press { width: 130px; text-align: center; }
.seed-table .col-baby  { width: 110px; text-align: center; }
.seed-table .col-yield { width: 100px; text-align: center; }
.seed-table .col-days  { width: 90px;  text-align: center; }

/* Culture name link */
.seed-name-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: inherit;
}

.seed-name-link:hover .seed-title {
    color: #1F6F43;
    text-decoration: underline;
}

.seed-thumb {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: .375rem;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seed-thumb img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    display: block;
}

.seed-name-text {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.seed-title {
    font-weight: 600;
    font-size: .875rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
    transition: color .15s;
}

.seed-latin {
    font-size: .7rem;
    color: #9ca3af;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.seed-flag { font-size: .875rem; flex-shrink: 0; }

/* Badges */
.seed-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .55rem;
    border-radius: .375rem;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.seed-badge--yes {
    background: #dcfce7;
    color: #166534;
}
.seed-badge--no {
    background: #fee2e2;
    color: #991b1b;
}
.seed-badge--info {
    background: #fef9c3;
    color: #854d0e;
}

.seed-badge__icon { font-size: .85rem; line-height: 1; }

.seed-badge__detail {
    font-size: .72rem;
    opacity: .85;
}

/* Rate */
.seed-rate {
    font-size: .875rem;
    color: #374151;
}

.seed-rate--baby {
    color: #374151;
}

.seed-val {
    font-size: .85rem;
    color: #374151;
}

.seed-na {
    color: #d1d5db;
    font-size: .875rem;
}

/* Short/full column labels */
.seed-th-short { display: none; }

/* Hide extra columns on mobile by default */
@media (max-width: 768px) {
    .col-extra { display: none; }

    .seed-table .col-name  { width: auto; min-width: 110px; max-width: 140px; }
    .seed-table .col-rate  { width: 72px; }
    .seed-table .col-baby  { width: 56px; }
    .seed-table .col-press { width: 52px; }
    .seed-table .col-soak  { width: auto; }

    /* Тighter cells + smaller font on mobile */
    .seed-table thead th {
        padding: .4rem .35rem;
        font-size: .62rem;
        letter-spacing: .03em;
    }
    .seed-table tbody td {
        padding: .4rem .5rem;
        font-size: .75rem;
    }

    .seed-title { font-size: .8rem; }
    .seed-rate  { font-size: .8rem; }
    .seed-val   { font-size: .8rem; }
    .seed-latin { max-width: 100px; font-size: .65rem; }

    /* Swap "Бебі-ліф" → "Бебі" */
    .seed-th-full  { display: none; }
    .seed-th-short { display: inline; }
}

/* ══════════════════════════════════════════════════════════════
   LEGEND
══════════════════════════════════════════════════════════════ */

.seed-legend__note {
    margin-top: 1rem;
    color: #6b7280;
}

.seed-legend__note strong {
    color: #374151;
}

