/* Base rules taken from Web/wwwroot/css/site.css so both apps look the same. */

html, body {
    font-family: 'Segoe UI Semibold', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f6f6f6;
    width: 100%;
    min-height: 100%;
}

a, .btn-link {
    color: #0366d6;
    cursor: pointer;
}

.card, .btn, .form-control {
    border-radius: 0;
}

.btn-primary {
    color: #fff;
    background-color: #6264a7;
    border-color: #6264a7;
}

.btn-primary:hover, .btn-primary.focus {
    background-color: #9FA8DA;
    border-color: #9FA8DA;
}

.middle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.Line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label {
    color: #909090;
}

.High {
    color: #FF0000;
}

.Normal {
    color: #5FA71D;
}

.Low {
    color: #909090;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.filter-text {
    color: #6264a7;
    font-size: 15px;
}

.notifier-text {
    font-size: 13px;
}

.not-active, .disabled-button {
    pointer-events: none;
    cursor: default;
    opacity: 0.35;
}

.toolbar-button {
    font-size: 17px;
    border: none;
    cursor: pointer;
    background: rgba(0,0,0,0.0);
    box-shadow: none;
    color: #6264a7;
}

    .toolbar-button:hover, .toolbar-button:focus {
        color: #9FA8DA;
        background: rgba(0,0,0,0.0);
        box-shadow: none;
    }


#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Layout Blank */

.login-clean {
    padding: 16px 8px;
}

    .login-clean form {
        max-width: 380px;
        width: 100%;
        margin: 0 auto;
        background-color: #FFFFFF;
        padding: 32px 24px;
        border-radius: 16px;
        color: #505e6c;
        box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    }

    .login-clean .illustration {
        text-align: center;
        padding: 0 0 20px;
    }

    .login-clean form .form-control {
        background: #FFFFFF;
        border: none;
        border-bottom: 1px solid #dfe7f1;
        border-radius: 0;
        box-shadow: none;
        outline: none;
        color: inherit;
        text-indent: 8px;
        height: 42px;
    }

/* Photos */

.page {
    max-width: 640px;
    padding-top: 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* Large target: usable with one hand / gloves on a ladder */
.capture.k-button {
    width: 100%;
    height: 64px;
    font-size: 18px;
}

.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.photo {
    position: relative;
    background: #ffffff;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    padding: 4px;
}

    .photo img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        display: block;
    }

.photo-label {
    font-size: 11px;
    color: #818181;
    margin-top: 2px;
}

.photo-state {
    position: absolute;
    left: 8px;
    top: 8px;
    font-weight: bold;
    background: rgba(255,255,255,0.85);
    padding: 0 6px;
}

.photo-remove {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    color: #ffffff !important;
    background: rgba(70,71,117,0.75);
    text-decoration: none !important;
}

/* Context selection */

.context-clear.k-button, .context-refresh.k-button {
    height: 32px;
    min-width: 32px;
    padding: 0 6px;
    line-height: 1;
}

.context-clear.k-button {
    font-size: 15px;
    color: #818181;
}

.context-details {
    background: #ffffff;
    box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
    padding: 8px 12px;
    font-size: 14px;
}

.context-field {
    display: flex;
    flex-direction: row;
    padding: 2px 0;
}

.context-label {
    flex: 0 0 110px;
    color: #818181;
}

.context-value {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #2d2d30;
}

/* Page blocked while the contexts load */

.page-loader .k-loader-container {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

/* Camera */

.camera-window .k-window-content {
    padding: 0;
    overflow: hidden;
    background: #000000;
}

.camera {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000000;
}

    .camera video, .camera .preview-image {
        flex: 1;
        min-height: 0;
        width: 100%;
        object-fit: contain;
        background: #000000;
    }

/* Pending photos are uploaded manually → must not be overlooked */
.pending {
    border-left: 4px solid #FF9100;
    padding-left: 8px;
}

    .pending .filter-text {
        color: #2d2d30;
        font-weight: 600;
    }

.camera-notice {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 30%;
    text-align: center;
    color: #ffffff;
}

.camera-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
}

.camera-count {
    width: 80px;
    color: #ffffff;
    font-size: 14px;
}

/* Large round shutter: usable with one hand / gloves */
.camera-shutter {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: #6264a7;
    padding: 0;
}

    .camera-shutter:active {
        transform: scale(0.92);
    }

    .camera-shutter:disabled {
        opacity: 0.5;
    }

    .camera-shutter.busy {
        background: #ffffff;
    }

/* Loader (site.css) */

.loading-section {
    text-align: center;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.loader-dot {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background-color: #6264a7;
    display: inline-block;
    animation: grow 2.1s infinite ease-in-out both;
}

    .loader-dot.dot1 {
        animation-delay: -0.96s;
    }

    .loader-dot.dot2 {
        animation-delay: -0.48s;
    }

@keyframes grow {
    0%, 80%, 100% {
        transform: scale(0)
    }

    40% {
        transform: scale(1.0)
    }
}
