/* Shared responsive rhythm. Viewport sizes are test cases, never fixed page canvases. */
:root{
 --mereu-content-max:1280px;
 --mereu-public-gutter:max(32px,calc((100% - var(--mereu-content-max))/2));
 --mereu-mobile-gutter:24px;
 --mereu-workspace-gutter:24px;
 --mereu-space-1:8px;--mereu-space-2:16px;--mereu-space-3:24px;--mereu-space-4:32px;--mereu-space-6:48px;
 --mereu-form-width:400px;
}
/* Public pages share a fluid outer grid; illustration frames may scale independently. */
.lt-pc{--gut:var(--mereu-public-gutter)}
.lt-tel>.lt-root,.lt-pc>.lt-root,.pc-box>.lt-root{width:100%!important;min-width:0;transform:none!important}
.lt-home .lt-tel>.lt-root{max-width:none}
.lt-contact-content{box-sizing:border-box;width:min(100%,448px)!important;max-width:448px!important;margin:0 auto!important;padding:32px 24px!important;gap:16px!important}
.lt-contact-content form{min-width:0}
.ap-head-pc{padding-inline:var(--mereu-public-gutter)!important}
.ap-main{min-width:0}
@media(min-width:960px){.ap-main{max-width:1344px!important;padding:32px!important}}
/* A workspace has its own denser gutter, consistently shared by its title bars. */
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) .cabinet-d .d-header{padding-inline:var(--mereu-workspace-gutter)!important}
/* Documentation keeps its sidebar and code column, with the same mobile page gutter. */
@media(max-width:760px){
 :root{--mereu-public-gutter:24px;--mereu-workspace-gutter:16px}
 .ap-main{padding-inline:var(--mereu-mobile-gutter)!important}
 .api-docs-page .doc-topic,.api-docs-page .doc-reference-intro{padding-inline:var(--mereu-mobile-gutter)}
 .api-docs-page .doc-brand{padding-left:var(--mereu-mobile-gutter)}
 .api-docs-page .doc-language-switch{padding-inline:var(--mereu-mobile-gutter)}
 .api-docs-page .doc-mobile-nav details>summary{padding-inline:var(--mereu-mobile-gutter)}
 .api-docs-page .doc-mobile-nav .doc-search{margin-inline:var(--mereu-mobile-gutter)}
}

@media(max-width:899.98px){
 .lt-home .lt-mobile-hero{padding-inline:var(--mereu-mobile-gutter)!important}
 .lt-home .lt-mobile-hero h1{font-size:clamp(32px,10vw,40px)!important}
}
@media(max-width:899.98px){
 .lt-mobile-head{padding-inline:var(--mereu-mobile-gutter)!important}
 .lt-mobile-head>a:last-child{padding-inline:12px!important}
 .lt-home .lt-tel>.lt-root>section{padding-inline:var(--mereu-mobile-gutter)!important}
}
@media(max-width:359.98px){.lt-mobile-head .mereu-language .ml-globe{display:none}}

/* Current legal document headers share the public grid, while the article stays readable. */
body>main>.top{padding-inline:var(--mereu-public-gutter)}

/* Soft navigation focuses the reading heading for screen readers, without framing the title. */
.api-docs-page .doc-main h1[tabindex="-1"]:focus{outline:none}

/* Let table columns fit whole words and identifiers; narrow screens scroll the table itself. */
.api-docs-page .doc-prose td{overflow-wrap:normal;word-break:normal}

