/**
 * Yeni sipariş — servis açıklaması müşteri görünümü (#service_description).
 * Kompakt dikey ritim, inline URL / liste, tema uyumlu kontrast.
 */

.ms-dash-modern #neworder_fields .panel-body.ms-svc-desc-host,
#neworder_fields .panel-body.ms-svc-desc-host {
  padding: clamp(10px, 2vw, 16px) clamp(12px, 2.4vw, 16px);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.ms-svc-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #273250;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    'Noto Color Emoji',
    sans-serif;
}

body.dark .ms-svc-desc,
html.theme-dark .ms-svc-desc {
  color: #e3eaf7;
}

/* Grid: daha sıkı satır aralığı */
.ms-svc-desc__grid {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vw, 9px);
  margin: 0;
  padding: 0;
}

.ms-svc-desc__row {
  display: grid;
  grid-template-columns: minmax(min(118px, 32vw), 150px) minmax(0, 1fr);
  gap: 0.2rem clamp(10px, 2vw, 16px);
  align-items: start;
  padding: 0;
  margin: 0;
}

.ms-svc-desc__lbl {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(39, 50, 80, 0.72);
  line-height: 1.35;
  word-break: break-word;
}

body.dark .ms-svc-desc__lbl,
html.theme-dark .ms-svc-desc__lbl {
  color: rgba(226, 234, 250, 0.55);
}

