/* ShipF1 Driver Camera V2 */
:root{
    --cam-bg:#050607;
    --cam-white:#ffffff;
    --cam-muted:rgba(255,255,255,.66);
    --cam-line:rgba(255,255,255,.14);
    --cam-red:#e31837;
    --cam-green:#10a37f;
    --cam-panel:rgba(12,13,15,.72);
}

html,
body{
    margin:0;
    width:100%;
    height:100%;
    overflow:hidden;
    background:var(--cam-bg);
}

body{
    overscroll-behavior:none;
}

.driver-camera{
    position:fixed;
    inset:0;
    z-index:5000;
    background:var(--cam-bg);
    color:#fff;
    font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

.driver-camera-stage{
    position:absolute;
    inset:0;
    overflow:hidden;
    background:
        radial-gradient(circle at 50% 36%,rgba(255,255,255,.06),transparent 38%),
        #08090a;
}

.camera-video,
.camera-fallback-image,
.camera-canvas{
    position:absolute;
    inset:0;
    z-index:1;
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    background:#050607;
}

.camera-video.is-mirrored{
    transform:scaleX(-1);
}

.camera-canvas{
    z-index:10;
}

.camera-shade{
    position:absolute;
    inset:0;
    z-index:2;
    pointer-events:none;
    background:
        linear-gradient(to bottom,rgba(0,0,0,.36),transparent 21%),
        linear-gradient(to top,rgba(0,0,0,.72),transparent 42%);
}

.camera-topbar{
    position:absolute;
    top:0;
    left:0;
    right:0;
    z-index:20;
    min-height:64px;
    padding:calc(10px + env(safe-area-inset-top)) 12px 10px;
    display:grid;
    grid-template-columns:46px minmax(0,1fr) 46px;
    align-items:center;
    gap:10px;
    pointer-events:none;
}

.camera-topbar>*{
    pointer-events:auto;
}

.camera-top-action{
    width:46px;
    height:46px;
    padding:0;
    border:1px solid rgba(255,255,255,.12);
    border-radius:50%;
    display:grid;
    place-items:center;
    background:rgba(8,9,10,.58);
    color:#fff;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
}

.camera-top-action svg{
    width:22px;
    height:22px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.camera-brand{
    justify-self:center;
    min-width:0;
    height:40px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:999px;
    display:flex;
    align-items:center;
    gap:7px;
    background:rgba(8,9,10,.48);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
}

.camera-brand-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--cam-red);
    box-shadow:0 0 0 4px rgba(227,24,55,.12);
}

.camera-brand strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:12px;
    font-weight:700;
}

.camera-live-stamp{
    position:absolute;
    left:18px;
    right:18px;
    bottom:calc(124px + env(safe-area-inset-bottom));
    z-index:12;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:16px;
    pointer-events:none;
    text-shadow:0 2px 8px rgba(0,0,0,.82);
}

.camera-time-row{
    display:flex;
    align-items:flex-end;
    gap:8px;
}

.camera-time-row>strong{
    color:rgba(255,255,255,.92);
    font-size:58px;
    line-height:.9;
    font-weight:300;
    letter-spacing:-.06em;
}

.camera-car-mark{
    width:40px;
    height:40px;
    margin-bottom:2px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:var(--cam-red);
    color:#fff;
    box-shadow:0 8px 20px rgba(227,24,55,.28);
}

