/* Artman Vrt Pro v1.10.15 — library visibility, readable labels, explicit cancel,
   unified manual/guided relationship controls. */

/* Explicit cancellation in the quantity Add dialog. */
.av1105-add-card{padding-top:22px}
.av1105-dialog-x{position:absolute;right:13px;top:12px;width:34px;height:34px;border:0;border-radius:50%;background:#eef3ec;color:#465c49;font:800 1.25rem/1 system-ui;cursor:pointer;display:grid;place-items:center;z-index:2}
.av1105-dialog-x:hover{background:#e1ebde}
.av1105-actions{grid-template-columns:minmax(120px,1fr) minmax(150px,1.35fr) minmax(96px,.72fr)!important}
.av1105-cancel{border-color:#d6ddd3!important;background:#f7f8f6!important;color:#526354!important}
.av1105-cancel:hover{background:#ecefeb!important}
@media(max-width:700px){.av1105-actions{grid-template-columns:1fr!important}.av1105-close{display:none!important}}

/* The manual library was being flex-shrunk into 40–50 px grid rows. Each card
   now owns its natural height and the modal scrolls vertically. */
.av11014-library-shell{height:min(860px,92vh);min-height:min(650px,92vh)}
.av11014-library-grid{flex:1 1 auto!important;min-height:0!important;grid-auto-rows:max-content!important;align-items:start!important;align-content:start!important;overflow-y:auto!important;overflow-x:hidden!important}
.av11014-library-grid .av11014-card{height:auto!important;min-height:252px!important;align-self:start!important;grid-template-rows:96px auto auto 1fr auto!important;overflow:hidden!important}
.av11014-card-visual{min-height:96px!important;padding:8px!important}
.av11014-card-title{display:block!important;min-height:28px;font-size:.94rem;line-height:1.22;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important}
.av11014-card-meta{align-content:start;min-height:43px}
.av11014-card-actions{align-self:end}

/* Manual library uses the same visual hierarchy as Guided mode. */
.av11014-library-tools{align-items:center}
.av11014-library-tools .btn-primary{min-height:44px;white-space:nowrap}
.av11015-library-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid #e1eadf;background:#fbfdf9}
.av11015-relations-toggle{border:1px solid #b9cfb4;border-radius:999px;background:#fff;color:#365f3c;padding:7px 11px;font:780 .76rem/1.1 system-ui;cursor:pointer}
.av11015-relations-toggle[aria-pressed="true"]{background:#4f8450;border-color:#4f8450;color:#fff}
.av11015-relation-legend{display:none;flex:1 1 100%;gap:12px;flex-wrap:wrap;padding:8px 10px;border:1px solid #d8e5d4;border-radius:10px;background:#fff;color:#5b6d5d;font-size:.72rem;line-height:1.35}
.av11015-relation-legend.show{display:flex}
.av11015-relation-legend span{display:inline-flex;align-items:center;gap:5px}
.av11015-legend-dot{width:11px;height:11px;border-radius:50%;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 1px currentColor}
.av11015-legend-dot.good{color:#4e8b50;background:#4e8b50}.av11015-legend-dot.warn{color:#d08a27;background:#d08a27}.av11015-legend-dot.bad{color:#c3423c;background:#c3423c}

/* Contextual relationship state in both libraries. Orange is a potential
   companion-planting concern; red remains reserved for an actual spatial
   conflict in the graphical plan. */
.av11014-card.av11015-relation-good,.av11014-guided-item.av11015-relation-good{border-color:#77a973!important;box-shadow:0 0 0 2px #e1efdd,0 6px 18px rgba(38,95,42,.11)!important}
.av11014-card.av11015-relation-warn,.av11014-guided-item.av11015-relation-warn{border-color:#d5a04d!important;box-shadow:0 0 0 2px #fff0d3,0 6px 18px rgba(134,89,22,.11)!important}
.av11015-relation-badge{position:absolute;left:8px;top:8px;z-index:3;display:inline-flex;align-items:center;gap:4px;max-width:calc(100% - 48px);padding:4px 7px;border-radius:999px;border:1px solid currentColor;background:#fff;font-size:.61rem;font-weight:850;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.av11015-relation-badge.good{color:#37733c}.av11015-relation-badge.warn{color:#8a5c16;background:#fff9eb}
body.av1102-relations-off .av11015-relation-badge{display:none!important}
body.av1102-relations-off .av11014-card.av11015-relation-good,body.av1102-relations-off .av11014-card.av11015-relation-warn,body.av1102-relations-off .av11014-guided-item.av11015-relation-good,body.av1102-relations-off .av11014-guided-item.av11015-relation-warn{border-color:#d7e4d3!important;box-shadow:0 5px 15px rgba(34,65,38,.09)!important}

/* Avoid splitting names such as Carrot / Chicory in the middle of a word. */
.av1102-name,.av11014-guided-title,.av171-crop-name{word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important}
.av171-crop-list.av1103-guided-library .av171-crop-top{grid-template-columns:auto auto minmax(74px,1fr)!important;grid-template-rows:auto auto;column-gap:7px!important;row-gap:3px!important;padding-right:34px!important}
.av171-crop-list.av1103-guided-library .av171-crop-name{grid-column:3;grid-row:1;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.18!important}
.av171-crop-list.av1103-guided-library .av171-crop-top .av188-badge{grid-column:3;grid-row:2;justify-self:start!important;margin:0!important;max-width:100%;font-size:.66rem}
.av171-crop-list.av1103-guided-library .av171-crop-top input{grid-column:1;grid-row:1/3}.av171-crop-list.av1103-guided-library .av171-crop-top .av171-dot{grid-column:2;grid-row:1/3}

/* Relationship control and legend inside the merged Guided library. */
.av11014-guided-controls .av11015-relations-toggle{margin-left:auto}
.av11014-guided-library .av11015-relation-legend{margin:0 10px 9px;width:calc(100% - 20px);box-sizing:border-box}

@media(max-width:980px){.av11014-library-shell{height:94vh;max-height:94vh}.av11014-library-grid .av11014-card{min-height:248px!important}}
@media(max-width:720px){.av11014-library-shell{height:100vh;min-height:100vh}.av11014-library-grid .av11014-card{min-height:242px!important}.av11015-library-actions{padding:8px 10px}.av11015-relations-toggle{width:100%}}
