/* Offer service tiles use the same restrained lines and hover lift as dossier signals. */
/* Supplier and client steps share the flat metric-tile language of services. */
#offer-section-furnizor > div > .row.between:first-child,
#offer-section-client > div:first-child > .row.between:first-child {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

#offer-section-furnizor > div > .row:nth-child(2) {
  display: grid !important;
  grid-template-columns: minmax(0, 520px) max-content;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

#offer-section-client > .card:nth-child(2) {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#offer-section-furnizor > div > .row:nth-child(2),
#offer-section-client > .card:nth-child(2) > div {
  position: relative;
  min-width: 0;
  padding: 16px 18px !important;
  border: 0 !important;
  border-left: 1px solid #d3e0e9 !important;
  border-bottom: 1px solid #d3e0e9 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: transform .16s ease, box-shadow .16s ease;
}

#offer-section-furnizor > div > .row:nth-child(2)::before,
#offer-section-client > .card:nth-child(2) > div::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 18px;
  width: 4px;
  height: 48px;
  border-radius: 0 4px 4px 0;
  background: #12a89c;
  opacity: 0;
  transition: opacity .16s ease;
}

#offer-section-furnizor > div > .row:nth-child(2):is(:hover, :focus-within),
#offer-section-client > .card:nth-child(2) > div:is(:hover, :focus-within) {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, .12) !important;
}

#offer-section-furnizor > div > .row:nth-child(2):is(:hover, :focus-within)::before,
#offer-section-client > .card:nth-child(2) > div:is(:hover, :focus-within)::before {
  opacity: 1;
}

#offer-section-furnizor > div > .row:nth-child(2) > label {
  width: 100% !important;
}

#offer-section-furnizor > div > .row:nth-child(2) select,
#offer-section-client > .card:nth-child(2) input {
  border: 1px solid #d3e0e9 !important;
  border-radius: 8px !important;
}

#offer-section-client > .card:nth-child(2) > div:first-child > .row:nth-child(2) > label {
  width: auto !important;
  min-width: 0;
  flex: 1 1 300px;
}

#offer-section-furnizor > div > .row:nth-child(2) > button.btn.sm,
#offer-section-client > div:first-child > .row.between > .row > button.btn.sm,
#offer-section-client > .card:nth-child(2) > div:nth-child(2) button.btn.xs {
  min-height: 40px !important;
  padding: 0 16px !important;
  border: 1px solid #d3e0e9 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #1a2437 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  transition: background .16s ease, color .16s ease, transform .16s ease !important;
}

#offer-section-furnizor > div > .row:nth-child(2) > button.btn.sm:is(:hover, :focus-visible),
#offer-section-client > div:first-child > .row.between > .row > button.btn.sm:is(:hover, :focus-visible) {
  border-color: #12a89c !important;
  background: #12a89c !important;
  color: #fff !important;
  transform: translateY(-2px);
}

#offer-section-client > .card:nth-child(2) > div:nth-child(2) button.btn.xs:is(:hover, :focus-visible) {
  border-color: #64748b !important;
  background: #64748b !important;
  color: #fff !important;
}

@media (max-width: 1100px) {
  #offer-section-client > .card:nth-child(2) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 750px) {
  #offer-section-furnizor > div > .row:nth-child(2) {
    grid-template-columns: minmax(0, 1fr);
  }
}
#offer-section-servicii > div:nth-child(2) {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 0 !important;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div {
  position: relative;
  min-width: 0;
  padding: 14px 18px 16px;
  border-left: 1px solid #d3e0e9;
  border-bottom: 1px solid #d3e0e9;
  background: #fff;
  transition: transform .16s ease, box-shadow .16s ease;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 17px;
  width: 4px;
  height: 48px;
  border-radius: 0 4px 4px 0;
  background: #12a89c;
  opacity: 0;
  transition: opacity .16s ease;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, .12);
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div:hover::before,
#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div:focus-within::before {
  opacity: 1;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > label {
  width: 100% !important;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 select {
  width: 100%;
  height: 44px;
  border: 1px solid #d3e0e9;
  border-radius: 8px;
  background-color: #fff;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > .row {
  margin-top: 10px !important;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > .row > button.btn.xs,
#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > button.btn.xs {
  min-width: 88px;
  height: 36px !important;
  border: 1px solid #d3e0e9 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #1a2437 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  transition: background .16s ease, color .16s ease, transform .16s ease !important;
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > .row > button.btn.xs:is(:hover, :focus-visible),
#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > button.btn.xs:is(:hover, :focus-visible) {
  border-color: #12a89c !important;
  background: #12a89c !important;
  color: #fff !important;
  transform: translateY(-2px);
}

#offer-section-servicii > div:nth-child(2) > .grid.grid-2 > div > .row > button.btn.xs:nth-child(2):is(:hover, :focus-visible) {
  border-color: #64748b !important;
  background: #64748b !important;
}

