/* Lucrări and Cadouri. Owned by plan 5. Layout only: every look comes from
   components.css. */

/* List page */
.lc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lc-bar-r { display: flex; align-items: center; gap: 10px; }
.lc-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 16px; padding-top: 20px; }

.lrows { padding: 8px 0; }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) 130px 70px 120px 120px; align-items: center; gap: 16px; padding: 10px 20px; }
.lrows--nostare .lrow { grid-template-columns: minmax(0, 1fr) 70px 120px 120px; }
.lrow + .lrow { border-top: 1px solid var(--line-soft); }
.lrow--h { color: var(--muted); font-size: 12px; font-weight: 500; padding-top: 6px; padding-bottom: 8px; }
.lrow--h > span:first-child { display: none; }
.lrow--h > span:nth-child(2) { padding-left: 80px; }
.lrow-link { display: flex; align-items: center; gap: 16px; min-width: 0; }
.lrow-link:hover b { color: var(--accent); }
.lrow-img { flex: none; display: grid; place-items: center; width: 64px; height: 52px; border-radius: 10px; background: var(--canvas); }
.lrow-img img { max-width: 56px; max-height: 44px; object-fit: contain; }
.lrow-main { min-width: 0; }
.lrow-main b { display: block; font-weight: 500; }
.lrow-main span { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mut { color: var(--muted); }

/* Edit / new page: two columns (mockup 27) */
.lc-ph { align-items: center; }
.crumb { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.crumb a:hover { color: var(--accent); }
.crumb b { color: var(--fg); font-weight: 500; }
.lc-actions { display: flex; align-items: center; gap: 10px; }
.lc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.lc-main > .pnl, .lc-side > .pnl { margin-bottom: 16px; }
.lc-fgrid { gap: 0 14px; }
.lc-fgrid .fld, .lc-desc { margin-bottom: 0; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; }

.lc-addr { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.lc-addr b { color: var(--fg); font-weight: 500; }
.lc-addr .lnk { font-size: 12.5px; }
.lc-addr label { color: var(--muted); }
.lc-slug { flex: 1; min-width: 180px; min-height: 34px; font-size: 13px; }

.lc-pub-wrap { padding-top: 18px; }
.lc-pub { padding: 12px 14px; border-radius: 12px; background: var(--canvas); }
.lc-pub .onsite { display: flex; flex-direction: row-reverse; justify-content: space-between; width: 100%; color: var(--fg); font-size: 13.5px; font-weight: 500; }
.lc-note { margin-top: 10px; color: var(--warn); font-size: 12.5px; }

.lc-more { display: grid; gap: 14px; padding-top: 18px; }
.lc-see { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.lc-del { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--danger); font-weight: 500; font-size: 13px; }
.lc-ask { padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); }
.lc-ask p { color: var(--danger); font-weight: 500; margin-bottom: 10px; }
.lc-ask-b { display: flex; gap: 8px; }
.lc-ask .pill.danger { background: var(--danger); color: #fff; }
.lc-ask .pill.soft { background: #fff; }
.lc-ask .pill.soft:not(:disabled):hover { background: #f7f7fa; }

/* Photos (PhotoGrid) */
.phs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.ph-tile { position: relative; display: grid; place-items: center; height: 128px; padding: 10px; border-radius: 14px; background: var(--canvas); cursor: grab; }
.ph-tile img { max-width: 100%; max-height: 108px; object-fit: contain; pointer-events: none; }
.ph-tile .tag { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: var(--r-pill); background: #fff; font-size: 11px; font-weight: 600; }
.ph-tile .del { position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--muted); }
.ph-tile .del:hover { color: var(--danger); }
.ph-tile .del svg.ico { width: 14px; height: 14px; }
.ph-tile--drag { opacity: .4; }
.ph-tile--over { background: var(--accent-soft); }
.ph-add { display: grid; place-items: center; height: 128px; border: 0; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 500; text-align: center; }
.ph-add svg.ico { display: block; width: 20px; height: 20px; margin: 0 auto 6px; }
.ph-add small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.ph-add--on, .lc-drop--on { background: #e2e5f8; }
.ph-add { transition: background-color .12s ease; }
.ph-add:hover { background: #e2e5f8; }
@media (prefers-reduced-motion: reduce) { .ph-add { transition: none; } }
.lc-drop { display: block; width: 100%; padding: 34px 20px; border: 0; border-radius: 16px; background: var(--accent-soft); color: var(--accent); text-align: center; }
.lc-drop svg.ico { display: block; width: 26px; height: 26px; margin: 0 auto 10px; }
.lc-drop b { display: block; font-weight: 600; font-size: 14.5px; }
.lc-drop span { color: var(--muted); font-size: 12.5px; }

/* RichText */
.rt { position: relative; }
.rt-bar { display: flex; gap: 4px; margin-bottom: 6px; }
.rt-b { display: grid; place-items: center; min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--canvas); color: var(--fg); font-size: 13px; }
.rt-b[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.rt-b svg.ico { width: 15px; height: 15px; }
.rt-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.rt-link .fi { flex: 1; min-width: 200px; min-height: 34px; font-size: 13px; }
.rt-link .ferr { width: 100%; margin-top: 0; }
.rt-ed { position: relative; min-height: 110px; padding: 12px 14px; line-height: 1.55; overflow-wrap: anywhere; }
.rt-ed p { margin: 0 0 .7em; }
.rt-ed p:last-child { margin-bottom: 0; }
.rt-ed a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rt--empty .rt-ed::before { content: attr(data-placeholder); position: absolute; left: 14px; top: 12px; right: 14px; color: var(--faint); pointer-events: none; }

/* Phone and upright tablet (decision 24): one column; Publicat and Stare
   first, then the photos and the texts, Vezi pe site / Șterge last;
   Anulează / Salvează in the bottom bar; the top bar leads back. */
@media (max-width: 899.98px) {
  .lc-ph .crumb { display: none; }
  .lc-cols { display: flex; flex-direction: column; align-items: stretch; }
  .lc-main, .lc-side { display: contents; }
  .lc-pub-pnl { order: -2; }
  .lc-stare-pnl { order: -1; }
  .lc-more-pnl { order: 1; }
  .lrow { grid-template-columns: minmax(0, 1fr) auto; }
  .lrow > span:not(:last-child), .lrow--h { display: none; }
  .lc-bar-r { width: 100%; justify-content: space-between; }
}
@media (max-width: 599.98px) {
  .lc-grid { grid-template-columns: 1fr 1fr; gap: 16px 10px; padding: 14px 12px 12px; }
  .lc-grid .icard-img { height: 120px; }
  .lc-grid .icard-img img { max-height: 104px; }
  .lc-grid .icard-t { font-size: 13.5px; margin-top: 8px; }
  .lc-grid .icard-f { flex-direction: column; align-items: flex-start; gap: 6px; }
  .lc-grid .icard-a { margin-left: 0; }
  .lc-bar > .lc-q:first-child .seg { max-width: 100%; overflow-x: auto; overscroll-behavior: none; }
  .lc-ordering.lc-grid .icard-f { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Aranjează ordinea (decision 34, reference 75-reorder-a): the same list
   stays; what she cannot use goes quiet; the extras lie on the picture, so
   nothing around them moves. */
.lc-q { display: inline-flex; max-width: 100%; }
.quiet { opacity: .4; pointer-events: none; transition: opacity .18s ease; }
/* The phone bottom bar is fixed on a white ground: only its buttons fade,
   the page must not show through the bar. */
.pbar.quiet { opacity: 1; }
.pbar.quiet > * { opacity: .4; transition: opacity .18s ease; }
.lc-ordbtns { display: inline-flex; gap: 8px; }
.lc-ordering { position: relative; }
.pnl:has(> .lc-ordering) { overflow: visible; } /* the lifted work is never cut at the panel edge */
.lc-ordering > [data-id] { position: relative; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.lc-ordering img { pointer-events: none; -webkit-user-drag: none; }
.lc-ordering .st, .lc-ordering .onsite { opacity: .4; pointer-events: none; }
.lc-ordering .tg:disabled { opacity: 1; }
.grip { position: absolute; z-index: 1; left: 6px; top: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(255, 255, 255, .94); color: var(--muted); pointer-events: none; animation: grip-in .18s ease; }
.grip svg.ico { width: 16px; height: 16px; }
.lrow-img { position: relative; }
.lrow-img .grip { left: 3px; top: 50%; width: 22px; height: 22px; margin-top: -11px; }
.lrow-img .grip svg.ico { width: 14px; height: 14px; }
@keyframes grip-in { from { opacity: 0; transform: scale(.85); } }
/* the lifted work: a white 10px margin all round (a spread shadow, so nothing
   in the layout moves) and a soft lift */
.lc-ordering > .lifted { cursor: grabbing; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 10px #fff, 0 0 0 11px rgba(15, 23, 42, .05), 0 22px 36px -14px rgba(15, 23, 42, .32); }
.lc-ordering > .lrow.lifted + .lrow, .lc-ordering > .lrow.lifted { border-top-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .quiet { transition: none; }
  .grip { animation: none; }
}
.phs-list { display: contents; margin: 0; padding: 0; list-style: none; }
