/* flowDocs⁺ workpaper styles */

.workpaper-tabs {

    max-width: 720px;

}

#dokumentePage .workpaper-page-head {
    display: grid;
    grid-template-columns: max-content minmax(300px, 430px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 13px;
    margin-bottom: 14px !important;
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    box-shadow: var(--fd-shadow);
}

#dokumentePage .workpaper-page-head .topbar {
    margin: 0;
}

#dokumentePage .workpaper-page-head .topbar-title h2 {
    margin: 0;
    white-space: nowrap;
}

#dokumentePage .workpaper-page-head .workpaper-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    width: 100%;
    margin: 0 !important;
}

#dokumentePage .workpaper-header-slot {
    min-width: 0;
}

#dokumentePage .workpaper-header-slot .workpaper-header-card {
    display: none !important;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#dokumentePage .workpaper-header-slot .workpaper-header-card.is-active {
    display: flex !important;
}

#dokumentePage .workpaper-header-slot .workpaper-title {
    min-width: 0;
    gap: 10px;
}

#dokumentePage .workpaper-header-slot .workpaper-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 18px;
}

#dokumentePage .workpaper-header-slot .workpaper-title > div:last-child {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

#dokumentePage .workpaper-header-slot .workpaper-title h2 {
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
}

#dokumentePage .workpaper-header-slot .topbar-subtitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#dokumentePage .workpaper-header-actions {
    margin-left: auto;
    min-width: 0;
    flex-wrap: nowrap;
}

#dokumentePage .workpaper-pane.is-active,
#flowCalcContent {
    margin-top: 0;
}

.workpaper-pane {

    display: none;

}

.workpaper-pane.is-active {

    display: block;

}

.workpaper-header-card {

    position: static;
    top: auto;
    z-index: auto;
    isolation: auto;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    min-height: 70px;
    padding: 13px;
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    background: var(--fd-surface);
    box-shadow: var(--fd-shadow);

}

.workpaper-header-card::before {
    content: none;
    display: none;
}

#dokumentePage .workpaper-pane.is-active {
    overflow: visible;
}

#dokumentePage .preview-nav {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: none !important;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

#dokumentePage .preview-nav:hover,
#dokumentePage .preview-nav:focus,
#dokumentePage .preview-nav:active {
    transform: none !important;
}

body.darkmode .workpaper-header-card {
    border-color: #27354b;
    background: #172036;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}

.workpaper-title {

    display: flex;
    align-items: center;
    gap: 14px;

}

.workpaper-title-icon {

    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 21px;

}

.workpaper-title h2 {

    margin: 0;
    font-weight: bold;
    font-size: 24px;

}

.workpaper-title .topbar-subtitle {

    font-size: 14px;

}

.flowdocs-save-status {

    margin-left: auto;
    min-width: 260px;
    max-width: 420px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fbff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;

}

#dokumentePage .workpaper-header-slot .flowdocs-save-status {
    min-width: 150px;
    max-width: 210px;
    margin-left: auto;
}

@media (max-width: 1180px) {
    #dokumentePage .workpaper-page-head {
        grid-template-columns: 1fr minmax(280px, 430px);
    }

    #dokumentePage .workpaper-header-slot {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    #dokumentePage .workpaper-page-head {
        grid-template-columns: 1fr;
    }

    #dokumentePage .workpaper-header-slot .workpaper-header-card.is-active,
    #dokumentePage .workpaper-header-actions {
        flex-wrap: wrap;
    }

    #dokumentePage .workpaper-header-slot .workpaper-title > div:last-child {
        display: block;
    }
}

.flowdocs-save-status span {

    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

}

.flowdocs-save-status.is-working {

    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;

}

.flowdocs-save-status.is-done {

    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;

}

.flowdocs-save-status.is-error {

    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;

}

.flowdocs-picker-shell {
    position: relative;
    margin-bottom: 1rem;
}

.flowdocs-picker-input {
    margin-bottom: 0 !important;
}

.flowdocs-picker-list {
    position: absolute;
    z-index: 1060;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 348px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .16);
}

.flowdocs-picker-option {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--fd-text);
    text-align: left;
}

.flowdocs-picker-option:hover,
.flowdocs-picker-option.is-active {
    background: #eff6ff;
}

.flowdocs-picker-option-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef4ff;
    color: #1d4ed8;
}