@media (max-width: 900px) {
  #offer-section-servicii > div:nth-child(2) > .grid.grid-2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.offer-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.offer-category-filter--runtime {
  margin: -5px 0 14px;
}

.offer-category-filter__button {
  min-width: 66px;
  padding: 7px 12px;
  border: 1px solid #d3e0e9;
  border-radius: 9px;
  background: #fff;
  color: #1a2437;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.offer-category-filter__button:hover,
.offer-category-filter__button:focus-visible {
  border-color: #12a89c;
  background: #12a89c;
  color: #fff;
}

.offer-category-filter__button[data-category="SU"]:is(:hover, :focus-visible) { border-color: #ef2424; background: #ef2424; color: #fff; }
.offer-category-filter__button[data-category="ALTE"]:is(:hover, :focus-visible) { border-color: #234572; background: #234572; color: #fff; }
.offer-category-filter__button[data-category="TOATE"]:is(:hover, :focus-visible) { border-color: #64748b; background: #64748b; color: #fff; }

.offer-category-filter__button[aria-pressed="true"] {
  border-color: #12a89c;
  background: #12a89c;
  color: #fff;
}

.offer-category-filter__button[data-category="SU"][aria-pressed="true"] { border-color: #ef2424; background: #ef2424; }
.offer-category-filter__button[data-category="ALTE"][aria-pressed="true"] { border-color: #234572; background: #234572; }
.offer-category-filter__button[data-category="TOATE"][aria-pressed="true"] { border-color: #64748b; background: #64748b; color: #fff; }

[data-offer-service-category="SSM"] { --offer-accent: #12a89c; --offer-dark: #087e75; }
[data-offer-service-category="SU"] { --offer-accent: #ef2424; --offer-dark: #bd1b1b; }
[data-offer-service-category="ALTE"] { --offer-accent: #234572; --offer-dark: #1b3659; }

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(-n + 4) {
  width: auto !important;
  min-width: 145px;
  height: 44px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-left: 3px solid #d3e0e9 !important;
  border-bottom: 1px solid #d3e0e9 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #1a2437 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(-n + 4):hover,
.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(-n + 4):focus-visible {
  background: #f2f5f7 !important;
  border-left-color: #94a3b8 !important;
  color: #1a2437 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(15, 23, 42, .12) !important;
}

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(1):is(:hover, :focus-visible) {
  background: #12a89c !important;
  border-left-color: #12a89c !important;
  color: #fff !important;
}

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(2):is(:hover, :focus-visible) {
  background: #ef2424 !important;
  border-left-color: #ef2424 !important;
  color: #fff !important;
}

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(3):is(:hover, :focus-visible) {
  background: #234572 !important;
  border-left-color: #234572 !important;
  color: #fff !important;
}

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(4):is(:hover, :focus-visible) {
  background: #64748b !important;
  border-left-color: #64748b !important;
  color: #fff !important;
}

.card .row:has(> button.btn.sm:nth-child(4) ~ label.row) > button.btn.sm:nth-child(-n + 4):active {
  transform: translateY(0);
}

.card div:has(> div > button.service-table-row) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

.card div:has(> button.service-table-row) {
  min-width: 0;
  position: relative;
  border: 0 !important;
  border-left: 1px solid #d3e0e9 !important;
  border-bottom: 1px solid #d3e0e9 !important;
  border-radius: 0;
  overflow: visible;
  background: #fff;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.card div:has(> button.service-table-row)::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -1px;
  top: 18px;
  width: 4px;
  height: 48px;
  border-radius: 0 4px 4px 0;
  background: var(--offer-accent, #12a89c);
  opacity: 0;
  transition: opacity .16s ease;
}

.card div:has(> button.service-table-row):hover {
  z-index: 2;
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 20px 28px rgba(15, 23, 42, .18);
}

.card div:has(> button.service-table-row):hover::before,
.card div:has(> button.service-table-row + div)::before {
  opacity: 1;
}

.card div:has(> button.service-table-row + div) {
  grid-column: 1 / -1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .09);
}

/* A checkmark changes selection only; the editor opens from the rest of the tile. */
.card div:has(> button.service-table-row:not([data-offer-selection-mode]) + div):not([data-offer-editor-open="true"]) {
  grid-column: auto;
  box-shadow: none;
}

.card div:has(> button.service-table-row:not([data-offer-selection-mode]) + div):not([data-offer-editor-open="true"]) > div {
  display: none !important;
}

/* Match the active service editor to the application's primary teal button. */
.card div:has(> button.service-table-row + div) > div > .card {
  background: linear-gradient(to bottom, var(--offer-accent, #12a89c) 0 60px, #fff 60px 100%) !important;
  border-color: var(--offer-accent, #12a89c) !important;
}

.card div:has(> button.service-table-row + div) > div > .card > .row:nth-child(-n + 2) {
  color: #fff;
}

.card div:has(> button.service-table-row + div) > div > .card > .row:nth-child(2) .muted {
  color: #e8faf7 !important;
}

.card div:has(> button.service-table-row + div) > div > .card > .grid:nth-child(3) label > .muted {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
  color: #64748b !important;
}

.card div:has(> button.service-table-row + div) > div > .card > .row:first-child .tiny.muted {
  color: #475569 !important;
}

.card div:has(> button.service-table-row + div) > div > .card > .row:first-child > [draggable] {
  color: #111a2e;
}

.card button.service-table-row {
  position: relative;
  min-height: 86px !important;
  grid-template-columns: minmax(0, 1fr) 28px !important;
  grid-template-rows: auto auto auto;
  gap: 3px 10px !important;
  padding: 10px 14px !important;
  overflow: visible !important;
  border-radius: 0;
  background: transparent !important;
}

.card button.service-table-row:hover {
  transform: none !important;
  background: transparent !important;
}

.card button.service-table-row:focus-visible {
  outline: 2px solid var(--offer-accent, #12a89c);
  outline-offset: -3px;
}

.card button.service-table-row > :nth-child(1) { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
.card button.service-table-row > :nth-child(2) { grid-column: 1; grid-row: 1; }
.card button.service-table-row > :nth-child(2) > span {
  white-space: normal !important;
  overflow: visible !important;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 400 !important;
  color: #708294 !important;
}
.card button.service-table-row > :nth-child(3) { grid-column: 1; grid-row: 3; color: #95a3af; font-size: 11px; font-weight: 400; }
.card button.service-table-row > :nth-child(4) {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  align-self: start;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 500 !important;
  color: var(--offer-accent, #12a89c) !important;
}
.card div:has(> button.service-table-row):hover button.service-table-row > :nth-child(4),
.card div:has(> button.service-table-row + div) button.service-table-row > :nth-child(4) { color: var(--offer-accent, #12a89c) !important; }
.card button.service-table-row > :nth-child(5) {
  position: absolute;
  right: 14px;
  bottom: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #708293 !important;
  font-size: 11px;
  font-weight: 550 !important;
  opacity: 0;
}
.card div:has(> button.service-table-row):hover button.service-table-row > :nth-child(5),
.card div:has(> button.service-table-row + div) button.service-table-row > :nth-child(5) { color: var(--offer-dark, #087e75) !important; opacity: 1; }

@media (max-width: 1100px) {
  .card div:has(> div > button.service-table-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .card div:has(> div > button.service-table-row) { grid-template-columns: minmax(0, 1fr); }
}
