﻿:root {
    --wuerth-cd-red: #CC0000;
    --wuerth-cd-green: #008448;
    --wuerth-cd-yellow: #FDC300;
    --wuerth-cd-dark-red: #90112C;
    --wuerth-cd-blue: #004774;
    --wuerth-cd-cyan: #0093DD;
    --extended-progress-ring-text-color: var(--neutral-foreground-rest);
    --extended-progress-ring-text-size: 24px;
    --extended-progress-ring-progress-foreground-color: var(--accent-base-color);
    --extended-progress-ring-progress-background-color: var(--neutral-fill-layer-rest);
    --extended-progress-ring-progress-size: 128px;
    --app-menu-tile-border-color: var(--accent-base-color);
    --app-menu-tile-icon-color: var(--accent-base-color);
    --multi-color-progress-ring-inner-circle-background-color: var(--neutral-fill-layer-rest);
    --multi-color-progress-ring-text-color: var(--neutral-foreground-rest);
    --multi-color-progress-ring-text-size: 24px;
    --multi-color-progress-ring-progress-size: 128px;
    --multi-color-progress-ring-inner-circle-size: 113px;
    --app-base-tile-border-color: transparent;
    --app-base-tile-icon-color: var(--neutral-foreground-rest);
    --app-sub-header-icon-color: var(--neutral-foreground-rest);
    --app-default-base-radius: 12px;
    --app-default-card-radius: 12px;
    --app-menu-tile-card-rgba-color-1: rgb(from var(--accent-base-color) r g b / 0.1);
    --app-menu-tile-card-rgba-color-2: rgb(from var(--accent-base-color) r g b / 0.2);
    --app-menu-tile-card-rgba-color-3: rgb(from var(--accent-base-color) r g b / 0.3);
    --app-tile-stop-color: var(--neutral-foreground-rest);
    --text-field-large-icon-color: var(--neutral-foreground-rest);
}

* {
    touch-action: manipulation; 
}

.brand-container {
    height: 47px !important;
}

.application-text {
    color: var(--accent-base-color) !important;
}

.app-button-large {
    font-size: 30px;
    text-align: center;
    height: 50px;
}

.app-button-large::part(control) {
    text-align: center;
}

.app-button-normal {
    font-size: 20px;
    text-align: center;
    height: 40px;
}

.app-button-normal::part(control) {
    text-align: center;
}

.app-button-square {
    font-size: 24px;
    text-align: center;
    height: 40px;
    width: 40px;
}

.app-button-square::part(control) {
    text-align: center;
}

