html,
body {
    overflow-x: hidden;
    --map-edge-gap: 16px;
    --leaflet-control-margin: 10px;
}

body.app-splash-active {
    overflow: hidden;
}

#map {
    height: 100vh;
    z-index: 0;
}

.app-splash-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, #314b69 0%, #2a425d 55%, #24384f 100%);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-splash-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-splash-screen__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 35%),
        radial-gradient(circle at bottom right, rgba(28, 203, 255, 0.18), transparent 28%);
}

.app-splash-screen__content {
    position: relative;
    width: min(100%, 440px);
    padding: 42px 28px 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: var(--app-color, #1e2e46);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    text-align: center;
    color: #ffffff;
}

.app-splash-screen__logo-wrap {
    position: relative;
    width: 158px;
    height: 158px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-splash-screen__logo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 158px;
    height: 158px;
    border: 2px solid rgba(87, 224, 221, 0.48);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 0 8px rgba(87, 224, 221, 0.1),
        0 0 30px rgba(87, 224, 221, 0.38);
    animation: splashPulse 2.2s ease-out infinite;
}

.app-splash-screen__logo-ring::before,
.app-splash-screen__logo-ring::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(87, 224, 221, 0.3);
    opacity: 0;
}

.app-splash-screen__logo-ring::before {
    animation: splashPulseEcho 2.2s ease-out infinite;
}

.app-splash-screen__logo-ring::after {
    animation: splashPulseEcho 2.2s ease-out 0.8s infinite;
}