/* Desktop keeps each control's compact dimensions; touch screens retain the readable floor. */
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is(.d-dialog,.period-dialog){max-height:calc(100dvh - 32px);max-width:calc(100vw - 32px)}
@media(max-width:899.98px){
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])){--mereu-ui-min-font:16px;--mereu-small-ui-step:0px;--mereu-control-height:44px;--mereu-footer-height:60px;--mereu-workspace-gutter:24px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is(.mcp,[data-dk-stage-screen],[data-dk-screen],.cpd-phone,.end-phone,[data-preview]){--mereu-ui-min-font:0px;--mereu-small-ui-step:0px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :where(button,a.d-btn,summary):where(:not(:is(.mcp,[data-dk-stage-screen],[data-dk-screen],.cpd-phone,.end-phone,[data-preview]) *)):where(:not([hidden])){min-height:var(--mereu-control-height)!important;min-width:44px!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]):not([type="file"]),select,textarea):where(:not(:is(.mcp,[data-dk-stage-screen],[data-dk-screen],.cpd-phone,.end-phone,[data-preview]) *)){min-height:var(--mereu-control-height)!important;font-size:var(--mereu-ui-min-font)!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is([data-dk-side],.d-dialog,.d-select-menu,.period-dialog,[data-dk-panel],.cpa-pop,.cpd-pop){font-size:var(--mereu-ui-min-font)}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is([data-dk-side],[data-dk-guide],[data-dk-intro],[data-cpd-guide],[data-cpd-intro]){font-size:var(--mereu-ui-min-font)!important;line-height:1.45!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is([data-dk-side],[data-dk-guide],[data-cpd-guide]) :is(a,button,b,strong,small,span):not([aria-hidden]){font-size:max(1em,var(--mereu-ui-min-font))!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-bottom-bar]{min-height:60px;gap:12px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is([data-bottom-bar],.cpd-foot,.cpa-foot) :is(button,a){font-size:var(--mereu-ui-min-font)!important;min-height:44px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) .cabinet-d.d-menu-ready .side .nav>:is(button,a){height:auto;min-height:44px;padding-block:8px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) .cabinet-d.d-menu-ready .side .nav .nav-icon{width:20px;height:20px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) .d-table :is(th,td){height:auto;min-height:44px;padding-block:10px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is(.d-header,.d-panel-head,.d-dialog-head){height:auto;min-height:64px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is(.d-header h1,.d-dialog h2){font-size:22px!important;line-height:1.3!important}
 body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is(.d-dialog,.period-dialog){max-width:100vw;max-height:100dvh}
 body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-bottom-bar]{min-height:calc(60px + env(safe-area-inset-bottom));height:calc(60px + env(safe-area-inset-bottom))!important;padding-bottom:env(safe-area-inset-bottom)}
 body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) .cpa-body{bottom:var(--mereu-footer-height)!important}
 body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) :is(.cpd-foot,.cpa-foot){height:var(--mereu-footer-height)!important;min-height:var(--mereu-footer-height)}
}

/* The steps scroll within their own column; help never covers the last step on a short laptop. */
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-dk-side]{padding:16px!important;gap:12px}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-dk-side]>div:first-child{flex:none;margin-bottom:8px!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-dk-side]>nav{flex:1 1 0;min-height:0;overflow:auto!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-dk-side]>span{display:none}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-dk-help]{flex:none;padding:10px!important;gap:8px!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator]),:has([data-client-page-editor])) [data-dk-help]>span:first-child{width:28px!important;height:28px!important}

@media(max-width:899.98px){
body:is([data-mereu-app="cabinet"],:has([data-card-configurator])) [data-dk-close]{width:44px!important;height:44px!important;min-height:44px!important;min-width:44px!important}
body:is([data-mereu-app="cabinet"],:has([data-card-configurator])) [data-dk-lang] summary>span{transform:none!important;font-size:16px!important}

/* Seven date columns fit even a 320px viewport; their height keeps a comfortable target. */
body[data-mereu-app="cabinet"] :is(.period-days,[data-calendar-grid]) button{min-width:0!important;min-height:44px!important}

}

/* Channel labels have different lengths; the send action keeps one stable box. */
body[data-mereu-app="cabinet"] .d-message-workspace .d-form-footer>[data-send]{width:min(100%,320px)!important;min-width:0!important}