.app-icon-button {
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-icon-button:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.app-icon-button:active {
    transform: scale(0.95); 
    opacity: 0.6;
}

.app-icon-button svg {
    display: inline-block; 
    transition: inherit; 
}

.app-fluent-text-field-large {
    width: 100%;
    font-size: 24px;
    text-align: center;
    padding: 10px;
}

.app-fluent-text-field-large::part(control) {
    height: 100%;
    text-align: center;
}

.app-fluent-text-field-large::part(control)::placeholder {

}

.app-fluent-text-field-large::part(root) {
    border: 2px solid var(--neutral-foreground-rest);
    border-radius: var(--app-default-base-radius);
    height: 80px;
    width: 100%;
    text-align: center;
}

.app-fluent-text-field-large::after {
    display: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.app-fluent-text-field-spinner {
    display: inline-block;
    transition: transform 0.3s ease;
    animation: spin 1s linear infinite;
}

.app-fluent-select-large {
    width: 100%;
    text-align: center;
    /*padding: 10px;*/
}

.app-fluent-select-large::part(control) {
    width: 100%;
    height: 80px;
    line-height: unset;
    text-align: center;
    font-size: 30px;
}

.app-fluent-select-large::part(start) {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='currentColor' class='bi bi-lightbulb' viewBox='0 0 16 16'%3E%3Cpath d='M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13a.5.5 0 0 1 0 1 .5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1 0-1 .5.5 0 0 1 0-1 .5.5 0 0 1-.46-.302l-.761-1.77a2 2 0 0 0-.453-.618A5.98 5.98 0 0 1 2 6m6-5a5 5 0 0 0-3.479 8.592c.263.254.514.564.676.941L5.83 12h4.342l.632-1.467c.162-.377.413-.687.676-.941A5 5 0 0 0 8 1'/%3E%3C/svg%3E");
    background: var(--accent-base-color);
    background-size: contain;
    background-repeat: no-repeat;
    width: 48px;
    height: 48px;
    margin-right: 12px;
    margin-left: 6px;
}

.app-fluent-select-large fluent-option {
    height: 80px !important;
}

.app-fluent-select-large-click-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.app-fluent-select-large-option-content {
    position: relative;
    z-index: 2;
}

.extended-progress-ring-container {
    position: relative;
    display: inline-block;
}

.extended-progress-ring-progress::part(determinate) {
    fill: var(--extended-progress-ring-progress-background-color);
    stroke: var(--extended-progress-ring-progress-foreground-color) !important;
}

.extended-progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--extended-progress-ring-text-size);
    color: var(--extended-progress-ring-text-color);
    font-weight: bold;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.ellipsis-label {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-menu-tile-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.app-menu-tile-card {
    cursor: pointer;
    margin: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 280px;
    height: 280px;
    padding: 16px;
    border-radius: var(--app-default-base-radius);
    border: 2px solid var(--app-menu-tile-border-color);
    background-color: var(--neutral-fill-layer-rest);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.app-menu-tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, var(--app-menu-tile-card-rgba-color-1) 0%, transparent 50%);
    z-index: 0;
    transition: background 0.3s ease;
}

.app-menu-tile-card:not(.disabled):hover .app-menu-tile-overlay {
    background: radial-gradient(circle at top left, var(--app-menu-tile-card-rgba-color-2) 0%, transparent 50%);
}

.app-menu-tile-card:not(.disabled):active .app-menu-tile-overlay {
    background: radial-gradient(circle at top left, var(--app-menu-tile-card-rgba-color-3) 0%, transparent 50%);
}

.app-menu-tile-card.disabled .app-menu-tile-overlay {
    background: none; /* Kein Overlay für deaktivierte Karten */
}

.app-menu-tile-card.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(50%);
    background: linear-gradient(135deg, #e5e5e5 0%, #d5d5d5 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
}

.app-menu-tile-card.loading {
    opacity: 0.4;
}

.app-menu-tile-card svg {
    z-index: 1;
    transition: transform 0.3s ease;
}

.app-menu-tile-card:not(.disabled):hover svg {
    transform: scale(1.1);
}

.app-menu-tile-card:not(.disabled):active svg {
    --app-menu-tile-icon-color: var(--neutral-fill-layer-rest);
}

.app-menu-tile-card:active {
    transform: scale(0.95);
    --menu-tile-icon-color: var(--neutral-fill-layer-rest);
    background-color: var(--app-menu-tile-border-color);
}

.app-menu-tile-card .app-menu-tile-text {
    margin-top: 8px;
    font-size: 24px;
    color: var(--neutral-foreground-rest);
}

.app-menu-tile-card:active .app-menu-tile-text {
    color: var(--neutral-fill-layer-rest);
}

.app-menu-tile-spinner {
    animation: app-menu-tile-spinner-rotate 2s linear infinite;
}

@keyframes app-menu-tile-spinner-rotate {
    100% {
        transform: rotate(360deg);
    }
}

.multi-color-progress-ring {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.multi-color-progress-ring-inner-circle {
    width: var(--multi-color-progress-ring-inner-circle-size);
    height: var(--multi-color-progress-ring-inner-circle-size);
    background: var(--multi-color-progress-ring-inner-circle-background-color);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-color-progress-ring-text {
    font-size: var(--multi-color-progress-ring-text-size);
    font-weight: bold;
    color: var(--multi-color-progress-ring-text-color);
}

.multi-color-progress-ring-tooltip {
    background-color: var(--neutral-fill-layer-rest);
    color: var(--neutral-foreground-rest);
    padding: 10px;
    border-radius: 2px;
    border: 1px solid var(--accent-base-color);
    font-size: 14px;
    z-index: 333;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.multi-color-progress-ring-tooltip {
    transition: opacity 0.2s ease-in-out;
    opacity: 1;
}

.multi-color-progress-ring-tooltip[style*="display: none"] {
    opacity: 0;
}

.multi-color-progress-ring-tooltip table {
    width: 100%;
    color: var(--neutral-foreground-rest);
    border-collapse: collapse;
}

.multi-color-progress-ring-tooltip td {
    vertical-align: middle;
}

.app-base-tile-card {
    cursor: pointer;
    padding: 16px;
    border-radius: var(--app-default-base-radius);
    border: 2px solid var(--app-base-tile-border-color);
    background-color: var(--neutral-layer-2);
}

.app-base-tile-card:active {
    color: var(--neutral-fill-layer-rest);
    --app-base-tile-icon-color: var(--neutral-fill-layer-rest);
    background-color: var(--app-base-tile-border-color);
}

.app-base-tile-card:active svg {
    --app-base-tile-icon-color: var(--neutral-fill-layer-rest);
}

.app-base-tile-low-card {
    cursor: pointer;
    padding: 0px;
    border-radius: var(--app-default-base-radius);
    border: 2px solid var(--app-base-tile-border-color);
    background-color: var(--neutral-layer-1);
}

.app-base-tile-low-card:active {
    color: var(--neutral-fill-layer-rest);
    --app-base-tile-icon-color: var(--neutral-fill-layer-rest);
    background-color: var(--app-base-tile-border-color);
}

.app-base-tile-low-card:active svg {
    --app-base-tile-icon-color: var(--neutral-fill-layer-rest);
}

.app-base-tile-list-card {
    cursor: pointer;
    padding: 16px;
    border-radius: var(--app-default-base-radius);
    border: 2px solid var(--app-base-tile-border-color);
    background-color: var(--neutral-fill-layer-rest);
}

.app-base-tile-list-card:active {
    color: var(--neutral-fill-layer-rest);
    --app-base-tile-icon-color: var(--neutral-fill-layer-rest);
    background-color: var(--app-base-tile-border-color);
}

.app-base-tile-list-card:active svg {
    --app-base-tile-icon-color: var(--neutral-fill-layer-rest);
}

.app-page-card {
    padding-top: 4px;
    padding-right: 16px;
    padding-left: 16px;
    padding-bottom: 4px;
    border-radius: var(--app-default-card-radius);
    background-color: var(--neutral-fill-layer-rest);
    border: 2px solid var(--app-base-tile-border-color);
}

.app-page-sub-card {
    text-align: center;
    padding-top: 4px;
    padding-right: 16px;
    padding-left: 16px;
    padding-bottom: 4px;
    border-radius: var(--app-default-card-radius);
    background-color: var(--neutral-fill-layer-rest);
    border: 1px solid var(--app-base-tile-border-color);
}

.app-page-sub-card-no-border {
    text-align: center;
    padding: 16px;
    background-color: var(--neutral-fill-layer-rest);
    border: none;
    box-shadow: none;
}

.layout-nomenu {
    overflow: hidden;
}

.device-dialog-button {
    font-size: 18px;
    text-align: center;
    max-width: 500px;
    height: 50px;
}

.device-dialog-button::part(control) {
    text-align: center;
    white-space: break-spaces;
}

.app-base-tile-swipe-container {
    position: relative;
    overflow: hidden;
    touch-action: pan-y; /* no scroll during swipe */
    width: 100%;
    box-shadow: var(--elevation-shadow-card-rest);
    border-radius: var(--app-default-base-radius);
    border: none;
}

.app-base-tile-swipe-card {
    cursor: pointer;
    padding: 16px;
    background-color: var(--neutral-layer-2);
    position: relative;
    z-index: 2;
    border-top-right-radius: var(--app-default-base-radius);
    border-bottom-right-radius: var(--app-default-base-radius);
    border-top-left-radius: var(--app-default-base-radius);
    border-bottom-left-radius: var(--app-default-base-radius);
    transition: transform 0.3s ease-out;
    width: 100%;
}

.app-base-tile-swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 330px; /* Total width for three 110px buttons */
    display: flex;
    flex-direction: row;
    z-index: 1;
    border-top-right-radius: var(--app-default-base-radius);
    border-bottom-right-radius: var(--app-default-base-radius);
}

.app-base-tile-swipe-card.swiped-open {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.app-base-tile-swipe-action {
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    gap: 4px;
}

.app-base-tile-swipe-action span {
    white-space: normal; 
    text-align: center;
    line-height: 1.2;
    max-width: 80%; 
}

.app-base-tile-swipe-action.action1 {
    background-color: #ff9500;
}

.app-base-tile-swipe-action.action2 {
    background-color: var(--wuerth-cd-cyan);
}

.app-base-tile-swipe-action.cancel {
    background-color: #8e8e93; 
}

.page-container {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
}

.layout-pull-to-refresh {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    grid-area: content;
    min-height: 100%;
}

.layout-pull-to-refresh [part="tip"] {
    background: transparent !important;
    box-shadow: none !important;
}

.tile-wrapper:not(:first-child) {
    padding-top: 16px;
}

.error-container {
    padding: 12px 16px;
    border-left: 4px solid #f44336;
    background-color: #fdecea;
    color: #b71c1c;
    border-radius: 8px;
    font-family: system-ui, sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
    width: 100%;
}
.wrap-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.grid-item-center-start {
    align-content: center;
    text-align: start;
}

.grid-item-center {
    align-content: center;
}

.grid-item-center-end {
    align-content: center;
    text-align: end;
}

.app-base-tile-noselect * {
    user-select: none;
}

.scroll-tile-grid {
    touch-action: pan-y;
    overflow-y: auto;
    width: 100%;
}

.scroll-tile-grid > div {
    touch-action: pan-y;
    overflow-y: auto;
}

.header-item-icon:focus {
    outline: none !important; 
}

.non-default {
    font-weight: bold;
    color: #d13438 !important;
}

.workplace-accordion {
    width: 60%;
    border: none;
}

.workplace-accordion-item {
    font-size: 16px;
    font-weight: bold;
    border: none;
}

.workplace-accordion-item::part(button) {
    position: relative;
    border: none;
    padding-bottom: 4px;
    text-align: center;
}

.workplace-accordion-item::part(button)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0; 
    border-bottom: 2px dotted var(--accent-base-color);
}

.workplace-readonly-listbox {
    pointer-events: none;
    opacity: 0.85;
    user-select: none;
    border: none;
}

.app-information-box {
    background-color: var(--neutral-layer-1); 
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--app-default-base-radius);
    padding: 16px 24px;
    width: fit-content;
    margin: 8px auto;
    backdrop-filter: blur(4px);
    box-sizing: border-box;
}

@media (prefers-color-scheme: light) {
    .app-information-box {
        background-color: rgba(0, 0, 0, 0.04);
        border-color: rgba(0, 0, 0, 0.12);
    }
}