/* ALYA GIS V101.19: touch workspace. Desktop engines and layouts remain intact. */
#alyaMobileDock,#alyaMobileFinish,.alya-stability-tabs{display:none}
@media(max-width:900px){
 html,body{height:100%;height:100dvh;overscroll-behavior:none}
 body.alya-reference-workspace #alyaReferenceWorkspace{inset:0 0 calc(58px + env(safe-area-inset-bottom))!important;grid-template-rows:100px minmax(0,1fr) 24px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-topbar{display:flex!important;flex-wrap:wrap!important;gap:0!important;padding:0 10px!important;min-width:0!important;align-content:start!important}
 .alya-ref-brand{height:46px!important;flex:1!important}.alya-ref-brand-name{font-size:18px!important}.alya-ref-brand-mark{width:28px!important;height:28px!important}
 .alya-ref-top-actions{height:46px!important}.alya-ref-search-button{min-width:36px!important;width:36px!important;padding:8px!important}.alya-ref-search-button span,.alya-ref-search-button kbd,.alya-ref-avatar{display:none!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-topnav{order:3!important;flex:0 0 100%!important;justify-content:flex-start!important;height:50px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
 .alya-ref-nav-button{flex:0 0 auto!important;padding:0 12px!important;min-height:44px!important;font-size:13px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-body{display:block!important;position:relative!important;min-width:0!important}
 .alya-ref-module-rail{display:none!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-map-slot{position:absolute!important;inset:0!important;width:100%!important;min-width:0!important;height:100%!important}
 body.alya-reference-workspace #alyaReferenceWorkspace :is(.alya-ref-left-slot,.alya-ref-right-slot){display:none!important;position:absolute!important;inset:0!important;width:100%!important;max-width:none!important;z-index:120!important;opacity:1!important;pointer-events:auto!important;background:#0d1925!important;border:0!important;overflow:auto!important}
 body[data-mobile-panel="layers"] #alyaReferenceWorkspace .alya-ref-left-slot,body[data-mobile-panel="tools"] #alyaReferenceWorkspace .alya-ref-right-slot{display:block!important}
 #rightSidebar{width:100%!important;min-width:0!important;max-width:none!important;height:100%!important;overflow:auto!important}
 .alya-ref-status-slot{min-width:0!important;overflow:hidden!important}.alya-ref-status-slot>*{white-space:nowrap!important}.alya-ref-status-item{font-size:10px!important}
 #alyaMobileDock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;inset:auto 0 0;z-index:2147483610;padding:5px 6px calc(5px + env(safe-area-inset-bottom));height:calc(58px + env(safe-area-inset-bottom));box-sizing:border-box;background:#091926;border-top:1px solid #2b4357;gap:5px}
 #alyaMobileDock button,#alyaMobileDock a{display:flex;align-items:center;justify-content:center;gap:5px;border:1px solid transparent;border-radius:8px;background:transparent;color:#a9bfd0;font:600 12px Segoe UI,Arial;text-decoration:none;min-height:44px;cursor:pointer}
 #alyaMobileDock [aria-pressed="true"]{background:#174a77;border-color:#347db5;color:#fff}
 #alyaMobileFinish:not([hidden]){display:flex;position:fixed;left:10px;right:10px;bottom:calc(140px + env(safe-area-inset-bottom));z-index:1000;background:#102b3eed;border:1px solid #376281;border-radius:10px;padding:8px;gap:7px;align-items:center;color:#d8e9f4;font:12px Segoe UI,Arial}
 #alyaMobileFinish span{flex:1}#alyaMobileFinish button{min-height:44px;border:1px solid #527f9f;border-radius:7px;background:#194664;color:white;padding:8px 12px;font-weight:600}
 #alyaPrivacyBadge{display:none!important}
 #alyaMobileMenu{width:calc(100vw - 24px);padding:20px;border:1px solid #36536c;border-radius:14px;background:#102435;color:#e7f0f7;font:15px/1.5 Segoe UI,Arial}
 #alyaMobileMenu::backdrop{background:#020b14b3}#alyaMobileMenu header{display:flex;justify-content:space-between;align-items:center}#alyaMobileMenu small{display:block;color:#8caec4;font-size:12px}
 #alyaMobileMenu button{border:1px solid #355269;background:#173449;color:#e7f0f7;border-radius:9px;padding:10px;font:600 14px Segoe UI,Arial;cursor:pointer}
 #alyaMobileMenu header button{width:44px;font-size:24px}#alyaMobileMenu .mobile-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}#alyaMobileMenu .mobile-menu-grid button{display:flex;flex-direction:column;align-items:center;gap:10px;min-height:78px}#alyaMobileMenu svg{width:24px;height:24px;color:#65b7f5}#alyaMobileMenu footer{display:grid;gap:16px;margin-top:22px}#alyaMobileMenu a{color:#aed5ed;text-align:center}
 #alyaLocalInfo{box-sizing:border-box;max-width:calc(100vw - 24px)!important;max-height:80dvh;overflow:auto;padding:20px!important}
 #alyaWebBack{display:none!important}
 #alyaRefModuleFlyout,.alya-ref-popover{position:fixed!important;left:8px!important;right:8px!important;top:104px!important;width:auto!important;min-width:0!important;max-width:none!important;max-height:calc(100dvh - 180px)!important;overflow:auto!important}
 .alya-ref-module-grid{grid-template-columns:1fr!important}.alya-ref-module-card{min-height:58px!important}
 .alya-ref-module-flyout-content{max-height:none!important;overflow:visible!important}
 .alya-ref-map-corner-card,.alya-ref-map-compass{display:none!important}
 .alya-ref-map-toolbar{max-width:calc(100vw - 18px)!important;overflow-x:auto!important}
 .alya-ref-map-nav{bottom:14px!important}
 body.alya-reference-workspace :is(button,select,input:not([type="checkbox"]):not([type="radio"]):not([type="range"])){min-height:40px}
 body.alya-reference-workspace :is(input,select,textarea){font-size:16px!important;max-width:100%;box-sizing:border-box}
 body.alya-reference-workspace :is(dialog,[role="dialog"],.modal-content,.alya-eng-card){max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;box-sizing:border-box}
 body.alya-reference-workspace :is(.dp-actions,.anv3-actions){grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.alya-reference-workspace .alya-ref-panel-head{height:auto!important;min-height:48px!important}
 body.alya-reference-workspace #map{touch-action:none}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar :is(select,input:not([type="checkbox"]):not([type="radio"]),textarea){font-size:16px!important;min-height:44px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar :is(.anv3-lbl,.anv3-chk,.anv3-note,.gnd-acc-title){font-size:13px!important;line-height:1.5!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .anv3-modal-card{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 90px)!important;overflow:auto!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .anv3-modal-body .anv3-2col{grid-template-columns:1fr!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .anv3-modal-body .anv3-row{grid-template-columns:90px minmax(0,1fr)!important;gap:8px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .anv3-modal-foot{position:sticky;bottom:0;background:#122838;z-index:2}
 body.alya-mobile-3d #badge{left:8px;right:48px;font-size:11px;background:#0f2534ec;color:#d9eaf5;border-color:#35536a}
 body.alya-mobile-3d #panel{top:72px;left:8px;right:8px;width:auto;max-height:calc(100dvh - 90px);background:#102737f5;color:#e1edf5;border-color:#38556b}
 body.alya-mobile-3d #panelBody{overflow:auto;max-height:calc(100dvh - 150px)}
 body.alya-mobile-3d #panel button,body.alya-mobile-3d #panel select{min-height:44px;background:#19374c;color:#edf5fa;border-color:#38576d;font-size:14px}
 body.alya-mobile-3d #panel .list{background:#142e40}body.alya-mobile-3d #panel .row{min-height:40px;flex-wrap:wrap}body.alya-mobile-3d #panel .it .nm{white-space:normal;overflow-wrap:anywhere}
 body.alya-mobile-3d #alyaWebBack{display:none!important}
 body.stability-workspace-on #alyaReferenceWorkspace #stabilityWorkspace{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:48px minmax(0,1fr)!important;gap:6px!important;padding:6px!important}
 #stabilityWorkspace .alya-stability-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
 .alya-stability-tabs button{border:1px solid #a7bed3;border-radius:7px;background:#fff;color:#15344e;font-weight:700;min-height:44px}.alya-stability-tabs [aria-pressed="true"]{background:#164b7a;color:white}
 #stabilityWorkspace>.stabws-pane{display:none!important;min-width:0!important;width:100%!important}
 #stabilityWorkspace[data-mobile-view="inputs"]>.stabws-left,#stabilityWorkspace[data-mobile-view="results"]>.stabws-right{display:flex!important}
 #stabilityWorkspace[data-mobile-view="section"]>.stabws-main{display:grid!important}
 #stabilityWorkspace>.stabws-footer{display:none!important}#stabilityWorkspace .stabws-topbar{overflow-x:auto;flex-wrap:nowrap}#stabilityWorkspace .stabws-tab{flex:0 0 auto}#stabilityWorkspace .stabws-kpi{grid-template-columns:repeat(2,1fr)}
 #stabilityWorkspace .stabws-note{font-size:13px!important;line-height:1.6}#stabilityWorkspace .stabws-mat{grid-template-columns:18px minmax(70px,1fr) repeat(3,50px)}
}

.alya-mobile-area{display:none}
@media(max-width:900px){body.alya-reference-workspace #alyaReferenceWorkspace .alya-mobile-area{display:block;grid-column:1/-1;min-height:44px;background:#163d50;color:#d9efff;border:1px solid #528799;border-radius:8px}#alyaMobileAnalysisMessage{color:#ffdfae;background:#382e20;border:1px solid #96764b;padding:12px;margin:8px;font:14px/1.5 Segoe UI;overflow-wrap:anywhere}}

/* Mobile refinement: readable controls and a clear first action. */
#alyaMobileWelcome,.alya-mobile-panel-bar{display:none}
#alyaMobileDock svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:900px){
 body.alya-reference-workspace{font-family:Segoe UI,Arial,sans-serif!important}
 #alyaMobileDock{height:calc(68px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));gap:6px;background:#0b1b2a}
 #alyaMobileDock button{flex-direction:column;gap:4px;border-radius:12px;font-size:11px;line-height:1.2;padding:4px;min-height:54px;color:#a8bece}
 #alyaMobileDock [aria-pressed="true"]{background:#153b53;border-color:#285f7b;color:#a9e1f2}
 body.alya-reference-workspace #alyaReferenceWorkspace{bottom:calc(68px + env(safe-area-inset-bottom))!important;grid-template-rows:100px minmax(0,1fr) 24px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-topbar{background:#0b1b2a!important;border-bottom:1px solid #274052!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-context-toolbar{left:10px!important;right:10px!important;top:12px!important;transform:none!important;width:auto!important;max-width:none!important;display:flex!important;overflow-x:auto!important;justify-content:flex-start!important;border-radius:12px!important;padding:4px!important;gap:3px!important;box-shadow:0 4px 16px #0002!important;scrollbar-width:none}
 .alya-ref-context-toolbar>button,.alya-ref-context-toolbar>div{flex-shrink:0!important}
 .alya-ref-context-toolbar button{min-width:48px!important;min-height:44px!important;font-size:11px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-map-nav{left:auto!important;right:10px!important;top:84px!important;bottom:auto!important;transform:none!important;padding:3px!important;gap:3px!important;border-radius:12px!important;box-shadow:0 4px 16px #0002!important}
 .alya-ref-map-nav button{width:40px!important;min-height:40px!important}
 .alya-ref-map-nav button[title="Kuzey"],.alya-ref-map-nav button[title="Tam ekran"]{display:none!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-ref-measure-dock{left:10px!important;right:10px!important;bottom:12px!important;width:auto!important;max-width:none!important;transform:none!important;border-radius:12px!important;padding:5px!important;gap:3px!important;box-shadow:0 4px 16px #0002!important;overflow-x:auto!important;justify-content:flex-start!important}
 .alya-ref-measure-button{flex:0 0 55px!important;min-height:48px!important;font-size:11px!important}
 .alya-ref-measure-button svg{width:19px!important;height:19px!important}
 #alyaMobileWelcome{display:block;position:absolute;left:16px;right:68px;top:92px;z-index:410;padding:22px 18px 16px;background:#102536f5;border:1px solid #365265;border-radius:18px;box-shadow:0 12px 30px #0002;color:#eef6fc}
 #alyaMobileWelcome small{font-size:9px;letter-spacing:1px;color:#8cd0df}#alyaMobileWelcome h2{font-size:23px;line-height:1.2;letter-spacing:-.5px;margin:14px 0 10px}#alyaMobileWelcome p{font-size:14px;line-height:1.55;color:#b6c9d6;margin:0 0 18px}
 #alyaMobileWelcome .welcome-close{position:absolute;right:3px;top:1px;min-height:34px;min-width:34px;background:none;border:0;color:#bed2de;font-size:24px}
 #alyaMobileWelcome>div{display:grid;gap:8px}#alyaMobileWelcome>div button{display:flex;justify-content:space-between;align-items:center;padding:12px;border:1px solid #48738b;border-radius:10px;background:#19445b;color:#edfaff;font:600 14px Segoe UI;min-height:46px}
 #alyaMobileWelcome .welcome-basemap{margin:10px 0 0;width:100%;min-height:44px;background:transparent;color:#b9dfea;border:0;font-size:12px}#alyaMobileWelcome footer{font-size:10px;color:#90adbf;text-align:center;margin-top:8px}
 .alya-mobile-panel-bar{display:flex;position:sticky;top:0;z-index:300;align-items:center;justify-content:space-between;padding:8px 12px;background:#0e2333;border-bottom:1px solid #345164;gap:12px}
 .alya-mobile-panel-bar button{border:1px solid #3b5f75;border-radius:9px;background:#183c52;color:#e4f3fa;padding:8px 12px;min-height:44px;font:600 14px Segoe UI}.alya-mobile-panel-bar span{font:600 10px Segoe UI;letter-spacing:1px;color:#91bacf}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar{height:auto!important;min-height:calc(100% - 62px)!important;width:100%!important;min-width:0!important;overflow:visible!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar :is(.anv3-run,.anv3-save,.anv3-clr,.anv3-update){font-size:14px!important;min-height:46px!important;border-radius:10px!important}
 #alyaMobileFinish:not([hidden]){bottom:calc(155px + env(safe-area-inset-bottom));box-shadow:0 8px 24px #0003}#alyaMobileFinish span{font-size:12px;line-height:1.4}
 #sfLegendOverlay{max-width:130px!important;max-height:36dvh!important;overflow:auto!important;right:8px!important}
 #alyaRefModuleFlyout .alya-ref-module-card{border-radius:12px!important;padding:12px!important}#alyaRefModuleFlyout strong{font-size:15px!important}
 .alya-ref-popover{border-radius:14px!important}.alya-ref-popover button{min-height:46px!important;font-size:14px!important}
 button:focus-visible,a:focus-visible{outline:2px solid #79d8ef!important;outline-offset:2px!important}
}
@media(max-width:360px){#alyaMobileWelcome{left:10px;right:60px;padding:18px 14px}#alyaMobileWelcome h2{font-size:21px}.alya-ref-nav-button{padding:0 9px!important}}
@media(max-height:560px) and (max-width:900px){#alyaMobileWelcome{top:72px;left:12px;right:70px;padding:12px}#alyaMobileWelcome h2{margin:4px 0;font-size:19px}#alyaMobileWelcome p,#alyaMobileWelcome footer,#alyaMobileWelcome .welcome-basemap{display:none}#alyaMobileWelcome>div{grid-template-columns:1fr 1fr;margin-top:8px}}
@media(prefers-reduced-motion:reduce){#alyaMobileDock *,#alyaMobileWelcome *{transition:none!important}}

@media(max-width:900px){
 body.alya-reference-workspace[data-mobile-panel="tools"] #alyaReferenceWorkspace .alya-ref-right-slot{display:flex!important;flex-direction:column!important;overflow:hidden!important}
 body.alya-reference-workspace #alyaReferenceWorkspace .alya-mobile-panel-bar{flex-shrink:0}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar{flex:1 1 0!important;height:0!important;min-height:0!important;overflow:hidden!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar .anv3-actions{grid-template-rows:none!important;grid-auto-rows:minmax(44px,auto)!important;padding:8px!important;gap:7px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar .anv3-actions button{height:auto!important;min-height:44px!important;font-size:13px!important;font-weight:600!important;line-height:1.25!important;padding:8px!important;white-space:normal!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar .anv3-scroll{padding-bottom:12px!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar .anv3-actions .anv3-run{grid-column:1/-1!important;background:#176d91!important;box-shadow:none!important}
}

@media(max-width:900px){
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3-actions button{height:auto!important;min-height:44px!important;font-size:14px!important;line-height:1.25!important;padding:10px!important;border-radius:10px!important;white-space:normal!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3-actions{grid-auto-rows:minmax(44px,auto)!important;gap:8px!important;padding:10px!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody :is(.anv3-lbl,.anv3-chk,.anv3-note,.gnd-acc-title,.anv3-section-title){font-size:13px!important;line-height:1.5!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody :is(input,select,textarea){font-size:16px!important;min-height:44px!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3-actions .anv3-run{background:#176d91!important;border-color:#438ca8!important}
}

@media(max-width:900px){#alyaMobileMenu header{position:sticky;top:-20px;background:#102435;padding:10px 0;z-index:2}button,a{touch-action:manipulation}}
@media(min-width:600px) and (max-width:900px) and (max-height:560px){
 #alyaMobileMenu .mobile-menu-grid{grid-template-columns:repeat(4,1fr)}#alyaMobileMenu .mobile-menu-grid button{min-height:66px}#alyaMobileMenu footer{grid-template-columns:1fr 1fr;align-items:center}
 body.alya-reference-workspace[data-mobile-panel="tools"] #alyaReferenceWorkspace .alya-ref-right-slot{display:block!important;overflow:auto!important}
 body.alya-reference-workspace #alyaReferenceWorkspace #rightSidebar{height:auto!important;min-height:0!important;overflow:visible!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody{overflow:visible!important;flex:none!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3{height:auto!important;overflow:visible!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3-scroll{overflow:visible!important;flex:none!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important;position:sticky!important;bottom:0!important}
 #alyaReferenceWorkspace #rightSidebar #rsBody .anv3-actions button{grid-column:auto!important}
}
