
/* PRAWNIKOM PRO — BEZPIECZNE FORMULARZE */

body:has([data-secure-form-root]) {
    --sf-navy: #142641;
    --sf-gold: #c6a46a;
    --sf-border: #dce4ee;
    --sf-muted: #64748b;
}

/* SZEROKOSC OBSZARU ROBOCZEGO */

body:has([data-secure-form-root]) #app,
body:has([data-secure-form-root]) .portal-embedded-app,
body:has([data-secure-form-root]) .shell,
body:has([data-secure-form-root]) .department-workspace {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

html body #main-content:has([data-secure-form-root]) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 24px !important;
    background: #eef2f6;
    box-sizing: border-box !important;
}

#main-content:has([data-secure-form-root]) *,
#main-content:has([data-secure-form-root]) *::before,
#main-content:has([data-secure-form-root]) *::after {
    box-sizing: border-box !important;
}

/* POWROT DO DZIALU */

body:has([data-secure-form-root]) .department-return-link {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px !important;
    color: #142641 !important;
    font-size: 13px;
    text-decoration: none !important;
}

body:has([data-secure-form-root])
.department-return-link svg {
    transform: rotate(180deg);
    color: #96702d;
}

/* NAGLOWEK */

html body #main-content:has([data-secure-form-root])
> .page-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 24px !important;
    padding: 28px !important;
    background: linear-gradient(120deg,#0d192c,#203957) !important;
    border: 0 !important;
    border-bottom: 3px solid #c6a46a !important;
    border-radius: 0 !important;
    color: #fff;
}

body:has([data-secure-form-root]) .page-head-main {
    display: flex !important;
    align-items: center;
    gap: 20px;
    flex: 1 1 350px;
    min-width: 0 !important;
}

body:has([data-secure-form-root]) .page-head-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 64px !important;
    height: 64px !important;
    flex: 0 0 64px !important;
    background: #ffffff08 !important;
    border: 1px solid #c6a46a70;
    color: #c6a46a;
}

body:has([data-secure-form-root]) .page-head-copy {
    min-width: 0 !important;
}

