html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

#map-title {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 13px 18px;

    background: rgba(235, 239, 237, 0.9);
    border-radius: 19px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.16),
        0 1px 2px rgba(0, 0, 0, 0.08);

    color: #4a4a4a;
    font-family: Arial, sans-serif;

    pointer-events: none;
}

.map-title-main {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.map-title-subtitle {
    margin-top: 5px;

    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;

    opacity: 0.8;
}

#map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;

    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.map-control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    padding: 5px;

    background: rgba(235, 239, 237, 0.9);
    border-radius: 28px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.16),
        0 1px 2px rgba(0, 0, 0, 0.08);
}

.map-control-button {
    position: relative;

    width: 62px;
    height: 62px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.18),
        0 1px 2px rgba(0, 0, 0, 0.08);

    color: #333;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}

.map-control-button:hover {
    background: #fff;
}

.map-control-button:active {
    transform: scale(0.96);
}

/* Tooltip */
.map-control-button::after {
    content: attr(data-tooltip);

    position: absolute;
    top: 50%;
    right: calc(100% + 14px);
    transform: translateY(-50%);

    padding: 10px 14px;

    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.16);

    color: #4a4a4a;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.15s ease,
        visibility 0.15s ease;
}

.map-control-button:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Compass */
.compass-icon {
    width: 36px;
    height: 40px;
}

.compass-north {
    fill: #4a4a4a;
}

.compass-south {
    fill: #b8b8b8;
}

/* Rotate / tilt icons */
.control-icon {
    width: 31px;
    height: 31px;

    fill: none;
    stroke: #666;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.view-toggle-button {
    font-size: 20px;
    font-weight: 600;
}

/* Map loading indicator */
.map-loading {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: rgba(245, 248, 246, 0.98);

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.4s ease,
        visibility 0.4s ease;

    pointer-events: all;
}

.map-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-loading-image {
    display: block;

    width: 420px;
    max-width: 70vw;
    height: auto;

    mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            transparent 100%
        );

    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent 0%,
            transparent 100%
        );

    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
}

.map-loading-title {
    margin-top: 6px;

    color: #425d2e;
    font-family:
        "Arial Rounded MT Bold",
        "Trebuchet MS",
        Arial,
        sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.map-loading.hidden {
    opacity: 0;
    visibility: hidden;

    pointer-events: none;
}