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

    /* ----- FIX MudBlazor Dialog scroll freeze on iOS Safari ----- */

    /* 1) Body must NOT be overflow:hidden on iOS */
    body.scroll-locked-no-padding {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* 2) Also ensure html scrolls */
    html.scroll-locked-no-padding {
        overflow-y: hidden !important;
    }

.bg {
    /* The image used */
    background-image: url("../dwvalkommen.webp");
    /* Full height */
    height: 100%;
    /* Center and scale the image nicely */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

a {
    position: relative;
    text-decoration: none;
    color: #0a0d0c;
}

.mud-nav-link,
.mud-nav-link:hover,
.mud-nav-link:focus,
.mud-nav-link:active,
.mud-nav-link:visited,
.mud-nav-item,
.mud-nav-item a {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
}


.hf {
    border: none;
    width: 100%;
    height: 500px;
}

.mud-list-item-icon {
    min-width: 2em !important;
}

.mud-timeline-item .TimelineHistory {
    padding: 5px;
}

.blured {
    backdrop-filter: blur(4px);
}

.mud-table-cell {
    padding: 5px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.arendeRow {
    border: 0px !important;
}

.arendeRowMobile > td, .arendeRowMobile > tr > th {
    border: none;
}


font-face .mud-table-root .mud-table-head {
    display: none !important;
}

.mud-simple-table table * tr > td {
    border-bottom: 0px !important;
    height: 10px !important;
}

.badgeStyleError .mud-theme-dark {
    font-weight: 700;
    font-size: 12px;
    color: var(--mud-palette-error) !important;
    padding: 10px !important;
}

.badgeStyleInfo .mud-theme-dark {
    font-weight: 700;
    font-size: 12px;
    color: var(--mud-palette-info) !important;
    padding: 10px !important;
}

.badgeStyleWarning .mud-theme-dark {
    font-weight: 700;
    font-size: 12px;
    color: var(--mud-palette-warning) !important;
    padding: 10px !important;
}

.badgeStyleNormal .mud-theme-dark {
    font-weight: 700;
    font-size: 12px;
    color: #424242 !important;
    padding: 10px !important;
}

.arendeRow .mud-alert-message {
    padding: 4px 0;
}

.arendeCard .mud-paper {
    background: none !important;
}

.arendeCard .mud-card-header {
    margin-top: 10px !important;
    padding: 0 !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    padding-top: 5px !important;
}

.arendeCard .mud-table-container .mud-icon-root {
    width: 17px !important;
    height: 17px !important;
    margin-right: 9px !important;
}

.AdminChipset .mud-chip.mud-disabled {
    opacity: initial !important;
}

.mud-drawer-content .mud-tooltip-root.mud-tooltip-inline {
    display: block !important;
}

.mud-fab {
    font-size: 11px !important;
}

.mud-timeline-item-dot-inner::after {
    content: "";
    position: absolute;
    display: block;
    top: 10px;
    left: 70px;
    width: 20px;
    height: 2px;
    background-color: var(--mud-palette-divider);
}

.mud-input-outlined-border {
    border-color: var(--mud-palette-appbar-background) !important;
    box-shadow: var(--mud-elevation-25);
}

.number-provider .mud-tooltip-inline {
    gap: initial;
}

.mud-tooltip-inline {
    display: flex !important;
    gap: 5px;
}

:root {
    --building-color: #FF9800;
    --house-color: #0288D1;
    --shop-color: #7B1FA2;
    --warehouse-color: #558B2F;
    --marker-color: #FF5722;
}

/* HTML marker styles */
.marker {
    background-color: #4585F4;
    border: 1px solid black;
    border-radius: 50%;
    color: #FFFFFF;
    padding: 3px 2px;
    width:28px;
    height:32px;
    position: relative;
}


    /* the black “border” tip */
    .marker::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 98%;
        bottom: -8px; /* 1px larger than the fill tip */
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 7px solid transparent; /* tip width + 1px */
        border-right: 7px solid transparent;
        border-top: 12px solid black; /* 1px larger than the fill tip */
    }

    /* the red “fill” tip */
    .marker::after {
        content: "";
        position: absolute;
        left: 50%;
        top:98%;
        bottom: -7px; /* snug inside the black one */
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 6px solid transparent; /* your original tip width */
        border-right: 6px solid transparent;
        border-top: 10px solid var(--marker-color); /* your original tip height/color */
    }


    .marker svg {
        height: 22px;
        background-color: var(--mud-palette-dark);
        border-radius: 50%;
    }



/*
 * Property styles in unhighlighted state.
 */
.property {
    align-items: center;
    background-color: #FFFFFF;
    border-radius: 50%;
    color: #263238;
    display: flex;
    font-size: 14px;
    gap: 15px;
    height: 30px;
    justify-content: center;
    padding: 4px;
    position: relative;
    position: relative;
    transition: all 0.3s ease-out;
    width: 30px;
}

/*    .property::after {
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-top: 9px solid #FFFFFF;
        content: "";
        height: 0;
        left: 50%;
        position: absolute;
        top: 95%;
        transform: translate(-50%, 0);
        transition: all 0.3s ease-out;
        width: 0;
        z-index: 1;
    }*/

    .property .icon {
        align-items: center;
        display: flex;
        justify-content: center;
        color: #FFFFFF;
    }

        .property .icon svg {
            height: 20px;
            width: auto;
        }

    .property .details {
        display: none;
        flex-direction: column;
        flex: 1;
    }

    .property .address {
        color: #9E9E9E;
        font-size: 10px;
        margin-bottom: 10px;
        margin-top: 5px;
    }

    .property .features {
        align-items: flex-end;
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

        .property .features > div {
            align-items: center;
            background: #F5F5F5;
            border-radius: 5px;
            border: 1px solid #ccc;
            display: flex;
            font-size: 10px;
            gap: 5px;
            padding: 5px;
        }

    /*
 * Property styles in highlighted state.
 */
    .property.highlight {
        background-color: #FFFFFF;
        border-radius: 8px;
        box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.2);
        height: 100%;
        padding: 8px 15px;
        width: auto;
    }

        .property.highlight::after {
            border-top: 9px solid #FFFFFF;
        }

        .property.highlight .details {
            display: flex;
        }

        .property.highlight .icon svg {
            width: 50px;
            height: 50px;
        }

    .property .bed {
        color: #FFA000;
    }

    .property .bath {
        color: #03A9F4;
    }

    .property .size {
        color: #388E3C;
    }

    /*
 * House icon colors.
 */
    .property.highlight:has(.fa-house) .icon {
        color: var(--house-color);
    }

    .property:not(.highlight):has(.fa-house) {
        background-color: var(--house-color);
    }

        .property:not(.highlight):has(.fa-house)::after {
            border-top: 9px solid var(--house-color);
        }

    /*
 * Building icon colors.
 */
    .property.highlight:has(.fa-building) .icon {
        color: var(--building-color);
    }

    .property:not(.highlight):has(.fa-building) {
        background-color: var(--building-color);
    }

        .property:not(.highlight):has(.fa-building)::after {
            border-top: 9px solid var(--building-color);
        }

    /*
 * Warehouse icon colors.
 */
    .property.highlight:has(.fa-warehouse) .icon {
        color: var(--warehouse-color);
    }

    .property:not(.highlight):has(.fa-warehouse) {
        background-color: var(--warehouse-color);
    }

        .property:not(.highlight):has(.fa-warehouse)::after {
            border-top: 9px solid var(--warehouse-color);
        }

    /*
 * Shop icon colors.
 */
    .property.highlight:has(.fa-shop) .icon {
        color: var(--shop-color);
    }

    .property:not(.highlight):has(.fa-shop) {
        background-color: var(--shop-color);
    }

        .property:not(.highlight):has(.fa-shop)::after {
            border-top: 9px solid var(--shop-color);
        }


@media (max-width: 641px) {
    .msg {
        flex-direction: column;
    }

    .msg-case {
        border-top: 4px solid var(--mud-palette-tertiary);
        border-left: none !important;
        border-top-right-radius: 0 !important;
        border-bottom-left-radius: 15px;
    }

    .msg-case-inner {
        display: flex;
        border-right: none !important;
        border-bottom: 3px solid var(--mud-palette-warning);
    }

    .mud-table-pagination-caption {
        display: none;
    }
}


.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    position: fixed;
    margin: 20vh auto;
    z-index: 10000;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #2b2f36 0%, #1b1f24 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: modalSlideIn 0.3s ease-out;
}

