/* ZEUS-SOURCE-OWNER: Johann Scheicher | Entwickler und Rechteinhaber: Johann Scheicher. Copyright (c) 2026 Johann Scheicher. Alle Rechte vorbehalten. */
.connect-call-overlay{position:fixed;inset:0;z-index:12000;background:radial-gradient(circle at 50% 18%,#29473b 0,#14251e 42%,#09130f 100%);color:white;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);height:100dvh;box-sizing:border-box}.connect-call-overlay header,.connect-call-overlay footer{padding:12px max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}.connect-call-overlay header{min-height:58px;background:#07110c66;border-bottom:1px solid #fff1}.connect-call-overlay header b{font-size:18px}.connect-call-overlay header small{display:block;color:#b6cec2}.connect-call-overlay header time{font-variant-numeric:tabular-nums;font-weight:800}.connect-call-overlay [data-call-stage]{flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;padding:10px;align-content:center}.connect-call-tile{position:relative;min-height:180px;overflow:hidden;background:#09150f;border:1px solid #ffffff20;border-radius:20px;box-shadow:0 18px 50px #0005}.connect-call-tile.local{border-color:#c8a95e99}.connect-call-tile video{width:100%;height:100%;object-fit:cover;max-height:70dvh;display:block}.connect-call-tile>span{position:absolute;bottom:12px;left:12px;background:#000b;padding:6px 10px;border-radius:10px;font-weight:700}.connect-call-tile>small{position:absolute;top:12px;left:12px;background:#000b;padding:5px 9px;border-radius:9px}.connect-call-media{position:absolute;right:12px;bottom:12px;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.connect-call-media i{font-style:normal;font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px;background:#14794fcc;color:#fff}.connect-call-media i.off{background:#971f32dd}.connect-call-overlay footer{justify-content:center;flex-wrap:wrap;background:#07110ccc;border-top:1px solid #fff1;padding-top:14px;padding-bottom:max(14px,env(safe-area-inset-bottom))}.connect-call-overlay .call-control{width:72px;height:68px;padding:6px;border-radius:18px;background:#ffffff18;color:#fff;border:1px solid #ffffff20;display:grid;place-items:center;gap:1px}.connect-call-overlay .call-control b{font-size:22px;line-height:1}.connect-call-overlay .call-control span{font-size:10px}.connect-call-overlay .call-control.active{background:#e9eee9;color:#12231b}.connect-call-overlay .call-control.danger{background:#d9344c;color:white;border-color:#f87384}.connect-call-overlay .call-device{display:grid;align-content:center;gap:3px;min-width:160px}.connect-incoming{position:fixed;top:max(16px,env(safe-area-inset-top));right:16px;z-index:13000;width:min(360px,calc(100vw - 32px));box-sizing:border-box;background:#e6f4eb;color:#173d2b;padding:20px;border:2px solid #287b54;border-radius:18px;box-shadow:0 10px 40px #0005}.connect-incoming button{margin:4px}.connect-call-overlay button{min-height:44px}.connect-call-overlay .danger{background:#b62235;color:white}

.connect-call-overlay footer select{width:auto;max-width:min(280px,80vw);min-height:44px;background:#fff;color:#14251e}.connect-call-overlay footer small{color:#d7e7df;min-width:150px;text-align:center}.connect-call-overlay footer small.warning{color:#ffd08a;font-weight:700}
@media(max-width:680px){.connect-call-overlay header{padding-block:9px}.connect-call-overlay [data-call-stage]{grid-template-columns:1fr;padding:6px}.connect-call-tile{min-height:240px;border-radius:15px}.connect-call-overlay footer{gap:7px}.connect-call-overlay .call-control{width:62px;height:60px;border-radius:50%}.connect-call-overlay .call-control span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.connect-call-overlay .call-device{width:100%;grid-template-columns:minmax(120px,1fr) minmax(130px,1fr);align-items:center}.connect-call-overlay footer select{width:100%;max-width:none}.connect-call-overlay footer small{min-width:0}}

/* Stable call controls: live microphone status may change, but never moves the buttons. */
.connect-call-overlay footer{display:grid;grid-template-columns:1fr;justify-items:center}
.connect-call-overlay .call-controls{display:flex;justify-content:center;align-items:center;gap:8px;width:100%;min-height:68px}
.connect-call-overlay .call-control{flex:0 0 72px}
.connect-call-overlay [data-call-speaker][hidden]{display:grid;visibility:hidden;pointer-events:none}
.connect-call-overlay .call-device{display:grid;grid-template-columns:minmax(160px,280px) 220px;justify-content:center;align-items:center;gap:8px;width:100%;min-height:48px}
.connect-call-overlay footer select{width:100%;max-width:280px}
.connect-call-overlay footer small{display:flex;align-items:center;justify-content:center;width:220px;min-width:220px;min-height:34px;line-height:1.2}
@media(max-width:680px){.connect-call-overlay .call-controls{gap:7px;min-height:60px}.connect-call-overlay .call-control{flex-basis:62px}.connect-call-overlay .call-device{grid-template-columns:minmax(120px,1fr) minmax(150px,1fr);width:100%;min-height:44px}.connect-call-overlay footer small{width:100%;min-width:0;min-height:34px;font-size:11px}}
.call-audio-avatar{display:none;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:104px;height:104px;border-radius:50%;place-items:center;background:linear-gradient(145deg,#318363,#164933);border:3px solid #ffffff30;color:#fff;font-size:30px;font-weight:900;box-shadow:0 15px 45px #0007}.connect-call-overlay.audio-only .call-audio-avatar{display:grid}.connect-call-overlay.audio-only .connect-call-tile video{visibility:hidden}.connect-call-overlay.audio-only .connect-call-tile{min-height:210px;background:radial-gradient(circle at 50% 45%,#234b3a,#08140f 72%)}

/* Keep the self preview visible above remote video, for both call directions. */
.connect-call-overlay:not(.audio-only) [data-call-stage]{position:relative}
.connect-call-overlay:not(.audio-only) .connect-call-tile.local{position:absolute;right:12px;bottom:12px;width:clamp(90px,20vw,160px);height:clamp(120px,26vw,210px);min-height:0;z-index:3;border-radius:12px}
.connect-call-overlay:not(.audio-only) .connect-call-tile.local video{height:100%;max-height:none}
.connect-call-overlay:not(.audio-only) .connect-call-tile.local>span{bottom:5px;left:5px;padding:2px 5px;font-size:11px}
.connect-call-overlay:not(.audio-only) .local-media{display:none}