body:has([data-secure-form-root]) .page-head-copy .eyebrow {
    color: #c6a46a !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

body:has([data-secure-form-root]) .page-head-copy h1 {
    font-family: Georgia,serif !important;
    font-size: clamp(25px,3vw,38px) !important;
    color: #fff !important;
    line-height: 1.25;
    margin: 8px 0 !important;
    overflow-wrap: anywhere;
}

body:has([data-secure-form-root]) .page-head-copy p {
    color: #cbd5e1 !important;
    font-size: 14px;
    margin: 0 !important;
}

body:has([data-secure-form-root]) .head-actions a {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 20px !important;
    color: #fff !important;
    background: #ffffff08 !important;
    border: 1px solid #ffffff50 !important;
    border-radius: 0 !important;
}

/* IKONY SVG — BEZ ROZCIAGANIA */

html body [data-secure-form-root] svg {
    display: inline-block;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    flex: 0 0 24px !important;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/* GLOWNY UKLAD */

html body [data-secure-form-root] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body [data-secure-form-root] .secure-form-layout {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(260px,320px) !important;
    align-items: start !important;
    gap: 22px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

html body [data-secure-form-root] .calendar-entry-card,
html body [data-secure-form-root] .calendar-entry-aside {
    position: static !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* KARTA FORMULARZA */

html body [data-secure-form-root] .calendar-entry-card {
    display: block !important;
    background: #fff !important;
    border: 1px solid #dce4ee !important;
    border-top: 3px solid #c6a46a !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 16px #14264108;
}

html body [data-secure-form-root] .calendar-entry-card > header {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 26px !important;
    margin: 0 !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #dce4ee !important;
}

[data-secure-form-root] .vault-kicker {
    display: block;
    color: #96702d !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

[data-secure-form-root] .calendar-entry-card h2 {
    font-family: Georgia,serif !important;
    font-size: clamp(22px,2.4vw,30px) !important;
    color: #142641 !important;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 10px !important;
}

[data-secure-form-root] .calendar-entry-card header p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    margin: 0 !important;
}

/* FORMULARZ */

html body [data-secure-form-root] .secure-form-body {
    width: 100% !important;
    max-width: 100% !important;
    padding: 26px !important;
}

html body [data-secure-form-root] .vault-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 22px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

html body [data-secure-form-root] .vault-form > label {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 9px;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

[data-secure-form-root] .vault-form > label > span:first-child {
    color: #142641 !important;
    font-size: 13px;
    font-weight: 600;
}

/* POLA TEKSTOWE */

html body [data-secure-form-root]
.vault-form input:not([type="hidden"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
html body [data-secure-form-root] .vault-form textarea,
html body [data-secure-form-root] .vault-form select {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 48px;
    padding: 12px 15px !important;
    margin: 0 !important;
    background: #f8fafc !important;
    color: #142641 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
    font-family: inherit;
    font-size: 14px;
    box-shadow: none !important;
}

[data-secure-form-root] .vault-form textarea {
    min-height: 180px;
    resize: vertical;
}

[data-secure-form-root] .vault-form input::placeholder,
[data-secure-form-root] .vault-form textarea::placeholder {
    color: #64748b;
}

[data-secure-form-root] .vault-form input:focus,
[data-secure-form-root] .vault-form textarea:focus,
[data-secure-form-root] .vault-form select:focus {
    border-color: #96702d !important;
    outline: 2px solid #c6a46a40;
    outline-offset: 1px;
}

/* SMART SELECT — JEDNO POLE WYBORU */

html body [data-secure-form-root] .smart-select {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Pozostawiamy natywny select i jego wartosc */

html body [data-secure-form-root] .smart-select select {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    clip: auto !important;
    clip-path: none !important;
    pointer-events: auto !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    appearance: auto !important;
}

html body [data-secure-form-root] .smart-select-trigger,
html body [data-secure-form-root] .smart-select-menu,
html body [data-secure-form-root] .smart-select-panel {
    display: none !important;
}

/* PANEL DODAWANIA PLIKOW */

html body [data-secure-form-root] .pw-file-panel {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 28px !important;
    background: #f8fafc !important;
    border: 1px dashed #c6a46a !important;
    border-radius: 0 !important;
}

html body [data-secure-form-root] .pw-file-intro {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

html body [data-secure-form-root] .pw-upload-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 64px !important;
    height: 64px !important;
    background: #f3eee3;
    color: #96702d;
    border: 1px solid #e8dfce;
}

html body [data-secure-form-root] .pw-upload-icon svg {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
}

[data-secure-form-root] .pw-file-intro b {
    display: block;
    color: #142641;
    font-size: 17px;
    margin-bottom: 6px;
}

[data-secure-form-root] .pw-file-intro small {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

/* NATYWNY WYBOR PLIKU */

html body [data-secure-form-root] input[type="file"] {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 10px !important;
    margin: 0 !important;
    color: #142641;
    background: #fff;
    border: 1px solid #dce4ee;
    border-radius: 0 !important;
    font-size: 13px;
    cursor: pointer;
}

[data-secure-form-root] input[type="file"]::file-selector-button {
    padding: 12px 16px;
    margin-right: 12px;
    background: #142641;
    color: #fff;
    border: 0;
    border-radius: 0;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

[data-secure-form-root]
input[type="file"]::file-selector-button:hover {
    background: #203957;
}

/* LISTA WYBRANYCH PLIKOW */

[data-secure-form-root] .pw-file-list:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

[data-secure-form-root] .pw-file-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid #dce4ee;
    border-left: 3px solid #c6a46a;
    color: #142641;
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* STOPKA FORMULARZA */

html body [data-secure-form-root] .vault-form > footer {
    display: flex !important;
    position: static !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 0 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid #dce4ee !important;
}

[data-secure-form-root] [data-vault-form-status] {
    flex: 1 1 200px;
    min-width: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

html body [data-secure-form-root] button[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px !important;
    background: #142641 !important;
    color: #fff !important;
    border: 1px solid #142641 !important;
    border-radius: 0 !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

html body [data-secure-form-root]
button[type="submit"]:hover:not(:disabled) {
    background: #c6a46a !important;
    color: #142641 !important;
    border-color: #c6a46a !important;
}

[data-secure-form-root] button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* PRAWY PANEL BEZPIECZENSTWA */

html body [data-secure-form-root] .calendar-entry-aside {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    background: transparent !important;
}

html body [data-secure-form-root]
.calendar-entry-aside > section {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 22px !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid #dce4ee !important;
    border-top: 3px solid #c6a46a !important;
    border-radius: 0 !important;
}

/* PRYWATNOSC */

html body [data-secure-form-root] .vault-privacy-strip {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    grid-template-columns: none !important;
}

html body [data-secure-form-root] .vault-security-mark,
html body [data-secure-form-root]
.calendar-entry-aside > section > span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    background: #f7f3e9;
    color: #96702d;
    border: 1px solid #e8dfce;
}

[data-secure-form-root] .vault-privacy-strip b {
    display: block;
    color: #142641;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

[data-secure-form-root] .vault-privacy-strip span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}

html body [data-secure-form-root]
.vault-privacy-strip > div:nth-child(3) {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 14px 0 !important;
    border: 0 !important;
    border-top: 1px solid #dce4ee !important;
    border-bottom: 1px solid #dce4ee !important;
}

[data-secure-form-root] .vault-privacy-strip svg {
    color: #96702d;
}

html body [data-secure-form-root] .vault-privacy-strip > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    padding: 11px 14px !important;
    color: #142641 !important;
    border: 1px solid #c6a46a;
    text-decoration: none !important;
    font-size: 13px;
}

/* KARTY INFORMACYJNE */

[data-secure-form-root] .calendar-entry-aside h3 {
    font-family: Georgia,serif !important;
    font-size: 20px !important;
    font-weight: 500;
    color: #142641 !important;
    line-height: 1.3;
    margin: 14px 0 8px !important;
}

[data-secure-form-root] .calendar-entry-aside p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    margin: 0 !important;
}

/* DOSTEPNOSC I UKRYTE ELEMENTY */

html body [data-secure-form-root] [hidden] {
    display: none !important;
}

[data-secure-form-root] :focus-visible {
    outline: 2px solid #96702d;
    outline-offset: 3px;
}

/* TABLET */

@media(max-width:1100px) {

    html body [data-secure-form-root] .secure-form-layout {
        grid-template-columns: minmax(0,1fr) !important;
    }

    html body [data-secure-form-root] .calendar-entry-aside {
        display: grid !important;
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    [data-secure-form-root] .vault-privacy-strip {
        grid-column: 1 / -1;
    }
}

/* TELEFON */

@media(max-width:680px) {

    html body #main-content:has([data-secure-form-root]) {
        padding: 10px !important;
    }

    html body #main-content:has([data-secure-form-root])
    > .page-head {
        padding: 18px !important;
    }

    html body [data-secure-form-root] .calendar-entry-card > header,
    html body [data-secure-form-root] .secure-form-body {
        padding: 18px !important;
    }

    html body [data-secure-form-root] .pw-file-panel {
        padding: 18px !important;
    }

    html body [data-secure-form-root] .calendar-entry-aside {
        grid-template-columns: minmax(0,1fr) !important;
    }

    html body [data-secure-form-root] .vault-form > footer {
        flex-direction: column;
        align-items: stretch;
    }

    [data-secure-form-root] [data-vault-form-status] {
        flex: auto;
    }

    html body [data-secure-form-root] button[type="submit"] {
        width: 100% !important;
    }

    body:has([data-secure-form-root]) .page-head-main {
        gap: 12px;
    }

    body:has([data-secure-form-root]) .page-head-icon {
        width: 48px !important;
        height: 48px !important;
        flex-basis: 48px !important;
    }
}


/* SECURE FORM — NAPRAWA SMART SELECT */

html body [data-secure-form-root] .smart-select {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ukrycie dodatkowego interfejsu Smart Select */

html body [data-secure-form-root]
.smart-select > :not(select) {
    display: none !important;
}

/* Ukrycie listy przenoszonej poza formularz */

html body:has([data-secure-form-root])
#smart-select-secure-form-0 {
    display: none !important;
}

/* Natywne pole wyboru */

html body [data-secure-form-root]
.smart-select > select {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    margin: 0 !important;

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    clip: auto !important;
    clip-path: none !important;
    appearance: auto !important;

    background: #f5f7fa !important;
    color: #142641 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer;
    box-sizing: border-box !important;
}

html body [data-secure-form-root]
.smart-select > select:hover {
    border-color: #c6a46a !important;
}

html body [data-secure-form-root]
.smart-select > select:focus {
    border-color: #96702d !important;
    outline: 2px solid #c6a46a40 !important;
}


/* SECURE FORM — NATIVE SELECT VISIBILITY */

html body #app [data-secure-form-root]
.vault-form .smart-select {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html body #app [data-secure-form-root]
.vault-form .smart-select > select.smart-select-native {
    all: revert !important;

    display: block !important;
    position: relative !important;
    inset: auto !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: 50px !important;
    min-height: 50px !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 12px 40px 12px 16px !important;

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;

    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;

    appearance: auto !important;
    -webkit-appearance: menulist !important;

    background: #f5f7fa !important;
    color: #142641 !important;
    -webkit-text-fill-color: #142641 !important;

    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;

    font-family: "Inter","Segoe UI",Arial,sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: normal !important;
    text-indent: 0 !important;
    text-align: left !important;

    box-sizing: border-box !important;
    cursor: pointer !important;
}

html body #app [data-secure-form-root]
.smart-select > select.smart-select-native option {
    background: #ffffff !important;
    color: #142641 !important;
    font-size: 15px !important;
}

html body #app [data-secure-form-root]
.smart-select > select.smart-select-native:focus {
    border-color: #c6a46a !important;
    outline: 2px solid #c6a46a50 !important;
    outline-offset: 2px !important;
}

html body #app [data-secure-form-root]
.smart-select-trigger {
    display: none !important;
}