#components-reconnect-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: backdropFadeIn 0.3s ease-out;
}

.components-reconnect-container {
    padding: 32px 40px;
    min-width: 320px;
    max-width: 420px;
    text-align: center;
    color: #ffffff;
}

.components-rejoining-animation {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    height: 40px;
    align-items: center;
}

    .components-rejoining-animation div {
        width: 12px;
        height: 12px;
        background: #ffffff;
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }

        .components-rejoining-animation div:nth-child(1) {
            animation-delay: -0.32s;
        }

        .components-rejoining-animation div:nth-child(2) {
            animation-delay: -0.16s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.components-reconnect-container p {
    margin: 16px 0;
    font-size: 16px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

p.components-reconnect-first-attempt-visible {
    font-size: 18px;
    font-weight: 600;
}

p.components-reconnect-first-attempt-visible::before {

    content: '';
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    background-color: #ba2644; /* ← YOU control the color here */
    animation: float 2s ease-in-out infinite;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='2'/%3E%3Cpolygon points='14,14 17,7 10,10' fill='black'/%3E%3Cpolygon points='10,10 7,17 14,14' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='2'/%3E%3Cpolygon points='14,14 17,7 10,10' fill='black'/%3E%3Cpolygon points='10,10 7,17 14,14' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

p.components-reconnect-failed-visible::before {

    content: '';
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    background-color: #ba2644; /* ← YOU control the color here */
    animation: float 2s ease-in-out infinite;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 22h20L12 2z' fill='black'/%3E%3Crect x='11' y='9' width='2' height='6' fill='white'/%3E%3Ccircle cx='12' cy='18' r='1.2' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L2 22h20L12 2z' fill='black'/%3E%3Crect x='11' y='9' width='2' height='6' fill='white'/%3E%3Ccircle cx='12' cy='18' r='1.2' fill='white'/%3E%3C/svg%3E");
}

p.components-pause-visible::before {

    content: '';
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    background-color: #ba2644; /* ← YOU control the color here */
    animation: float 2s ease-in-out infinite;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='4' width='4' height='16' fill='black'/%3E%3Crect x='14' y='4' width='4' height='16' fill='black'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='4' width='4' height='16' fill='black'/%3E%3Crect x='14' y='4' width='4' height='16' fill='black'/%3E%3C/svg%3E");
}

#components-seconds-to-next-attempt {
    display: inline-block;
    min-width: 20px;
    font-weight: 700;
    color: #ffd93d;
}

#components-reconnect-button,
#components-resume-button {
    margin: auto;
    padding: 12px 24px;
    background: #ffffff;
    color: #313f7f;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    #components-reconnect-button:hover,
    #components-resume-button:hover {
        background: #f0f0f0;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    #components-reconnect-button:active,
    #components-resume-button:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

button::before,
button::after {
    content: none !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg) rotateZ(-15deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg) rotateZ(8deg);
    }
}

