/* Montageberegner basic styles */
.mbr-root{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
.mbr-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.mbr-card{border:1px solid #ddd;border-radius:12px;padding:12px;background:#fff;cursor:pointer}
.mbr-card.selected{outline:3px solid #2271b1}
/* Row layout: keep spacing + color on the same line on desktop, compact the first 3 fields */
.mbr-row{display:grid;grid-template-columns:.6fr .6fr .6fr 2.2fr 1fr 2fr 1.2fr 1fr .8fr;gap:10px;align-items:end;margin:10px 0}
.mbr-row label{display:block;font-size:12px;color:#444;margin-bottom:4px}
.mbr-row input,.mbr-row select{width:100%;padding:8px;border:1px solid #ccc;border-radius:8px}
.mbr-remove{width:100%}
.mbr-actions{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
.mbr-table{width:100%;border-collapse:collapse;margin-top:10px}
.mbr-table th,.mbr-table td{border-bottom:1px solid #eee;padding:8px;text-align:left;font-size:14px}
.mbr-lang{display:flex;gap:8px;align-items:center;margin-bottom:12px}

/* Roof type info section */
.mbr-roof-info{margin:14px 0 6px;padding:12px;border:1px solid #e5e5e5;border-radius:12px;background:#fff}
.mbr-roof-info-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.mbr-roof-info-title{font-weight:700}
.mbr-roof-info-close{font-size:18px;line-height:18px;padding:0 10px;min-width:0}
.mbr-roof-explain{margin-top:10px;color:#333;font-size:14px;line-height:1.45}

/* WooCommerce-like product image list (works even if WC styles aren't loaded)
   Desktop: columns-4, Mobile: 2 columns */
.mbr-products{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;list-style:none;margin:0;padding:0}
.mbr-products .product{width:auto}
.mbr-products .product img{width:100%;height:auto;border-radius:10px;border:1px solid #eee;display:block}

@media (max-width: 860px){
  .mbr-products{grid-template-columns:repeat(2,1fr)}
}

@media (max-width: 480px){
  .mbr-products{grid-template-columns:repeat(2,1fr)}
}

/* Responsive row wrapping */
@media (max-width: 980px){
  .mbr-row{grid-template-columns:repeat(3,minmax(160px,1fr))}
}

@media (max-width: 720px){
  .mbr-row{grid-template-columns:repeat(2,minmax(160px,1fr))}
}

@media (max-width: 560px){
  .mbr-row{grid-template-columns:1fr}
}


/* Section 2 background */
.mbr-section-rows{background:#f5f5f5;padding:14px;border-radius:12px;margin-top:12px}


.mbr-system-picker{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-left:8px}
.mbr-system-label{font-weight:600}
.mbr-radio{display:inline-flex;align-items:center;gap:8px;border:1px solid #ccd0d4;background:#fff;border-radius:999px;padding:8px 12px;cursor:pointer}
.mbr-radio.selected{border-color:#2271b1;box-shadow:inset 0 0 0 1px #2271b1}
.mbr-radio-circle{width:14px;height:14px;border:2px solid #777;border-radius:50%;display:inline-block;position:relative}
.mbr-radio.selected .mbr-radio-circle{border-color:#2271b1}
.mbr-radio.selected .mbr-radio-circle:after{content:'';position:absolute;left:2px;top:2px;width:6px;height:6px;border-radius:50%;background:#2271b1}
.mbr-table select,.mbr-table input[type=number]{width:100%;min-width:140px}

.mbr-radio{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;}
.mbr-radio-text{display:inline-block;}

/* Ensure system choice text is visible on light backgrounds */
.mbr-radio,.mbr-radio *{color:#000 !important;}
.mbr-radio{background:#fff !important;}


/* Ensure system choice text is visible */
.mbr-system-choice,
.mbr-system-choice label,
.mbr-system-choice span,
.mbr-system-card,
.mbr-system-card label,
.mbr-system-card span {
  color: #000 !important;
}


/* Align roof-type images consistently to the bottom of cards */
.mbr-card{display:flex;flex-direction:column;height:100%}
.mbr-card > div:first-child{min-height:3.8em}
.mbr-card img{
  margin-top:auto;
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display:block;
}
.mbr-card > div:last-child{margin-top:6px}


/* Roof-type change modal */
.mbr-modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:99999;
}
.mbr-modal{
  width:min(420px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,.22);
  padding:22px;
}
.mbr-modal-title{
  font-size:20px;
  font-weight:700;
  color:#111;
  margin-bottom:16px;
}
.mbr-modal-actions{
  display:grid;
  gap:12px;
}
.mbr-modal-btn{
  width:100%;
  min-height:48px;
  border-radius:12px !important;
  font-size:15px;
  justify-content:center;
}
@media (max-width: 560px){
  .mbr-modal{padding:18px;border-radius:16px;}
  .mbr-modal-title{font-size:18px;}
}

.mbr-qty-mismatch{border-color:#c62828 !important;color:#c62828 !important;font-weight:700;}
.mbr-qty-note{margin-top:4px;color:#c62828;font-size:12px;line-height:1.35;}


.mbr-modal-actions{grid-template-columns:1fr;}

