/* 247ChatMate admin language controls — isolated paid language UI */
.matewa-choice-card--language-default,
.matewa-choice-card--language-visible,
.matewa-choice-card--language-locked{
  width:100%;
  box-sizing:border-box;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  justify-items:stretch!important;
}
.matewa-language-control-wrap{
  display:block;
  width:100%;
  width:520px;
  max-width:100%;
  box-sizing:border-box;
}
.matewa-language-harmonica{
  width:100%;
  max-width:100%;
  margin-top:10px;
  box-sizing:border-box;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
.matewa-language-harmonica-summary{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:9px 12px;
  cursor:pointer;
  list-style:none;
  box-sizing:border-box;
}
.matewa-language-harmonica-summary::-webkit-details-marker{display:none;}
.matewa-language-harmonica-summary:after{
  content:'▾';
  margin-left:auto;
  color:#6b7280;
  font-size:13px;
}
.matewa-language-harmonica[open] .matewa-language-harmonica-summary:after{content:'▴';}
.matewa-language-harmonica-label{font-weight:700;color:#12231f;}
.matewa-language-admin-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:8px;
  max-height:260px;
  overflow:auto;
  padding:10px;
  border-top:1px solid #eef2f4;
  background:#fff;
  box-sizing:border-box;
}
.matewa-language-admin-grid--default{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));}
.matewa-language-admin-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:8px 9px;
  border:1px solid #edf1f4;
  border-radius:12px;
  background:#fbfcfd;
  box-sizing:border-box;
}
.matewa-language-admin-row input{flex:0 0 auto;}
.matewa-language-admin-flag{
  width:26px;
  height:18px;
  border-radius:4px;
  overflow:hidden;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  flex:0 0 auto;
}
.matewa-language-admin-flag img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.matewa-language-admin-name{
  font-weight:700;
  color:#12231f;
  line-height:1.15;
}
.matewa-language-admin-row small{
  margin-left:auto;
  color:#6b7280;
  white-space:nowrap;
  font-size:11px;
}
.matewa-language-save-button{margin-top:12px!important;}


/* Width lock: both dashboard language harmonicas use the same fixed measure. */
.matewa-choice-card--language-default > .matewa-language-control-wrap,
.matewa-choice-card--language-visible > .matewa-language-control-wrap{
  width:520px!important;
  max-width:100%!important;
}
.matewa-choice-card--language-default .matewa-language-harmonica,
.matewa-choice-card--language-visible .matewa-language-harmonica{
  width:100%!important;
  max-width:100%!important;
}

/* 1.1.52: open state uses one visual surface only: the option grid stays inside the box. */
.matewa-language-harmonica[open] > .matewa-language-harmonica-summary{
  border-bottom:1px solid #eef2f4;
  background:#f8fafc;
}
.matewa-language-harmonica[open] .matewa-language-admin-grid{
  max-height:250px;
  overflow:auto;
  overscroll-behavior:contain;
}
.matewa-language-harmonica[open] .matewa-language-admin-row:has(input[type="radio"]:checked){
  background:#f0fdf4;
  border-color:#86efac;
}
.matewa-language-harmonica{
  contain:layout paint;
}