@media (max-width: 480px) {
    .components-reconnect-container {
        padding: 24px 28px;
        min-width: 280px;
    }

    .components-reconnect-container p {
        font-size: 15px;
    }
}

/* Base: hidden */
#offline-modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

/* Center modal */
    #offline-modal .offline-modal__content {
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: #ba2644;      
        border-radius: 6px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        margin: 16px 0;
        font-size: 16px;
        line-height: 1.5;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
        padding: 32px 40px;
        min-width: 320px;
        max-width: 420px;
        text-align: center;
        color: #ffffff;
    }

/* Activated state */
body.is-offline #offline-modal {
    display: block;
}

/* Optional: prevent interaction */
body.is-offline {
    overflow: hidden;
}

/* Make the toolbar area grow with its content */
.ext-users-grid .mud-toolbar {
    height: auto !important;
    min-height: unset !important;
    align-items: stretch;
}

/* If MudDataGrid wraps toolbar in an extra container, prevent clipping/overlap */
.ext-users-grid .mud-data-grid-toolbar,
.ext-users-grid .mud-table-toolbar {
    height: auto !important;
    min-height: unset !important;
    overflow: visible !important;
}

.userCard
{
    background: none !important;
}


/* ── MudChat replacement components ── */
.mud-chat         { display: flex; margin: 8px 0; }
.mud-chat-start   { justify-content: flex-start; }
.mud-chat-end     { justify-content: flex-end; }
.mud-chat-content { display: flex; flex-direction: column; max-width: calc(75% - 21px); min-width: 0; margin-left: 4px; margin-right: 21px; }
.mud-chat-end .mud-chat-content { margin-left: 21px; margin-right: 0; }
.mud-chat-header  { display: flex; align-items: baseline; gap: 5px; padding: 0 4px 3px; flex-wrap: nowrap; }
.mud-chat-name    { font-weight: 600; font-size: 0.78rem; flex-shrink: 0; }
.mud-chat-time    { font-size: 0.68rem; opacity: 0.55; font-style: italic; white-space: nowrap; flex-shrink: 0; }
.mud-chat-bubble  { border-radius: 12px; padding: 8px 12px; word-break: break-word; overflow-wrap: anywhere; font-size: 0.875rem; line-height: 1.5; }
.mud-chat-bubble-dense { padding: 5px 10px; }
.mud-chat-footer  { padding: 4px 0 2px; display: flex; flex-wrap: wrap; gap: 4px; }
.mud-chat-footer .mud-chip           { max-width: 100%; min-width: 0; margin: 0 !important; white-space: normal !important; height: auto !important; min-height: 24px; padding-block: 3px; }
.mud-chat-footer .mud-chip > .mud-chip-content { height: auto; align-items: flex-start; white-space: normal; flex-wrap: wrap; }
.mud-chat-footer .mud-chip-label     { white-space: normal !important; word-break: break-word; overflow: visible !important; text-overflow: unset !important; }
.mud-chat-footer .mud-chip-color-info.mud-chip-filled    { background: color-mix(in srgb, var(--mud-palette-info) 40%, white) !important; color: rgba(0,0,0,0.75) !important; }
.mud-chat-footer .mud-chip-color-primary.mud-chip-filled { background: color-mix(in srgb, var(--mud-palette-primary) 40%, white) !important; color: rgba(0,0,0,0.75) !important; }
