/* Shared My Direct product system; native curtain fields keep their own rules. */
body.mdb-specialty-curtain .mdb-product-media-proof a.mdb-text-link {
  display: inline-block; margin-top: 6px; border: 0; box-shadow: none;
  color: var(--mdb-navy, #444e60); text-decoration: none;
}
body.mdb-specialty-curtain .mdb-product-media-proof a.mdb-text-link:is(:hover, :focus-visible) {
  color: #277f84; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}

/* Preserve native order and visibility. Only measurement fields share a row. */
body.mdb-specialty-curtain .product #uni_cpo_options .uni-col-content:has(> .mdb-curtain-option) {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px; align-items: start;
}
body.mdb-specialty-curtain .product #uni_cpo_options .uni-col-content:has(> .mdb-curtain-option)::before,
body.mdb-specialty-curtain .product #uni_cpo_options .uni-col-content:has(> .mdb-curtain-option)::after { display: none; }
body.mdb-specialty-curtain .product #uni_cpo_options .uni-col-content > * { grid-column: 1 / -1; min-width: 0; }
body.mdb-specialty-curtain .product #uni_cpo_options .uni-col-content > .mdb-curtain-measure { grid-column: auto; }
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-measure input {
  padding-inline: 14px; width: 100%; min-width: 0; box-sizing: border-box;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-measure > .uni-cpo-module-text_input-label::before {
  content: ""; display: inline-block; width: 16px; height: 16px;
  margin-right: .35rem; vertical-align: -.16rem;
  background: center / contain no-repeat;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-width > .uni-cpo-module-text_input-label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23277F84' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h18M7 8l-4 4 4 4m10-8 4 4-4 4'/%3E%3C/svg%3E");
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-drop > .uni-cpo-module-text_input-label::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23277F84' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M8 7l4-4 4 4M8 17l4 4 4-4'/%3E%3C/svg%3E");
}

/* Equal choice cards; a growing caption never crops the drawing or its label. */
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option.uni-module-radio-image-mode {
  display: flex; flex-wrap: wrap; flex-direction: row; gap: 12px;
  align-items: stretch; align-content: start;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option.uni-module-radio-image-mode > :is(.uni-cpo-module-radio-label, .uni-cpo-module-radio-description, .parsley-errors-list) {
  flex-basis: 100%; width: 100%; margin: 0;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option > label:not(.uni-cpo-option-label) {
  color: var(--mdb-ink) !important; font-family: inherit !important;
  font-size: 1rem !important; font-weight: 750 !important;
  line-height: 1.35; text-align: left !important;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option.uni-module-radio-image-mode > .uni-cpo-option-label {
  width: calc((100% - 24px) / 3); max-width: none; height: auto; margin: 0; padding: 0;
  min-width: 0; box-sizing: border-box; align-self: stretch;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-photo-choice.uni-module-radio-image-mode > .uni-cpo-option-label {
  width: calc((100% - 12px) / 2);
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option .uni-cpo-option-label__image-wrap {
  width: 100% !important; height: auto !important; min-height: 100%;
  display: flex; flex-direction: column; padding: 0 !important;
  background: #fff; background-image: none !important;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option .uni-cpo-option-label__image-wrap img {
  width: 100% !important; height: 136px !important; max-width: 100% !important; max-height: none !important;
  flex: 0 0 auto; box-sizing: border-box; object-fit: contain !important;
  aspect-ratio: auto !important; padding: 8px; margin: 0 !important; background: #fff;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-photo-choice .uni-cpo-option-label__image-wrap img {
  height: 180px !important; padding: 0; object-fit: cover !important;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-range .uni-cpo-option-label__image-wrap img {
  height: 120px !important; padding: 0; object-fit: cover !important;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-swatch.uni-module-radio-image-mode > .uni-cpo-option-label {
  width: calc((100% - 48px) / 5);
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-swatch .uni-cpo-option-label__image-wrap img {
  height: auto !important; aspect-ratio: 1 !important; padding: 0; object-fit: cover !important;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option .uni-cpo-option-label__image-wrap::after {
  position: static; flex: 1 0 auto; width: 100%; box-sizing: border-box;
  min-height: 44px; padding: 10px 6px; white-space: normal; overflow-wrap: anywhere;
  font-size: 13px; line-height: 1.4; background: transparent;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option .uni-cpo-option-label__description {
  display: block; padding: 0 10px 12px; color: var(--mdb-muted);
  font-size: 12px; line-height: 1.45; text-align: center;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option .uni-cpo-module-radio-label,
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option .uni-cpo-module-text_input-label {
  line-height: 1.45; margin-bottom: 10px;
}
body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-option.uni-module-radio-image-mode > .uni-cpo-module-radio-label { margin-bottom: 0; }

/* Keep geometry instructions and full-size measuring drawings readable. */
body.mdb-specialty-curtain .product #uni_cpo_options .uni-module-dynamic_notice img {
  display: block; max-width: 100%; height: auto; margin: 16px auto;
}
body.mdb-specialty-curtain .product #uni_cpo_options .uni-module-dynamic_notice :is(h3,h4,p) { line-height: 1.55; }
body.mdb-specialty-curtain .product #uni_cpo_options .uni-module-dynamic_notice :is(h3,h4) { margin: 0 0 12px; }

/* The price and protection themselves use native-cpo.css, exactly like roller. */
body.mdb-specialty-curtain .mdb-curtain-purchase { flex: 0 0 100%; width: 100%; min-width: 0; }
body.mdb-specialty-curtain .mdb-curtain-purchase .price { margin: 0; font-size: inherit; line-height: inherit; color: inherit; }
body.mdb-specialty-curtain .mdb-buy-row { margin-bottom: 12px; }

/* Same dialog frame as roller help, with space between the sourced paragraphs. */
.mdb-curtain-guide .mdb-guide-heading h2 { margin: 0; padding-right: 40px; }
.mdb-curtain-guide .mdb-guide-section :is(p,ul,ol,table) { margin-block: 0 16px; }
.mdb-curtain-guide .mdb-guide-section :is(h3,h4) { margin-block: 24px 12px; }
.mdb-curtain-guide .mdb-guide-section > :first-child { margin-top: 0; }
.mdb-curtain-guide .mdb-guide-section img { display: block; max-width: 100%; max-height: 380px; width: auto; height: auto; object-fit: contain; margin: 20px auto; }
.mdb-curtain-guide .mdb-guide-section table { width: 100%; border-collapse: collapse; }
.mdb-curtain-guide .mdb-guide-section :is(th,td) { padding: 10px; border-bottom: 1px solid #d9e1df; text-align: left; }
.mdb-curtain-guide .mdb-guide-section a { color: #277f84; text-decoration: underline; text-underline-offset: 3px; }
.mdb-curtain-guide .mdb-guide-section a:is(:hover,:focus-visible) { color: #444e60; }

@media (max-width: 580px) {
  body.mdb-specialty-curtain .product #uni_cpo_options .uni-col-content:has(> .mdb-curtain-option) { grid-template-columns: minmax(0, 1fr); column-gap: 12px; }
  body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-choice.uni-module-radio-image-mode > .uni-cpo-option-label { width: calc((100% - 12px) / 2); }
  body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-swatch.uni-module-radio-image-mode > .uni-cpo-option-label { width: calc((100% - 36px) / 4); }
  body.mdb-specialty-curtain .product #uni_cpo_options .mdb-curtain-photo-choice .uni-cpo-option-label__image-wrap img { height: 144px !important; }
}