.flowdocs-picker-option-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flowdocs-picker-option-title {
    overflow: hidden;
    color: var(--fd-text);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowdocs-picker-option-meta {
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowdocs-picker-option-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

.flowdocs-picker-badge {
    display: inline-flex;
    min-width: 28px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border: 1px solid #111827;
    border-radius: 999px;
    color: #111827;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.flowdocs-picker-badge.is-soft {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.flowdocs-picker-badge.is-danger {
    border-color: #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}

.flowdocs-picker-empty {
    padding: 12px;
    color: #64748b;
    font-size: 12px;
}

body.darkmode .flowdocs-picker-list {
    border-color: #22304a;
    background: #0f172a;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
}

body.darkmode .flowdocs-picker-option:hover,
body.darkmode .flowdocs-picker-option.is-active {
    background: #172554;
}

body.darkmode .flowdocs-picker-option-icon {
    background: #1e3a8a;
    color: #dbeafe;
}

body.darkmode .flowdocs-picker-option-title {
    color: #e5edf8;
}

body.darkmode .flowdocs-picker-option-meta,
body.darkmode .flowdocs-picker-empty {
    color: #94a3b8;
}

body.darkmode .flowdocs-picker-badge {
    border-color: #e5e7eb;
    color: #e5e7eb;
}

.flowdocs-profile-modal {
    border: 1px solid #dbe7fb;
    border-radius: 10px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.flowdocs-profile-modal .modal-header,
.flowdocs-profile-modal .modal-footer {
    background: #f8fbff;
    border-color: #dbe7fb;
}

.flowdocs-profile-modal .form-select {
    min-height: 42px;
}

body.darkmode .flowdocs-profile-modal {
    background: #111827;
    border-color: #334155;
    color: #e5edf8;
}

body.darkmode .flowdocs-profile-modal .modal-header,
body.darkmode .flowdocs-profile-modal .modal-footer {
    background: #0f172a;
    border-color: #334155;
}

body.darkmode .flowdocs-profile-modal .text-muted {
    color: #94a3b8 !important;
}

body.darkmode .flowdocs-profile-modal .form-select {
    background-color: #111827;
    border-color: #334155;
    color: #e5edf8;
}

#refreshPreviewBtn {
    flex: 0 0 64px !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    padding-inline: 0 !important;
    position: relative;
    white-space: nowrap;
}

#refreshPreviewBtn.is-busy,
#refreshPreviewBtn.is-busy:disabled,
#refreshPreviewBtn[aria-busy="true"],
#refreshPreviewBtn[aria-busy="true"]:disabled,
#refreshPreviewBtn.flowdocs-refresh-busy,
#refreshPreviewBtn.flowdocs-refresh-busy:disabled {
    color: #fff !important;
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    opacity: 1;
}

#refreshPreviewBtn i,
#refreshPreviewBtn .spinner-border {
    width: 1.15em;
    height: 1.15em;
    font-size: 1.25rem;
    line-height: 1;
}

#refreshPreviewBtn.is-busy .spinner-border,
#refreshPreviewBtn[aria-busy="true"] .spinner-border,
#refreshPreviewBtn.flowdocs-refresh-busy .spinner-border {
    display: inline-block !important;
    color: currentColor !important;
    flex: 0 0 auto;
    margin: 0 !important;
}

#refreshPreviewBtn:empty:not(.is-busy):not([aria-busy="true"]):not(.flowdocs-refresh-busy)::before {
    color: var(--bs-primary);
    content: "\21bb";
    font-size: 1.35rem;
    line-height: 1;
}

#refreshPreviewBtn.is-busy:empty::before,
#refreshPreviewBtn[aria-busy="true"]:empty::before,
#refreshPreviewBtn.flowdocs-refresh-busy:empty::before {
    animation: spinner-border .75s linear infinite;
    border: .16em solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    content: "";
    display: inline-block;
    height: 1.05rem;
    width: 1.05rem;
}

.zusatzvereinbarungen-card {

    flex: 0 0 auto;
    height: 246px;

}

.zusatzvereinbarungen-card textarea {

    flex: 1 1 auto;
    min-height: 0;

}

.flowdocs-allowance-card .flowdocs-allowance-amount {

    margin-left: auto;
    max-width: 244px;

}

.flowdocs-allowance-card .flowdocs-allowance-amount .form-control {

    padding-left: 1rem;
    padding-right: .5rem;
    text-align: right;

}

.flowdocs-allowance-card .flowdocs-allowance-amount .input-group-text {

    justify-content: center;
    min-width: 2.2rem;
    padding-left: .55rem;
    padding-right: .8rem;

}

.flowdocs-offer-location-card {
    display: grid;
    gap: 8px;
    padding: 9px;
    border: 1px solid #cfe0f6;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.flowdocs-offer-location-head,
.flowdocs-offer-location-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flowdocs-offer-location-head {
    justify-content: space-between;
}

.flowdocs-offer-location-label,
.flowdocs-offer-location-source {
    color: #65748b;
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0;
}

.flowdocs-offer-location-label {
    text-transform: uppercase;
}

.flowdocs-offer-location-badge {
    padding: 3px 7px;
    border: 1px solid #bcd2f4;
    border-radius: 6px;
    background: #eef5ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 780;
    line-height: 1.1;
}

.flowdocs-offer-location-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 15px;
}

.flowdocs-offer-location-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.flowdocs-offer-location-copy strong {
    color: #172033;
    font-size: 14px;
    line-height: 1.2;
}

.flowdocs-offer-location-copy small {
    min-width: 0;
    overflow: hidden;
    color: #65748b;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowdocs-offer-location-segments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 3px;
    border: 1px solid #d8e5f6;
    border-radius: 7px;
    background: #f2f6fb;
}

.flowdocs-offer-location-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.1;
}

.flowdocs-offer-location-segment.is-active {
    border-color: #93c5fd;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, .16);
}

.flowdocs-offer-location-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #64748b;
}

.flowdocs-offer-location-card.is-leoben {
    border-color: #b7d4f8;
    background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
}

#flowDocsContent .flowdocs-leoben-disabled-field,
#flowDocsContent .flowdocs-leoben-disabled-field:disabled {

    background: #eef3f8 !important;
    border-color: #d3deea !important;
    box-shadow: none !important;
    color: #7b8da5 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;

}

#flowDocsContent .flowdocs-leoben-disabled-field::placeholder {

    color: #aebdce !important;

}

@media (max-width: 767.98px) {

    .workpaper-header-card {

        align-items: stretch;
        flex-direction: column;

    }

    .flowdocs-save-status {

        width: 100%;
        min-width: 0;
        max-width: none;

    }

    .zusatzvereinbarungen-card {

        height: auto;

    }

    .zusatzvereinbarungen-card textarea {

        min-height: 198px;

    }

}
