/* Painter Pro service review and add-service modal cleanup. */

/* Sentence case is the default across this workflow. */
.painting-scope-template-shell :is(label > span, legend, small, dt),
.estimate-review-step :is(small, span),
.painting-template-save-card > small {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Give the customer-facing service name the visual weight it needs. */
.painting-template-name-row label {
  display: grid;
  gap: 9px;
  color: #dce8f2;
  font-size: 15px;
  font-weight: 750;
}
.painting-template-name-row label > span {
  color: #c8d6e2;
  font-size: 15px;
}
.painting-template-name-row input[data-paint-template-field="name"] {
  min-height: 58px;
  padding: 13px 16px;
  border: 1px solid #52677a;
  border-radius: 9px;
  background: #07111a;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}
.painting-template-name-row input[data-paint-template-field="name"]:focus {
  outline: 3px solid rgba(245, 130, 22, .2);
  border-color: #f58216;
}

/* Use the same notes and work-order strip used elsewhere in Painter Pro. */
.painting-template-shared-notes {
  padding: 14px 20px;
  border-top: 1px solid #2c4252;
  border-bottom: 1px solid #2c4252;
  background: #09141d;
}
.painting-template-shared-notes .proposal-estimator-record-strip {
  margin: 0 !important;
}

/* Review is the stable page. Service setup opens over it. */
.painting-template-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 24px;
}
.painting-template-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(1, 7, 12, .82);
  backdrop-filter: blur(5px);
  cursor: default;
}
.painting-template-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #425c70;
  border-radius: 16px;
  background: #050d14;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .68);
}
.painting-template-modal-dialog > .painting-scope-template-shell {
  width: 100%;
  max-width: none;
  padding: 22px;
}

/* Cleaner review hierarchy: one compact header, one clear service list. */
.painting-shared-estimate-page .estimate-review-step {
  padding: 16px;
  border-color: #30495b;
  background: linear-gradient(180deg, #08141e 0, #061019 100%);
}
.painting-shared-estimate-page .estimate-review-step > .estimate-scope-hero {
  min-height: 0;
  padding: 16px 18px;
  border-left: 4px solid #f58216;
  border-radius: 10px;
  background: #0a1822;
}
.painting-shared-estimate-page .estimate-review-step > .estimate-scope-hero h2 {
  margin: 3px 0 4px;
  font-size: clamp(24px, 2.25vw, 34px);
  letter-spacing: -.55px;
}
.painting-shared-estimate-page .estimate-review-step > .estimate-scope-hero p {
  max-width: 720px;
  margin: 0;
  color: #b7c7d4;
}
.painting-shared-estimate-page .estimate-review-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0;
}
.painting-shared-estimate-page .estimate-review-add-actions button {
  min-height: 44px;
  padding: 0 18px;
}
.painting-shared-estimate-page .estimate-review-services {
  gap: 12px;
  margin: 0 0 14px;
}
.painting-shared-estimate-page .estimate-review-service {
  border-color: #365064;
  border-radius: 12px;
  background: #091720;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
}
.painting-shared-estimate-page .estimate-review-service.optional {
  border-color: #c43eb2;
  background: linear-gradient(90deg, rgba(196, 62, 178, .10), #091720 36%);
}
.painting-shared-estimate-page .estimate-review-service summary {
  min-height: 72px;
  padding: 12px 16px;
}
.painting-shared-estimate-page .estimate-review-service summary small {
  color: #74e2a6;
  font-size: 13px;
}
.painting-shared-estimate-page .estimate-review-service.optional summary small {
  color: #f58adf;
}
.painting-shared-estimate-page .estimate-review-service ul {
  padding: 0 16px;
  background: #07131c;
}
.painting-shared-estimate-page .estimate-review-service li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
  align-items: start;
  gap: 18px;
  min-height: 0;
  padding: 11px 0;
}
.painting-shared-estimate-page .estimate-review-service li > span {
  min-width: 0;
  color: #d3dee7;
  line-height: 1.45;
}
.painting-shared-estimate-page .estimate-review-service li > strong {
  max-width: 210px;
  color: #fff;
  text-align: right;
  overflow-wrap: anywhere;
}
.painting-shared-estimate-page .estimate-review-service footer {
  gap: 9px;
  padding: 10px 14px 12px;
}
.painting-shared-estimate-page .estimate-review-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
}

@media (max-width: 760px) {
  .painting-template-modal { padding: 0; }
  .painting-template-modal-dialog {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .painting-template-modal-dialog > .painting-scope-template-shell { padding: 12px 8px 28px; }
  .painting-template-shared-notes { padding: 10px; }
  .painting-shared-estimate-page .estimate-review-step { padding: 10px; }
  .painting-shared-estimate-page .estimate-review-add-actions { display: grid; grid-template-columns: 1fr; }
  .painting-shared-estimate-page .estimate-review-service summary {
    grid-template-columns: 38px minmax(0, 1fr) auto 18px;
    gap: 9px;
    padding: 10px;
  }
  .painting-shared-estimate-page .estimate-review-service summary strong { font-size: 15px; }
  .painting-shared-estimate-page .estimate-review-service summary > b { font-size: 16px; }
  .painting-shared-estimate-page .estimate-review-service li { grid-template-columns: 1fr; gap: 6px; }
  .painting-shared-estimate-page .estimate-review-service li > strong { max-width: none; text-align: left; }
  .painting-shared-estimate-page .estimate-review-totals { grid-template-columns: 1fr; }
}