@media(max-width:899.98px){
body[data-mereu-app="cabinet"] .d-message-workspace .d-channel-message-fields .d-message-field{gap:0!important}
body[data-mereu-app="cabinet"] .d-message-workspace .d-channel-message-fields .d-field-top{height:var(--mereu-control-height)!important;min-height:var(--mereu-control-height)!important;margin:0 0 8px!important;flex-wrap:nowrap}
/* Editing inside the offer phone compensates for that phone's visual scale. */
body[data-mereu-app="cabinet"] .d-offer-phone{--mereu-ui-min-font:calc(16px / var(--offer-editor-scale,.8))}
:root body[data-mereu-app="cabinet"] .cabinet-d [data-d-view="oferte"] .d-offer-phone :is(button,textarea){min-height:calc(var(--mereu-control-height) / var(--offer-editor-scale,.8))!important}
}
@media(max-width:899.98px){
 body[data-mereu-app="cabinet"] .cabinet-d .d-clients .d-inspector{height:calc(100dvh - 68px - var(--d-service-strip,0px))!important;min-height:0!important;max-height:calc(100dvh - 68px - var(--d-service-strip,0px));overflow:hidden!important;display:flex;flex-direction:column}
 body[data-mereu-app="cabinet"] .cabinet-d .d-clients .d-inspector-scroll{flex:1 1 0;min-height:0;overflow:auto!important}
 body[data-mereu-app="cabinet"] .cabinet-d .d-clients .d-person>.d-close{position:fixed!important;top:calc(76px + var(--d-service-strip,0px))!important;right:16px!important;z-index:5}
}
/* Notification artwork keeps its own type scale; long identities stay on one line. */
body[data-mereu-app="cabinet"] .d-message-phone{--mereu-ui-min-font:0px;--mereu-small-ui-step:0px}
body[data-mereu-app="cabinet"] .d-message-phone .d-phone-message-heading{line-height:1.35}
body[data-mereu-app="cabinet"] .d-message-phone .d-phone-brand{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-mereu-app="cabinet"] .d-message-phone .d-phone-message-heading>span:last-child:not(.d-phone-brand){flex:none;white-space:nowrap}

/* Pe telefon butonul de trimitere are aceeași lățime ca „Vezi cum arată”. */
@media(max-width:899.98px){
body[data-mereu-app="cabinet"] .cabinet-d .d-message-workspace .d-form-footer>[data-send]{width:100%!important}
}

/* Documente pe telefon: tabelele cu cel mult trei coloane (ex. prețurile din Termeni) încap în ecran, fără derulare laterală. */
@media(max-width:480px){
.table-wrap table:not(:has(th:nth-child(4))){font-size:15px}
.table-wrap table:not(:has(th:nth-child(4))) :is(th,td){min-width:0;padding:10px}
.table-wrap table:not(:has(th:nth-child(4))) tr>:first-child,.table-wrap table:not(:has(th:nth-child(4))) td:last-child{white-space:nowrap}
}

/* 10.11: un singur X de închidere peste tot — X curat într-un cerc gri deschis, aceeași mărime pe toate ecranele.
   Schimbă doar aspectul: unde X-ul era ascuns (de ex. foaia cu „Gata”), rămâne ascuns. Pe telefon zona de apăsare rămâne de 44. */
:is(button,a,[role=button]):is([aria-label^="Închide"],[aria-label^="Close"],[aria-label^="Закрыть"]){box-sizing:border-box!important;width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important;min-height:32px!important;max-height:32px!important;padding:0!important;border:0!important;border-radius:50%!important;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233C3C43' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/14px 14px no-repeat,#EDEDF0!important;box-shadow:none!important;color:transparent!important;font-size:0!important;line-height:0!important;text-decoration:none!important;opacity:1!important}
:is(button,a,[role=button]):is([aria-label^="Închide"],[aria-label^="Close"],[aria-label^="Закрыть"])>*{visibility:hidden!important}
@media(hover:hover){:is(button,a,[role=button]):is([aria-label^="Închide"],[aria-label^="Close"],[aria-label^="Закрыть"]):hover{background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233C3C43' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/14px 14px no-repeat,#E3E3E7!important}}
:is(button,a,[role=button]):is([aria-label^="Închide"],[aria-label^="Close"],[aria-label^="Закрыть"]):focus-visible{outline:2px solid #007AFF!important;outline-offset:2px!important}
@media(max-width:899.98px){
:is(button,a,[role=button]):is([aria-label^="Închide"],[aria-label^="Close"],[aria-label^="Закрыть"]){width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;min-height:44px!important;max-height:44px!important;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233C3C43' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/14px 14px no-repeat,radial-gradient(circle at center,#EDEDF0 0 15.5px,transparent 16px)!important}
}