.app-splash-screen__logo-card {
    position: relative;
    width: 126px;
    height: 126px;
    padding: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 244, 249, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.app-splash-screen__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-splash-screen__eyebrow {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.18em;
}

.app-splash-screen__title {
    margin: 0;
    font-size: clamp(1.75rem, 5.2vw, 2.75rem);
    font-weight: 800;
    letter-spacing: 0.12em;
}

.app-splash-screen__app-name {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 3vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.app-splash-screen__subtitle {
    margin: 12px auto 22px;
    max-width: 280px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.96rem;
    line-height: 1.6;
}

.app-splash-screen__loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.app-splash-screen__loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #57e0dd;
    box-shadow: 0 0 18px rgba(87, 224, 221, 0.55);
    animation: splashLoader 1.1s ease-in-out infinite;
}

.app-splash-screen__loader span:nth-child(2) {
    animation-delay: 0.15s;
}

.app-splash-screen__loader span:nth-child(3) {
    animation-delay: 0.3s;
}

.app-splash-screen__status {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.drawer-menu {
    top: 0;
    left: 0;
    position: absolute;
    background-color: white;
    width: 20vw;
    height: 100vh;
    z-index: 2;
    overflow: auto;
}

.drawer-menu-heading {
    background: var(--info);
    color: white;
}

.drawer-menu .drawer-menu-heading {
    background: var(--app-color, var(--info));
}

.open-drawer-menu-button {
    position: absolute;
    z-index: 1;
    top: var(--map-edge-gap);
    left: var(--map-edge-gap);
    background-color: var(--app-color, #1e2e46);
    color: white;
    align-items: center;
    display: block;
    margin-top: 0 !important;
    margin-left: 0 !important;
}

.open-drawer-menu-button:hover,
.open-drawer-menu-button:focus,
.open-drawer-menu-button:active {
    background-color: var(--app-color, #1e2e46);
    color: white;
}

.open-drawer-menu-button i,
.open-drawer-menu-button:hover i,
.open-drawer-menu-button:focus i,
.open-drawer-menu-button:active i {
    color: white;
}

.loading-overlay-section {
    display: none;
    position: absolute;
    z-index: 1000;
    background-color: rgba(245, 245, 245, 0.8);
    width: 100vw;
    height: 100vh;
    text-align: center;
}

.lds-roller {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    /* vendor prefixes omitted due to brevity */
}

.top-right-buttons {
    position: absolute;
    z-index: 1;
    top: var(--map-edge-gap);
    right: var(--map-edge-gap);
    margin-top: 0 !important;
    margin-right: 0 !important;
}

.top-right-buttons > .container {
    padding-left: 0;
    padding-right: 0;
}

.top-right-controls {
    gap: 0.5rem;
}

.top-right-button {
    margin-left: 0 !important;
}

.leaflet-bottom.leaflet-left {
    left: calc(20vw + var(--map-edge-gap) - var(--leaflet-control-margin));
}

.leaflet-right {
    right: calc(var(--map-edge-gap) - var(--leaflet-control-margin));
}

.leaflet-bottom {
    bottom: calc(var(--map-edge-gap) - var(--leaflet-control-margin));
}

.map-type-control.leaflet-control-layers {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
}

.map-type-control.leaflet-control-layers-expanded {
    padding: 0;
    background: transparent;
}

.map-type-control .leaflet-control-layers-toggle,
.map-type-control.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 88px;
    height: 88px;
    border: 3px solid #fff;
    border-radius: 16px;
    background-image: var(--selected-map-thumbnail);
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}

.map-type-layer-icon {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 21px;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 1;
}

.map-type-control .leaflet-control-layers-toggle::after {
    content: "Katmanlar";
    align-self: flex-end;
    width: 100%;
    padding: 6px 6px;
    border-radius: 0 0 13px 13px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    font-size: 12px;
    line-height: 1;
    text-align: center;
}

.map-type-control .leaflet-control-layers-list,
.map-type-control.leaflet-control-layers-expanded .leaflet-control-layers-list {
    position: absolute;
    left: calc(100% + 10px);
    bottom: 0;
    display: grid;
    height: 88px;
    grid-template-columns: repeat(3, 72px);
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    pointer-events: none;
}

.map-type-control .leaflet-control-layers-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 10px;
}

.map-type-control:hover .leaflet-control-layers-list,
.map-type-control.leaflet-control-layers-expanded .leaflet-control-layers-list {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.map-type-control .leaflet-control-layers-base {
    display: contents;
}

.map-type-control .map-type-option {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    cursor: pointer;
}

.map-type-control .map-type-option > span:not(.map-type-thumbnail) {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #202124;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
}

.map-type-control .leaflet-control-layers-selector {
    margin: 0;
}

.map-type-thumbnail {
    display: block;
    width: 72px;
    height: 48px;
    border: 2px solid #fff;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 2px 9px rgba(0, 0, 0, 0.22);
}

.map-type-option:hover .map-type-thumbnail {
    border-color: var(--info);
}

/*Wraperclass for the divicon*/
.user-coordinate-label {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.user-coordinate-point {
    position: absolute;
    background-color: white;
    color: white;
    border-style: solid;
    border-width: 4px;
    border-color: black;
    font-weight: bold;
    width: 32px;
    height: 32px;
    padding: 2.4px;
    bottom: 0;
    margin-bottom: -16px;
    margin-left: -16px;
    border-radius: 50%;
}

.notification-section {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 4;
    background-color: white;
    width: 20vw;
    height: 100vh;
    overflow: auto;
    margin-right: -20vw;
    overflow: auto;
}

@media only screen and (min-device-width: 768px) and (max-width: 1281px) {
    .drawer-menu {
        width: 45vw;
        margin-left: -45vw;
    }

    .notification-section {
        width: 45vw;
        margin-right: -45vw;
    }

    .leaflet-bottom.leaflet-left {
        left: calc(var(--map-edge-gap) - var(--leaflet-control-margin));
    }
}

@media only screen and (max-width: 768px) {
    .app-splash-screen__content {
        padding: 36px 22px 30px;
        border-radius: 24px;
    }

    .app-splash-screen__logo-wrap {
        width: 132px;
        height: 132px;
    }

    .app-splash-screen__logo-card {
        width: 104px;
        height: 104px;
        border-radius: 50%;
    }

    .app-splash-screen__logo-ring {
        width: 132px;
        height: 132px;
    }

    .drawer-menu {
        width: 85vw;
        margin-left: -85vw;
    }

    .notification-section {
        width: 85vw;
        margin-right: -85vw;
    }

    .top-right-buttons {
        right: var(--map-edge-gap);
    }

    .top-right-controls {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .leaflet-bottom.leaflet-left {
        left: calc(var(--map-edge-gap) - var(--leaflet-control-margin));
    }
}

.btn_live {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 1px 15px;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
    border: 1px solid #333;
    transform: translateY(-3px);
}

.live-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: red;
    border-radius: 50%;
    margin-left: 10px;
    position: relative;
}

.live-icon:before {
    content: "";
    display: block;
    position: absolute;
    background-color: red;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: live 2s ease-in-out infinite;
    z-index: -1;
}

.live-refresh-timer {
    --live-refresh-progress: 1turn;
    --live-refresh-accent: var(--app-color, #1e2e46);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        conic-gradient(var(--live-refresh-accent) var(--live-refresh-progress), rgba(30, 46, 70, 0.18) 0),
        rgba(30, 46, 70, 0.08);
    color: var(--live-refresh-accent);
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-4px);
    will-change: background;
}

.live-refresh-timer::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
}

.live-refresh-timer-value {
    position: relative;
    z-index: 1;
    line-height: 1;
}

@keyframes live {
    0% {
        transform: scale(1, 1);
    }

    100% {
        transform: scale(3.5, 3.5);
        background-color: rgba(255, 0, 0, 0);
    }
}

.custom-cluster-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.custom-cluster-icon img {
    width: 24px;
    height: 24px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background: #666666;
    border-radius: 50%;
    animation: bounce 0.6s infinite ease-in-out;
}

.loading-dot.delay-1 {
    animation-delay: 0.2s;
}

.loading-dot.delay-2 {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes splashLoader {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

@keyframes splashPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.75;
    }

    65% {
        transform: translate(-50%, -50%) scale(1.12);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.94);
        opacity: 0.82;
    }
}

@keyframes splashPulseEcho {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    30% {
        opacity: 0.4;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.last-point-pulse-border {
    --pulse-color: red;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: transparent;
    z-index: 1;
}

.last-point-pulse-border::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--pulse-color);
    transform: translate(-50%, -50%) scale(1);
    animation: pulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.6;

    }
}
