:root {
    --spacing: 8px;
    --spacing-0-5: calc(var(--spacing) / 2);
    --spacing-1: var(--spacing);
    --spacing-1-5: calc(var(--spacing) * 1.5);
    --spacing-2: calc(var(--spacing) * 2);
    --spacing-3: calc(var(--spacing) * 3);
    --spacing-4: calc(var(--spacing) * 4);
    --spacing-5: calc(var(--spacing) * 5);
    --spacing-6: calc(var(--spacing) * 6);
    --spacing-6-5: calc(var(--spacing) * 6.5);
    --spacing-8: calc(var(--spacing) * 8);
    --spacing-9: calc(var(--spacing) * 9);
    --spacing-fixed-bottom: var(--spacing-9);

    --prompt-width: calc(var(--spacing) * 50);

    --dsw-color: rgb(42, 168, 52);
    --dsw-color2: rgb(42, 168, 52);
    --dsw-color3: rgb(0, 128, 153);
}

html, body {
}

body #bodywrapper.loaded {
    opacity: 1 !important;
    visibility: visible !important;
}

.main {
    padding-top: 48px;
    min-height: 100dvh;
}

nav .w3-bar-block {
    min-height: calc(100vh - 86px);
}

.dsw-header-mobil {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertikal zentrieren */
    padding: 10px; /* Falls nötig, für Abstand */
}

.page-title {
    padding-bottom: 48px;
}

.page-title h2 {

}

.section{
    background-color: #fafafa;
    padding: 8px 8px 16px 8px;
    margin: 16px 0;
}

.section > p {
    font-weight: bold;
}

/**
BUTTONS
 */

button.w3-button {
    background-color: silver;
}

.save-btn{
    text-align: center;
    display: block;
    width: 180px;
    float: right;
}

/**
ICONS
 */
i.fa {
    padding-left: 8px;
}

/***
FORM INPUT ETC
 */
.icon-input-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.icon-input-icon {
    width: 80px;
    text-align: center;
}

.icon-input-icon i {
    color: rgb(42, 168, 52);
}

.icon-input-input {
    flex: 1;
    background-color: #f1f1f1;
    padding: 8px;
}

.icon-input-input label {
    font-weight: bold;
}

.icon-input-input select {
    background-color: #fff;
    padding: 8px;
}

.input-wrapper {
    position: relative;
    margin-top: 1.5rem;
}

.input-wrapper input, .input-wrapper textarea {
    width: 100%;
    padding: 12px 8px 12px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.input-wrapper label {
    position: absolute;
    left: 3px;
    top: 12px;
    background: white;
    padding: 0 4px;
    color: #999;
    font-size: 12px;
    transition: 0.2s ease all;
    pointer-events: none;
    white-space: nowrap;

}

.input-wrapper.focus > label,
.input-wrapper input:not(:placeholder-shown) + label,
.input-wrapper textarea:not(:placeholder-shown) + label {
    top: -18px;
    left: 0;
    font-size: 12px;
    color: #2196F3;
    background-color: transparent;
}

.input-wrapper textarea {
    font-size: 14px;
    min-height: 250px;
}

/**
LAYOUT
 */
.layout {
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
}

.layout__body {
    flex: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.layout__widget {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/**
CARD
 */

.card {
    border-radius: 5px;
}

.login-card {

}

.card > main {
    height: 100%;
}

.card section {
    width: var(--prompt-width);
}

.card section header {
    padding: var(--spacing-5) var(--spacing-5) var(--spacing-3);
}

.card section header .prompt-logo {
    width: auto !important;
    height: 80px !important;
    position: static !important;
    margin: auto !important;
    padding: 0 !important;
    background-color: transparent !important;
    background-position: center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-image: url("/public/assets/images/DSW_Logo_re_rgb_1500px.png");
}

.card .card-content {
    padding: 0 var(--spacing-5) var(--spacing-5);
}

/***
BREADCRUMB
 */
.breadcrumb {

}

.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.breadcrumb li {
    margin-right: 10px;
}

.breadcrumb li::after {
    content: " / ";
    margin-left: 10px;
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    text-decoration: none;
    color: rgb(42, 168, 52);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/**
FIXED SUBMENU
 */
.fixed + form, .fixed + .page_invoice, .fixed + .table-wrapper {
    padding-bottom: var(--spacing-fixed-bottom);
}

.fixed {
    position: fixed;
    z-index: 1;
    width: calc(100% - 380px);
    background-color: white;
    padding: var(--spacing-2) var(--spacing-1);;
}

.fixed button {
    margin: 0 !important;
}

.fixed.bottom {
    bottom: 0;
}

/**
TABLE
 */

.table-wrapper {
    height: calc(100vh - 280px);
}

table thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 2;
    background: black;
}

table thead th {
    position: relative;
    border: 1px solid black;
    background-color: #3a3a3a;
    z-index: 4;
    color: white;
}

.table-search-bar {
    background-color: #3a3a3a;
    color: white;
}

/**
USABILITY ANIMATIONS LOADING ANIMATIONS
 */

.qanda-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    margin: auto;
}

.tooltip-a {

}

.tooltip-q {
    font-weight: bold;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.context-menu {
    display: none;
    position: absolute;
    z-index: 5;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    min-width: 120px;
}

.context-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
}

.context-menu button:hover {
    background: #f0f0f0;
}

.context-menu i {
    margin-right: 8px;
}

/** INVOICE OVERLAY IN TABLE TO VIEW PDF
 */
#invoiceOverlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
    padding: 0;
}

#invoiceOverlay > button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 11;
}

#invoiceIframe {
    width: 100%;
    height: 100vh;
    border: none;
}

#tableBlocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6); /* leichtes Weiß */
    z-index: 9; /* unterhalb des Overlays, aber über der Tabelle */
    display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#invoiceOverlay.show {
    animation: slideInRight 0.3s ease-out forwards;
}

#invoiceOverlay.hide {
    animation: slideOutRight 0.3s ease-in forwards;
}

/** LOADER ANIMATION **
 */
/* HTML: <div class="loader"></div> */
.loader {
    height: 4px;
    width: 130px;
    --c: no-repeat linear-gradient(#6100ee 0 0);
    background: var(--c), var(--c), #d7b8fc;
    background-size: 60% 100%;
    animation: l16 3s infinite;
}

.loader-large {
    width: 45px;
    animation: l6-large 1s infinite linear alternate;
}

.loader-center {
    margin: 0 auto;
    position: relative;
    top: 50vh;
}

.loader-show {
    display: block;
}

.loader-hide {
    display: none;
}

button .loader {
    top: 0;
    margin: 8px 8px;
}


@keyframes l16 {
    0% {
        background-position: -150% 0, -150% 0
    }
    66% {
        background-position: 250% 0, -150% 0
    }
    100% {
        background-position: 250% 0, 250% 0
    }
}


/* FETCH PROGRESS OVERLAY */

#fetchProgressOverlay {
    position: fixed;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
    padding: 0;
    overflow-y: scroll;
}
#fetchProgressOverlay.show {
    animation: slideInRight 0.3s ease-out forwards;
}

#fetchProgressOverlay.hide {
    animation: slideOutRight 0.3s ease-in forwards;
}
#fetchObject div {
    margin-bottom: 8px;
    font-size: 1rem;
}
