/* SPDX-License-Identifier: AGPL-3.0-only */
:root {
    --mobile-bar-height:44px;
    --mobile-bar-title:700 20px/1.2 "Helvetica Neue",Helvetica,Arial,sans-serif;
    --mobile-bar-button:700 12px/1 Helvetica,Arial,sans-serif;
    --mobile-bar-button-height:30px;
    --mobile-bar-side-space:76px;
    --mobile-bar-background:linear-gradient(#b5c7dc,#839bb9 49%,#6b86a8 50%,#748faf);
    --mobile-bar-border:#33475f;
    --mobile-bar-button-background:linear-gradient(#8ba5c7,#587ba7 49%,#476990 50%,#3f6087);
    --mobile-bar-button-border:#344c6b;
    --ios-group-fill:#f7f7f7;
    --ios-separator:#b8b8b8;
    --ios-linen:#565b60 url('/classic-assets/setup-linen.png') center top/320px auto;
}
[data-chrome=dark]{--mobile-bar-background:#222 url('/classic-assets/nav-black-bar.png') repeat-x center/auto 44px;--mobile-bar-border:#101010;--mobile-bar-button-background:linear-gradient(#686868,#292929 48%,#111 50%,#191919);--mobile-bar-button-border:#0c0c0c}
.mobile-system[data-mobile-chrome=dark] .mobile-status,.mobile-system.mobile-locked .mobile-status{background:#000}
body[data-app=notes],.mobile-launch-surface[data-app=notes] {
    --mobile-bar-background:linear-gradient(#c29c77,#a47b55 48%,#896340 50%,#a37b55);
    --mobile-bar-border:#66452d;
    --mobile-bar-button-background:linear-gradient(#ba956e,#8c6544);
    --mobile-bar-button-border:#68472c;
}
body[data-app=clock],.mobile-launch-surface[data-app=clock] {
    --mobile-bar-background:linear-gradient(#666,#333 50%,#1d1d1d 51%,#252525);
    --mobile-bar-border:#111;
    --mobile-bar-button-background:linear-gradient(#666,#292929);
    --mobile-bar-button-border:#111;
}
.mobile-chrome-bar,#jqt .toolbar.mobile-chrome-bar,.mobile-system .window-head.mobile-chrome-bar {
    position:relative;display:block;flex:0 0 var(--mobile-bar-height);box-sizing:border-box;
    height:var(--mobile-bar-height)!important;min-height:var(--mobile-bar-height);width:100%;padding:0;margin:0;
    border:0;border-bottom:1px solid var(--mobile-bar-border)!important;border-radius:0;
    background:var(--mobile-bar-background)!important;box-shadow:0 1px 2px #0004;
    color:#fff;text-shadow:0 -1px #456;overflow:hidden;
}
.mobile-chrome-bar>.mobile-chrome-title,#jqt .toolbar.mobile-chrome-bar>.mobile-chrome-title,.mobile-system .window-head>.mobile-chrome-title {
    position:absolute;inset:0 var(--mobile-bar-side-space) 0;display:flex;align-items:center;justify-content:center;
    width:auto;max-width:none;height:auto;min-width:0;margin:0!important;padding:0;border:0;transform:none;
    overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center;color:#fff!important;
    font:var(--mobile-bar-title)!important;text-shadow:0 -1px #456;pointer-events:none;
}
.mobile-chrome-title>span {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;}
.mobile-chrome-bar>.mobile-chrome-button,#jqt .toolbar.mobile-chrome-bar>.mobile-chrome-button {
    appearance:none;-webkit-appearance:none;box-sizing:border-box;position:absolute;top:50%;bottom:auto;right:6px;left:auto;
    display:flex;align-items:center;justify-content:center;gap:0;transform:translateY(-50%);
    height:var(--mobile-bar-button-height);min-height:var(--mobile-bar-button-height);min-width:30px;max-width:68px;
    margin:0;padding:0 9px;border:1px solid var(--mobile-bar-button-border);border-image:none;border-radius:5px;
    font:var(--mobile-bar-button);color:#fff;text-align:center;text-decoration:none;text-shadow:0 -1px #345;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;
    background:var(--mobile-bar-button-background);box-shadow:inset 0 1px #fff3,0 1px #fff3;
}
.mobile-chrome-bar>.mobile-chrome-left,#jqt .toolbar.mobile-chrome-bar>.mobile-chrome-left {left:5px;right:auto;padding-left:11px;padding-right:11px;border:0;border-image:url('/classic-assets/nav-blue-back.png') 12 10 12 26 fill / 6px 5px 6px 13px / 0 stretch;background:none;box-shadow:none;border-radius:0;filter:none}
[data-chrome=dark] .mobile-chrome-bar>.mobile-chrome-left{border-image-source:url('/classic-assets/nav-black-back.png')}
.mobile-chrome-bar>.mobile-chrome-primary,#jqt .toolbar.mobile-chrome-bar>.mobile-chrome-primary{background:linear-gradient(#9bc5fa,#3588ed 48%,#1365d6 50%,#0b56c2);border-color:#164888;box-shadow:inset 0 1px #d1e8ff,0 1px #ffffff45}
.mobile-chrome-bar>.mobile-chrome-button:active {filter:brightness(.8);}
.mobile-chrome-bar>[hidden] {display:none!important;}
.mobile-chrome-bar>.window-close-btn{width:auto}
.mobile-chrome-bar>.mobile-chrome-external{right:44px;min-width:30px;max-width:30px;padding:0;font-size:16px}
.mobile-system .window:not(.window-alert)>.window-head{height:var(--mobile-bar-height)!important;background:var(--mobile-bar-background)!important}
.mobile-system .window:not(.window-alert) .window-head-title{font:var(--mobile-bar-title)!important}

/* UIKit-style groups keep one outer border and 44-point rows. */
.ios-group,#jqt ul.rounded{overflow:hidden;border:1px solid #92989d;border-radius:10px;background:var(--ios-group-fill);box-shadow:0 1px 0 #fff9;margin:18px 10px;padding:0}
#jqt ul.rounded:empty{display:none!important}
#jqt #app-status:empty{display:none}
#jqt ul.rounded>li{min-height:44px;box-sizing:border-box;padding:10px 11px;border:0;border-bottom:1px solid var(--ios-separator);background:var(--ios-group-fill);box-shadow:inset 0 1px #fff;color:#111;font:700 17px/23px "Helvetica Neue",Helvetica,Arial,sans-serif}
#jqt ul.rounded>li:last-child{border-bottom:0}
#jqt ul.rounded>li>a{margin:-10px -11px;padding:10px 11px;min-height:44px;box-sizing:border-box;color:inherit;gap:10px;text-shadow:none;line-height:23px}
#jqt ul.rounded>li.ios-settings-row{padding:0;height:44px;min-height:44px;box-sizing:border-box}
#jqt ul.rounded>li.ios-settings-row>a{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin:0;padding:0 11px;height:100%;min-height:0;box-sizing:border-box;overflow:hidden}
#jqt .ios-settings-row>a>.row-name{display:flex;align-items:center;flex:1;min-width:0;overflow:hidden}
#jqt .ios-settings-row .ios-row-icon{flex-shrink:0}
#jqt .ios-settings-row>a>.detail{display:block;flex:0 0 auto;max-width:46%;margin-left:auto;text-align:right}
.row-name{min-width:0;gap:0}.row-name>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail{font-size:16px;color:#526581;flex-shrink:0;max-width:47%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.detail.has-disclosure{width:9px;height:14px;position:relative}.detail.has-disclosure:after{content:'';position:absolute;width:7px;height:7px;right:2px;top:3px;border-top:3px solid #7b8187;border-right:3px solid #7b8187;transform:rotate(45deg)}
.ios-row-check{color:#355f84}
.ios-group>.ios-group-action,.ios-value-row{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;padding:10px 12px;margin:0;width:100%;border:0;border-bottom:1px solid var(--ios-separator);border-radius:0;background:var(--ios-group-fill);color:#111;text-decoration:none;font:700 17px/23px "Helvetica Neue",Helvetica,Arial,sans-serif;text-shadow:none;box-shadow:inset 0 1px white;cursor:pointer}
.ios-group>:last-child{border-bottom:0}.ios-group-action:active,#jqt ul.rounded>li>a:active{background:linear-gradient(#4b9bee,#1464c8);color:white}.ios-value-row{justify-content:space-between;gap:15px;text-align:left;font-weight:400;cursor:default}.ios-value-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:400;color:#40597c}
.ios-footnote{margin:12px 15px;font:13px/18px Helvetica,Arial,sans-serif;color:#65768d;text-align:center;text-shadow:0 1px #fff8}
#jqt .classic-search{height:32px;padding:5px 12px 5px 30px;border-radius:16px;border:1px solid #969da5;background:#fff url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 16 16"%3E%3Ccircle cx="6" cy="6" r="4" stroke="%23889099" stroke-width="2" fill="none"/%3E%3Cpath d="m9 9 5 5" stroke="%23889099" stroke-width="2.5"/%3E%3C/svg%3E') 9px center/14px no-repeat;box-shadow:inset 0 1px 2px #0002,0 1px #fff8;font-size:16px}
#jqt .classic-search[type=datetime-local],#jqt .classic-search[type=number]{background:#fff;border-radius:8px;padding:7px 10px;height:38px}
#jqt .empty{font-size:15px;line-height:21px;color:#64717d;text-shadow:0 1px #fff8;padding:40px 24px;margin:0}
#jqt .classic-control,.cloud-button{font:700 13px/18px "Helvetica Neue",Helvetica,Arial,sans-serif;border:1px solid #8d98a6;border-radius:6px;padding:7px 10px;min-height:34px;background:linear-gradient(#fff,#d4dae2);box-shadow:inset 0 1px white,0 1px #fff6;color:#354965;text-shadow:0 1px white}
#jqt .classic-form input{font-size:17px;min-height:40px;background:white;border-radius:8px;box-shadow:inset 0 1px 2px #0002}
#jqt .classic-control.danger{color:#9c2924}
body[data-app=notes] #jqt ul.rounded,body[data-app=notes] #jqt ul.rounded>li{background:#fff6c8;border-color:#c7b97d;box-shadow:none}
body[data-app=notes] #jqt .empty{color:#918157;text-shadow:0 1px #fff8}

/* Mobile variants of Puter's existing UIAlert and UIPrompt. */
.mobile-system .mobile-modal-backdrop{position:fixed!important;inset:0!important;z-index:2147483500!important;background:#0007!important;backdrop-filter:none!important;display:block}
.mobile-system .window.mobile-ios-dialog{position:fixed!important;inset:auto!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:278px!important;max-width:calc(100% - 36px)!important;height:auto!important;min-height:0!important;max-height:calc(100% - 40px)!important;border:2px solid #d3d9e7c9!important;border-radius:11px!important;z-index:2147483501!important;background:linear-gradient(#243c70ee,#081b48f5)!important;box-shadow:0 5px 10px #0009,inset 0 1px #fff6!important;overflow:hidden;color:white;text-shadow:0 -1px #000}
.mobile-system .window.mobile-ios-dialog{border-color:transparent!important;border-image:url('/classic-assets/alert-blue.png') 66 22 22 fill /33px 11px 11px /0 stretch!important;background:#00113c!important}
.mobile-system .window.mobile-ios-dialog{box-sizing:border-box}
.mobile-system .window.mobile-ios-dialog .window-body{position:relative;width:100%!important;max-width:none;height:auto!important;padding:13px 9px 9px!important;background:none!important;backdrop-filter:none!important;overflow:auto!important;box-sizing:border-box}
.mobile-ios-dialog .window-alert-title{text-align:center;font:700 18px/23px Helvetica,Arial,sans-serif;margin:0 0 10px;color:white}
.mobile-ios-dialog .window-alert-message,.mobile-ios-dialog .window-prompt-message{font:16px/21px Helvetica,Arial,sans-serif;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 2px;color:white;max-height:190px;overflow:auto}
.mobile-ios-dialog .window-prompt-message{font-weight:700;font-size:17px}
.mobile-ios-dialog .window-alert-prompt{margin-top:12px!important}
.mobile-ios-dialog .prompt-input{box-sizing:border-box;width:100%;height:34px;border:1px solid #071938;border-radius:4px;background:white;font:16px Helvetica,Arial,sans-serif;padding:6px 8px;box-shadow:inset 0 1px 3px #0005;color:#111}
.mobile-ios-dialog .window-body>div:last-child{display:flex;gap:8px;float:none!important;overflow:visible!important;margin-top:17px!important}
.mobile-system .mobile-ios-dialog button{display:flex;align-items:center;justify-content:center;flex:1;min-width:0;width:auto;height:40px;margin:0!important;padding:0 7px!important;border:1px solid #071735;border-radius:6px;background:linear-gradient(#9baaca88,#4c618caa 49%,#1b3158aa 50%,#435a85aa);box-shadow:inset 0 1px #fff6,0 0 0 1px #ffffff22;color:white;text-shadow:0 -1px #000;font:700 18px/22px Helvetica,Arial,sans-serif;cursor:pointer}
.mobile-ios-dialog button:active{filter:brightness(.8)}.mobile-ios-dialog button:focus-visible{outline:1px solid white;outline-offset:-3px}
.mobile-alert{background:linear-gradient(#415985ef,#091e4cf5);border-color:#d3d9e7c9;text-shadow:0 -1px #000}
.mobile-alert button{height:40px;padding:0;border-color:#071735;background:linear-gradient(#9baacaaa,#4c618caa 49%,#1b3158aa 50%,#435a85aa);font-size:18px}

.ios-spinner{position:absolute;width:28px;height:28px;left:50%;top:45%;transform:translate(-50%,-50%)}
.ios-spinner i{position:absolute;left:12px;top:10px;width:4px;height:8px;border-radius:2px;background:#737b84;transform:rotate(calc(var(--segment)*30deg)) translateY(-10px);transform-origin:2px 4px;animation:ios-spinner-fade 1s linear infinite;animation-delay:calc(var(--segment)*-1s/12)}
.mobile-launch-preview>img{display:none}
.mobile-launch-loading{bottom:auto;top:calc(45% + 26px);font-size:14px;color:#657386;text-shadow:0 1px #fff8}.mobile-launch-loading:before{display:none}
.mobile-launch-surface[data-chrome=dark] .mobile-launch-preview{background:var(--ios-linen)}
.mobile-launch-surface[data-chrome=dark] .mobile-launch-preview:before{content:'Puter';position:absolute;top:24px;left:0;right:0;text-align:center;color:#f7f7f7;font:300 60px/1.2 "Helvetica Neue",Helvetica,Arial,sans-serif;text-shadow:0 2px 2px #0007}
.mobile-launch-surface[data-chrome=dark] .ios-spinner i{background:#e4e6e8}.mobile-launch-surface[data-chrome=dark] .mobile-launch-loading{color:#f2f2f2;text-shadow:0 1px #000}
@keyframes ios-spinner-fade{from{opacity:1}to{opacity:.15}}