.camera-car-mark svg{
    width:28px;
    height:28px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.camera-stamp-divider{
    width:3px;
    height:44px;
    margin:0 2px 1px;
    border-radius:999px;
    background:var(--cam-red);
}

.camera-date-copy{
    min-width:0;
    padding-bottom:1px;
}

.camera-date-copy strong,
.camera-date-copy small{
    display:block;
}

.camera-date-copy strong{
    color:rgba(255,255,255,.96);
    font-size:16px;
    line-height:1.2;
    font-weight:650;
}

.camera-date-copy small{
    margin-top:4px;
    color:rgba(255,255,255,.72);
    font-size:13px;
}

.camera-place{
    max-width:78vw;
    margin-top:11px;
    color:rgba(255,255,255,.92);
    font-size:15px;
    line-height:1.35;
    font-weight:550;
}

.camera-driver-meta{
    margin-top:7px;
    display:flex;
    align-items:center;
    gap:7px;
    color:rgba(255,255,255,.6);
    font-size:10px;
    font-weight:600;
}

.camera-driver-meta i{
    width:4px;
    height:4px;
    border-radius:50%;
    background:rgba(255,255,255,.42);
}

.camera-stamp-brand{
    padding-bottom:2px;
    text-align:right;
}

.camera-stamp-brand strong,
.camera-stamp-brand small{
    display:block;
}

.camera-stamp-brand strong{
    color:#fff;
    font-size:17px;
    font-weight:800;
    letter-spacing:-.03em;
}

.camera-stamp-brand small{
    margin-top:2px;
    color:var(--cam-red);
    font-size:8px;
    font-weight:800;
    letter-spacing:.12em;
}

.camera-gps-pill{
    position:absolute;
    left:14px;
    top:calc(76px + env(safe-area-inset-top));
    z-index:18;
    max-width:calc(100% - 28px);
    min-height:34px;
    padding:0 11px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:999px;
    display:flex;
    align-items:center;
    gap:7px;
    background:rgba(8,9,10,.56);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
}

.camera-gps-dot{
    width:8px;
    height:8px;
    flex:0 0 8px;
    border-radius:50%;
    background:#d3a229;
}

.camera-gps-pill.good .camera-gps-dot{
    background:var(--cam-green);
}

.camera-gps-pill.weak .camera-gps-dot{
    background:#d34a52;
}

.camera-gps-pill strong{
    overflow:hidden;
    color:rgba(255,255,255,.84);
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10px;
    font-weight:650;
}

.camera-start-panel{
    position:absolute;
    inset:0;
    z-index:30;
    padding:calc(86px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:
        radial-gradient(circle at 50% 35%,rgba(16,163,127,.13),transparent 28%),
        linear-gradient(to bottom,#0b0d0e,#050607 64%);
}

.camera-start-icon{
    width:68px;
    height:68px;
    border-radius:22px;
    display:grid;
    place-items:center;
    background:#111416;
    color:#fff;
    border:1px solid rgba(255,255,255,.1);
}

.camera-start-icon svg{
    width:31px;
    height:31px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.camera-start-panel h1{
    margin:18px 0 0;
    color:#fff;
    font-size:26px;
    font-weight:700;
    letter-spacing:-.04em;
}

.camera-start-panel p{
    max-width:310px;
    margin:8px 0 0;
    color:rgba(255,255,255,.58);
    text-align:center;
    font-size:12px;
    line-height:1.55;
}

.camera-start-button,
.camera-native-button{
    width:min(100%,340px);
    min-height:50px;
    border-radius:14px;
    font-size:13px;
    font-weight:700;
}

.camera-start-button{
    margin-top:22px;
    border:0;
    background:#fff;
    color:#111;
}

.camera-native-button{
    margin-top:9px;
    border:1px solid rgba(255,255,255,.14);
    background:transparent;
    color:#fff;
}

.camera-controls{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    z-index:22;
    padding:14px 28px calc(18px + env(safe-area-inset-bottom));
    display:grid;
    grid-template-columns:50px 1fr 50px;
    align-items:center;
    gap:18px;
    background:linear-gradient(to top,rgba(0,0,0,.78),rgba(0,0,0,.28),transparent);
}

.camera-side-control{
    width:48px;
    height:48px;
    padding:0;
    border:1px solid rgba(255,255,255,.14);
    border-radius:50%;
    display:grid;
    place-items:center;
    background:rgba(11,12,14,.56);
    color:#fff;
    backdrop-filter:blur(12px);
}

.camera-side-control:disabled{
    opacity:.35;
}

.camera-side-control svg{
    width:21px;
    height:21px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.camera-shutter{
    justify-self:center;
    width:78px;
    height:78px;
    padding:0;
    border:3px solid rgba(255,255,255,.96);
    border-radius:50%;
    display:grid;
    place-items:center;
    background:transparent;
}

.camera-shutter span{
    width:62px;
    height:62px;
    border-radius:50%;
    display:block;
    background:#fff;
    transition:transform .12s ease,background .12s ease;
}

.camera-shutter:active span{
    transform:scale(.91);
    background:#efefef;
}

.camera-preview-toolbar{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    z-index:32;
    padding:12px 14px calc(16px + env(safe-area-inset-bottom));
    display:grid;
    grid-template-columns:1fr 1.3fr;
    gap:10px;
    background:linear-gradient(to top,rgba(0,0,0,.9),rgba(0,0,0,.38),transparent);
}

.camera-preview-action{
    min-height:52px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:12px;
    font-weight:700;
}

.camera-preview-action svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.camera-preview-action.secondary{
    border:1px solid rgba(255,255,255,.14);
    background:rgba(10,11,13,.66);
    color:#fff;
}

.camera-preview-action.primary{
    border:0;
    background:#fff;
    color:#111;
}

.camera-toast{
    position:absolute;
    left:50%;
    top:calc(122px + env(safe-area-inset-top));
    z-index:60;
    width:max-content;
    max-width:calc(100% - 28px);
    padding:10px 13px;
    border-radius:11px;
    background:rgba(13,14,16,.92);
    color:#fff;
    opacity:0;
    transform:translate(-50%,-8px);
    pointer-events:none;
    transition:.18s ease;
    font-size:11px;
    font-weight:650;
    text-align:center;
}

.camera-toast.show{
    opacity:1;
    transform:translate(-50%,0);
}

.camera-toast.success{
    background:rgba(7,115,84,.94);
}

.camera-toast.error{
    background:rgba(153,31,47,.96);
}

@media(max-width:390px){
    .camera-live-stamp{
        left:14px;
        right:14px;
        bottom:calc(118px + env(safe-area-inset-bottom));
    }

    .camera-time-row>strong{
        font-size:52px;
    }

    .camera-car-mark{
        width:37px;
        height:37px;
    }

    .camera-stamp-divider{
        height:40px;
    }

    .camera-date-copy strong{
        font-size:14px;
    }

    .camera-place{
        font-size:13px;
    }

    .camera-controls{
        padding-left:20px;
        padding-right:20px;
    }
}

@media(min-width:740px){
    .driver-camera-stage{
        left:50%;
        right:auto;
        width:min(720px,100%);
        transform:translateX(-50%);
        box-shadow:0 0 0 9999px #050607;
    }
}