.ms-svc-desc__val {
  display: block;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 580;
  line-height: 1.42;
  color: #141c2e;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.dark .ms-svc-desc__val,
html.theme-dark .ms-svc-desc__val {
  color: #f2f6ff;
}

/* Prose — satır sonları yalnızca <br> ile (pre-line yok → çift boşluk yok) */
.ms-svc-desc__prose {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(0, 97, 242, 0.08);
  font-size: 0.885rem;
  font-weight: 480;
  line-height: 1.52;
  color: #2a3754;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ms-svc-desc__prose--only {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

body.dark .ms-svc-desc__prose,
html.theme-dark .ms-svc-desc__prose {
  border-top-color: rgba(110, 167, 255, 0.12);
  color: #e3eaf7;
}

.ms-svc-desc__fallback {
  font-size: 0.895rem;
  font-weight: 480;
  line-height: 1.52;
  color: #2a3754;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.dark .ms-svc-desc__fallback,
html.theme-dark .ms-svc-desc__fallback {
  color: #e6edf9;
}

/* ── Sağlayıcı/admin HTML açıklamaları (rich) için sanitize edilmiş çıktı ── */
.ms-svc-desc__rich {
  font-size: 0.9rem;
  font-weight: 480;
  line-height: 1.55;
  color: #273250;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.dark .ms-svc-desc__rich,
html.theme-dark .ms-svc-desc__rich {
  color: #e3eaf7;
}

.ms-svc-desc__rich > :first-child {
  margin-top: 0;
}

.ms-svc-desc__rich > :last-child {
  margin-bottom: 0;
}

.ms-svc-desc__rich p {
  margin: 0 0 0.55em;
  line-height: 1.55;
}

.ms-svc-desc__rich h2,
.ms-svc-desc__rich h3,
.ms-svc-desc__rich h4,
.ms-svc-desc__rich h5,
.ms-svc-desc__rich h6 {
  margin: 0.85em 0 0.4em;
  font-weight: 700;
  line-height: 1.3;
  color: #1c2542;
}

body.dark .ms-svc-desc__rich h2,
body.dark .ms-svc-desc__rich h3,
body.dark .ms-svc-desc__rich h4,
body.dark .ms-svc-desc__rich h5,
body.dark .ms-svc-desc__rich h6,
html.theme-dark .ms-svc-desc__rich h2,
html.theme-dark .ms-svc-desc__rich h3,
html.theme-dark .ms-svc-desc__rich h4,
html.theme-dark .ms-svc-desc__rich h5,
html.theme-dark .ms-svc-desc__rich h6 {
  color: #f0f5ff;
}

.ms-svc-desc__rich h2 {
  font-size: 1.08rem;
}

.ms-svc-desc__rich h3 {
  font-size: 1rem;
}

.ms-svc-desc__rich h4,
.ms-svc-desc__rich h5,
.ms-svc-desc__rich h6 {
  font-size: 0.95rem;
}

.ms-svc-desc__rich ul,
.ms-svc-desc__rich ol {
  margin: 0 0 0.55em;
  padding-left: 1.2em;
}

.ms-svc-desc__rich ul {
  list-style: disc;
}

.ms-svc-desc__rich ol {
  list-style: decimal;
}

.ms-svc-desc__rich li {
  margin: 0.18em 0;
  line-height: 1.5;
}

.ms-svc-desc__rich li::marker {
  color: rgba(39, 50, 80, 0.55);
}

body.dark .ms-svc-desc__rich li::marker,
html.theme-dark .ms-svc-desc__rich li::marker {
  color: rgba(210, 220, 240, 0.55);
}

.ms-svc-desc__rich strong,
.ms-svc-desc__rich b {
  font-weight: 700;
  color: #141c2e;
}

body.dark .ms-svc-desc__rich strong,
body.dark .ms-svc-desc__rich b,
html.theme-dark .ms-svc-desc__rich strong,
html.theme-dark .ms-svc-desc__rich b {
  color: #ffffff;
}

.ms-svc-desc__rich em,
.ms-svc-desc__rich i {
  font-style: italic;
}

.ms-svc-desc__rich u {
  text-decoration: underline;
}

.ms-svc-desc__rich s,
.ms-svc-desc__rich strike,
.ms-svc-desc__rich del {
  text-decoration: line-through;
  opacity: 0.85;
}

.ms-svc-desc__rich blockquote {
  margin: 0.4em 0 0.6em;
  padding: 0.4em 0.85em;
  border-left: 3px solid rgba(0, 97, 242, 0.28);
  background: rgba(0, 97, 242, 0.05);
  color: #2a3754;
  border-radius: 0 6px 6px 0;
}

body.dark .ms-svc-desc__rich blockquote,
html.theme-dark .ms-svc-desc__rich blockquote {
  border-left-color: rgba(110, 167, 255, 0.4);
  background: rgba(110, 167, 255, 0.07);
  color: #e3eaf7;
}

.ms-svc-desc__rich a {
  color: #0b5bd3;
  font-weight: 550;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ms-svc-desc__rich a:visited {
  color: #0846a8;
}

body.dark .ms-svc-desc__rich a,
html.theme-dark .ms-svc-desc__rich a {
  color: #9ec0ff;
}

body.dark .ms-svc-desc__rich a:visited,
html.theme-dark .ms-svc-desc__rich a:visited {
  color: #7aa6f5;
}

.ms-svc-desc__rich hr {
  margin: 0.7em 0;
  border: 0;
  border-top: 1px solid rgba(0, 97, 242, 0.15);
}

body.dark .ms-svc-desc__rich hr,
html.theme-dark .ms-svc-desc__rich hr {
  border-top-color: rgba(110, 167, 255, 0.2);
}

.ms-svc-desc__rich pre,
.ms-svc-desc__rich code {
  font-family: 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.86em;
  background: rgba(0, 97, 242, 0.06);
  color: #1d2740;
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.ms-svc-desc__rich pre {
  display: block;
  padding: 0.55em 0.75em;
  margin: 0 0 0.55em;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

body.dark .ms-svc-desc__rich pre,
body.dark .ms-svc-desc__rich code,
html.theme-dark .ms-svc-desc__rich pre,
html.theme-dark .ms-svc-desc__rich code {
  background: rgba(110, 167, 255, 0.12);
  color: #e9efff;
}

.ms-svc-desc__rich table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.55em;
  font-size: 0.87em;
}

.ms-svc-desc__rich th,
.ms-svc-desc__rich td {
  border: 1px solid rgba(0, 97, 242, 0.14);
  padding: 0.32em 0.55em;
  vertical-align: top;
  text-align: left;
}

.ms-svc-desc__rich th {
  background: rgba(0, 97, 242, 0.06);
  font-weight: 650;
}

body.dark .ms-svc-desc__rich th,
html.theme-dark .ms-svc-desc__rich th {
  background: rgba(110, 167, 255, 0.1);
}

body.dark .ms-svc-desc__rich th,
body.dark .ms-svc-desc__rich td,
html.theme-dark .ms-svc-desc__rich th,
html.theme-dark .ms-svc-desc__rich td {
  border-color: rgba(110, 167, 255, 0.22);
}

/* Link: inline, taşma kontrollü */
.ms-svc-desc__link {
  display: inline;
  color: #0b5bd3;
  font-weight: 550;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ms-svc-desc__link:visited {
  color: #0846a8;
}

body.dark .ms-svc-desc__link,
html.theme-dark .ms-svc-desc__link {
  color: #9ec0ff;
}

body.dark .ms-svc-desc__link:visited,
html.theme-dark .ms-svc-desc__link:visited {
  color: #7aa6f5;
}

/* Kompakt liste */
.ms-svc-desc__list {
  margin: 0.28em 0;
  padding: 0 0 0 1.05em;
  list-style: disc;
}

.ms-svc-desc__list:first-child {
  margin-top: 0;
}

.ms-svc-desc__list:last-child {
  margin-bottom: 0;
}

.ms-svc-desc__list li {
  margin: 0.1em 0;
  padding: 0;
  line-height: 1.42;
}

.ms-svc-desc__list li::marker {
  color: rgba(39, 50, 80, 0.45);
}

body.dark .ms-svc-desc__list li::marker,
html.theme-dark .ms-svc-desc__list li::marker {
  color: rgba(210, 220, 240, 0.45);
}

/* Liste öncesi/sonrası gereksiz <br> boşluğunu sıkıştır */
.ms-svc-desc__prose br + .ms-svc-desc__list,
.ms-svc-desc__fallback br + .ms-svc-desc__list {
  margin-top: 0.12em;
}

.ms-svc-desc__list + br {
  line-height: 0;
}

/* ── Sağlayıcı "Notlar:" bölümü (modal + yeni sipariş ortak HTML) ── */
.ms-svc-desc__notes {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(0, 97, 242, 0.16);
}

body.dark .ms-svc-desc__notes,
html.theme-dark .ms-svc-desc__notes {
  border-top-color: rgba(110, 167, 255, 0.2);
}

.ms-svc-desc__notes-head {
  font-size: 0.685rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(39, 50, 80, 0.58);
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

body.dark .ms-svc-desc__notes-head,
html.theme-dark .ms-svc-desc__notes-head {
  color: rgba(226, 234, 250, 0.58);
}

.ms-svc-desc__notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ms-svc-desc__notes-li {
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 480;
  line-height: 1.5;
  color: inherit;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ms-svc-desc__notes-li br {
  line-height: inherit;
}

@media (max-width: 575.98px) {
  .ms-dash-modern #neworder_fields .panel-body.ms-svc-desc-host,
  #neworder_fields .panel-body.ms-svc-desc-host {
    padding: 9px 11px;
  }

  .ms-svc-desc {
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .ms-svc-desc__prose,
  .ms-svc-desc__fallback {
    line-height: 1.4;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  .ms-svc-desc__prose--only {
    margin-top: 0;
    padding-top: 0;
  }

  .ms-svc-desc__grid {
    gap: 5px;
  }

  .ms-svc-desc__row {
    grid-template-columns: minmax(min(96px, 30vw), 132px) minmax(0, 1fr);
    gap: 0.18rem 10px;
  }

  .ms-svc-desc__lbl {
    font-size: 0.8rem;
  }

  .ms-svc-desc__list {
    margin: 0.22em 0;
    padding-left: 0.95em;
  }

  .ms-svc-desc__rich {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .ms-svc-desc__rich ul,
  .ms-svc-desc__rich ol {
    padding-left: 1.05em;
  }
}

@media (max-width: 360px) {
  .ms-svc-desc__row {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }
}
