.alm-loan-application {
    --alm-form-action-color: #f4b51a;
    --alm-form-step-color: #FF9B07;
    --alm-form-highlight-color: #4E72EA;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.alm-form-step {
    display: none;
}

.alm-form-step.active {
    display: block;
}

.alm-step-content {
    background: #fff;
    /* padding: 30px; */
    border-radius: 15px;
    /* margin-bottom: 20px; */
}

.alm-amount-and-period {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    text-align: center;
    margin-bottom: 30px!important;
}

.alm-step-title {
    color: #222;
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 45px!important;
}

.alm-step-title span {
    color: var(--alm-form-step-color)!important;
    font-family: "Grape Nuts", "Comic Sans MS", "Segoe Print", cursive;
    font-size: 24px;
    font-weight: 400;
}

.skeleton-loader {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    border-radius: 4px;
    display: inline-block;
    min-width: 80px;
    height: 20px;
    color: transparent;
    vertical-align: middle;
}

#loan-amount-display, 
#loan-period-display {
    color: var(--alm-form-highlight-color)!important;
    text-decoration: underline;
    text-decoration-color: var(--alm-form-highlight-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}

#loan-amount-display:focus-visible,
#loan-period-display:focus-visible {
    outline: 2px solid rgba(78, 114, 234, 0.35);
    outline-offset: 4px;
}

#loan-amount-display.skeleton-loader,
#loan-period-display.skeleton-loader {
    text-decoration: none;
}

#loan-amount-display.skeleton-loader {
    width: 60px;
    min-width: 60px;
}

#loan-period-display.skeleton-loader {
    width: 80px;
    min-width: 80px;
}

.skeleton-loader::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.alm-step-title svg {
    margin-left: 8px;
}

.alm-step-subtitle {
    color: #FF9800;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

.alm-form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.alm-form-row:hover {
    z-index: 10;
}

.alm-form-field {
    flex: 1;
    position: relative;
}

.alm-form-field:hover {
    z-index: 20;
}

.alm-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #666;
}

/* Nowe style dla inputów */
.alm-input-wrapper {
    position: relative;
    width: 100%;
}

.alm-loan-application .alm-input {
    width: 100%;
    height: 60px;
    padding: 0 20px!important;
    border: 1px solid rgba(78, 114, 234, 0.18);
    border-radius: 45px!important;
    font-size: 16px;
    box-shadow: 0 4px 12px 0 rgba(78, 114, 234, 0.25) !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.alm-loan-application .alm-input:focus {
    border-color: rgba(78, 114, 234, 0.35);
    box-shadow: 0 4px 12px 0 rgba(78, 114, 234, 0.25) !important;
    outline: none;
}

.alm-input::placeholder {
    color: #888888;
    font-size: 12px;
}

/* ===== FLOATING LABELS ===== */
.alm-floating-label {
    position: absolute;
    left: 20px;
    top: 50%; /* stałe — nigdy się nie zmienia, animujemy tylko transform */
    transform: translateY(-50%); /* stan spoczynku: wyśrodkowany w inpucie */
    font-size: 12px;
    color: #888;
    pointer-events: none;
    /* transform animowany GPU-accelerated — zawsze płynny */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.25s ease,
                left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--alm-label-bg, #fff);
    padding: 0 4px;
    line-height: 1;
    z-index: 1;
    white-space: nowrap;
}

/* Selecty z strzałką po lewej (padding-left: 45px) */
.alm-input-wrapper .alm-select ~ .alm-floating-label {
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 70px);
    overflow: hidden;
    text-overflow: ellipsis;
}

.alm-input-wrapper .alm-select ~ .alm-floating-label::after {
    content: "";
    width: 0;
    height: 0;
    flex: 0 0 auto;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--alm-form-highlight-color);
}

/* Date inputy z ikoną kalendarza po lewej (padding-left: 50px) */
.alm-input-wrapper .alm-date-input ~ .alm-floating-label {
    left: 50px;
}

/*
 * Floating state — przelot z centrum inputa (top:50% = 30px) do górnej krawędzi (0px).
 * top zostaje na 50%, przesuwamy tylko transform o 30px w górę (60px input / 2 = 30px).
 * calc(-50% - 30px): -50% centruje label, -30px przenosi do górnej krawędzi.
 */
.alm-input-wrapper.is-focused .alm-floating-label,
.alm-input-wrapper.has-value .alm-floating-label {
    left: 15px;
    max-width: calc(100% - 30px);
    font-size: 10px;
    transform: translateY(calc(-50% - 30px));
}

.alm-input-wrapper.is-focused .alm-select ~ .alm-floating-label::after,
.alm-input-wrapper.has-value .alm-select ~ .alm-floating-label::after {
    display: none;
}

/* Kolor labela przy focusie — zawsze pomarańczowy */
.alm-input-wrapper.is-focused .alm-floating-label {
    color: var(--alm-form-highlight-color);
}

/* Kolor labela gdy wypełnione ale bez focusu */
.alm-input-wrapper.has-value:not(.is-focused) .alm-floating-label {
    color: #888;
}

/* Kolor labela gdy pole jest poprawne (bez focusu) */
.alm-input-wrapper:not(.is-focused) .alm-input.is-valid ~ .alm-floating-label {
    color: #28a745;
}

/* Kolor labela gdy pole ma błąd (bez focusu) */
.alm-input-wrapper:not(.is-focused) .alm-input.is-invalid ~ .alm-floating-label {
    color: #dc3545;
}

@media (prefers-reduced-motion: reduce) {
    .alm-floating-label {
        transition: none;
    }
}

/* Tooltip */
.alm-tooltip {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 30;
}

.alm-tooltip-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(78, 114, 234, 0.1);
    border: 1px solid rgba(78, 114, 234, 0.22);
    color: var(--alm-form-highlight-color);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.alm-tooltip-icon img {
    display: none;
}

.alm-tooltip-icon::before {
    content: "?";
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.alm-tooltip:hover .alm-tooltip-icon {
    background: var(--alm-form-highlight-color);
    border-color: var(--alm-form-highlight-color);
    color: #fff;
    transform: translateY(-1px);
}

.alm-paste-icon .alm-tooltip-icon {
    background: rgba(78, 114, 234, 0.1);
    border-color: rgba(78, 114, 234, 0.22);
}

.alm-paste-icon .alm-tooltip-icon img {
    display: block;
    width: 17px;
    height: 17px;
}

.alm-paste-icon .alm-tooltip-icon::before {
    display: none;
}

.alm-paste-icon:hover .alm-tooltip-icon {
    background: rgba(78, 114, 234, 0.14);
    border-color: rgba(78, 114, 234, 0.36);
    color: var(--alm-form-highlight-color);
}

.alm-tooltip-text {
    position: absolute;
    right: 0;
    top: 36px;
    background: #fff;
    border: 1px solid rgba(78, 114, 234, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    width: min(270px, calc(100vw - 42px));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: #2f4263;
    box-shadow: 0 14px 34px rgba(78, 114, 234, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
    pointer-events: none;
}

.alm-tooltip-text::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid rgba(78, 114, 234, 0.18);
    border-top: 1px solid rgba(78, 114, 234, 0.18);
    transform: rotate(45deg);
}

.alm-tooltip:hover .alm-tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 100;
    pointer-events: auto;
}

/* Stare style dla readonly pól */
.alm-readonly-field {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    color: #666;
}

/* Styles for consent options */
.alm-consent-options {
    margin-top: 40px;
}

.alm-consent-option {
    margin-bottom: 15px;
    position: relative;
}

/* Add left margin to all consent options except the first one (Zaznacz wszystkie) */
.alm-consent-option:not(:first-child):not(.alm-nested-consent) {
    margin-left: 15px;
}

.alm-consent-option.error {
    border-left: 3px solid #ff0000;
    padding-left: 10px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

.alm-consent-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 1px solid #D9D9D9;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-right: 10px;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
    margin-top: 3px;
    border-radius: 5px!important;
}

.alm-consent-option input[type="checkbox"]:checked {
    background-color: var(--alm-form-highlight-color);
    border-color: var(--alm-form-highlight-color);
    border-radius: 5px!important;
}

.alm-consent-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 10px;
    background-color: transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -58%) rotate(45deg);
    border: solid #fff;
    border-width: 0 2px 2px 0;
}

.alm-consent-option label {
    font-size: 14px;
    line-height: 1.5;
    color: #888888;
    cursor: pointer;
}

.consent-options-step-1 > .alm-consent-option:first-child > label {
    font-size: 16px;
    font-weight: 700;
    color: #444;
}

.alm-loan-application a,
.alm-loan-application .alm-expand-text {
    color: var(--alm-form-action-color);
}

.alm-loan-application a:hover,
.alm-loan-application .alm-expand-text:hover {
    color: var(--alm-form-action-color);
}

.alm-form-navigation {
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin-top: 45px;
    gap: 30px;
}

.alm-next-step {
    background: var(--alm-form-action-color);
    color: white;
    border: none;
    padding: 12px 40px!important;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    font-weight: 600;
    min-width: 300px;
}

.alm-prev-step {
    background-color: transparent;
    color: var(--alm-form-action-color);
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    padding: 12px 30px;
    text-align: center;
}

.alm-next-step:hover {
    background: var(--alm-form-action-color);
} 

.alm-loan-application .alm-next-step-button,
.alm-loan-application .alm-revoke-consent-button {
    background: var(--alm-form-action-color) !important;
    border-color: var(--alm-form-action-color) !important;
    color: #fff !important;
}

@media screen and (max-width: 768px) {
    .alm-step-content, .alm-loan-application {
        padding: 0px;
    }

    .alm-step-title {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .alm-step-title span {
        display: block;
    }

    .alm-form-row {
        flex-direction: column;
    }

    .alm-form-field {
        width: 100%;
    }
}

/* Style dla inputa z numerem telefonu */
.phone-prefix {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    font-weight: 400;
    font-size: 16px;
    display: none;
    z-index: 5;
    background-color: transparent;
    pointer-events: none;
}

#phone_number {
    transition: padding-left 0.3s ease;
}

#phone_number:focus,
#phone_number:not(:placeholder-shown) {
    padding-left: 55px !important;
}

#phone_number:focus + .phone-prefix,
#phone_number:not(:placeholder-shown) + .phone-prefix {
    display: block;
}

/* Dodajemy style dla placeholdera, gdy input jest aktywny */
#phone_number:focus::placeholder {
    opacity: 0;
    transition: opacity 0.3s;
}

/* Style dla walidacji */
.alm-loan-application .alm-input.is-invalid {
    border: 1px solid rgba(220, 53, 69, 0.35) !important;
    box-shadow: 0 4px 12px 0 rgba(220, 53, 69, 0.25) !important;
}

.alm-loan-application .alm-input.is-valid {
    border: 1px solid rgba(40, 167, 69, 0.35) !important;
    box-shadow: 0 4px 12px 0 rgba(40, 167, 69, 0.25) !important;
}

.alm-validation-message {
    position: absolute;
    left: 25px;
    bottom: -25px;
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
    pointer-events: none;
}

.alm-pesel-info {
    position: relative;
    margin-top: 14px;
    padding: 14px 16px 14px 44px;
    color: #2f4263;
    background: rgba(78, 114, 234, 0.08);
    border: 1px solid rgba(78, 114, 234, 0.18);
    border-radius: 14px;
    box-shadow: 0 4px 12px 0 rgba(78, 114, 234, 0.12);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.alm-pesel-info::before {
    content: "!";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--alm-form-highlight-color);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

/* Selektory dla różnych układów elementów */
.alm-input.is-invalid ~ .alm-validation-message {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dodatkowe style dla komunikatów pomocy */
.alm-validation-hint {
    display: none;
}

.alm-form-row-address-numbers {
    flex: 1;
    gap: 15px;
    flex-direction: row;
    margin-bottom: 0;
}
/* Styles for validation of postal code */
#postal_code.is-valid {
    border-color: rgba(40, 167, 69, 0.35) !important;
    box-shadow: 0 4px 12px 0 rgba(40, 167, 69, 0.25) !important;
}

#postal_code.is-invalid {
    border-color: rgba(220, 53, 69, 0.35) !important;
    box-shadow: 0 4px 12px 0 rgba(220, 53, 69, 0.25) !important;
}


/* Style dla selectów */
.alm-select-arrow {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    z-index: 2;
    pointer-events: none;
    display: none!important;
}

.alm-select-arrow img {
    width: 11px;
    height: auto;
    filter: invert(43%) sepia(65%) saturate(2570%) hue-rotate(211deg) brightness(96%) contrast(90%);
}

.alm-select {
    padding-left: 20px!important;
    padding-right: 54px!important;
    cursor: pointer;
    color: #2f4263;
    background-color: #fff!important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none!important; /* Ukrycie domyślnej strzałki w Chrome */
}

#income_industry {
    font-size: 12px;
}

#income_industry option {
    font-size: 15px;
}

/* Ukrycie domyślnej strzałki w Firefox */
.alm-select {
    -moz-appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
}

/* Ukrycie domyślnej strzałki w IE/Edge */
.alm-select::-ms-expand {
    display: none;
}

/* Ukrycie domyślnej strzałki w Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .alm-select {
            -webkit-appearance: none;
            background-image: none;
        }
    }
}

.alm-select option {
    color: #2f4263;
    background-color: #fff;
}

.alm-select option:first-child {
    color: #757575;
}

.alm-select:required:invalid {
    color: #757575;
}

/* Style dla selectów w stanie focus */
.alm-select:focus {
    border-color: rgba(78, 114, 234, 0.35);
    box-shadow: 0 4px 12px 0 rgba(78, 114, 234, 0.25) !important;
    outline: none;
}

/* Calendar icon styles */
.alm-calendar-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alm-calendar-icon img {
    width: 20px;
    height: 20px;
    filter: invert(43%) sepia(65%) saturate(2570%) hue-rotate(211deg) brightness(96%) contrast(90%);
}

.alm-input-wrapper.is-focused .alm-calendar-icon,
.alm-input-wrapper.has-value .alm-calendar-icon {
    display: none;
}

/* Date input styles */
.alm-date-input {
    padding-left: 50px !important;
    color: #2f4263;
    cursor: pointer;
}

.alm-date-input::-webkit-calendar-picker-indicator {
    display: none;
}

.alm-date-input::-webkit-datetime-edit {
    color: #757575;
}

.alm-date-input::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.alm-date-input::-webkit-datetime-edit-text {
    color: #757575;
}

.alm-date-input::-webkit-datetime-edit-month-field,
.alm-date-input::-webkit-datetime-edit-day-field,
.alm-date-input::-webkit-datetime-edit-year-field {
    color: #757575;
    padding: 0;
}

.alm-date-input:focus::-webkit-datetime-edit {
    color: #2f4263;
}

.alm-date-input:focus::-webkit-datetime-edit-text,
.alm-date-input:focus::-webkit-datetime-edit-month-field,
.alm-date-input:focus::-webkit-datetime-edit-day-field,
.alm-date-input:focus::-webkit-datetime-edit-year-field {
    color: #2f4263;
}

/* Firefox styles */
.alm-date-input {
    -moz-appearance: textfield;
}

.alm-date-input::-moz-placeholder {
    color: #757575;
}

.alm-date-input:focus::-moz-placeholder {
    color: #2f4263;
}

/* jQuery UI Datepicker styles */
.ui-datepicker {
    width: 320px;
    padding: 20px;
    background: #fff;
    border: 1px solid rgba(78, 114, 234, 0.18);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(78, 114, 234, 0.18);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #2f4263;
}

.ui-datepicker .ui-datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0;
    border: none;
    background: none;
}

.ui-datepicker .ui-datepicker-title {
    margin: 0;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    color: #2f4263;
    order: 2;
    flex: 1;
}

.ui-datepicker .ui-datepicker-prev {
    order: 1;
}

.ui-datepicker .ui-datepicker-next {
    order: 3;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    top: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(78, 114, 234, 0.08);
}

.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
    display: none;
}

.ui-datepicker .ui-datepicker-prev:before,
.ui-datepicker .ui-datepicker-next:before {
    content: '';
    width: 8px;
    height: 8px;
    border-top: 2px solid #4E72EA;
    border-right: 2px solid #4E72EA;
    display: block;
}

.ui-datepicker .ui-datepicker-prev:before {
    transform: rotate(-135deg);
}

.ui-datepicker .ui-datepicker-next:before {
    transform: rotate(45deg);
}

.ui-datepicker .ui-datepicker-calendar {
    width: 100%;
    margin: 0;
    border: none;
    border-collapse: collapse;
    table-layout: fixed;
}

.ui-datepicker .ui-datepicker-calendar th {
    padding: 8px 0;
    text-align: center;
    font-weight: 500;
    color: #5F7192;
    border: none;
    font-size: 12px;
    width: 14.28%;
}

.ui-datepicker .ui-datepicker-calendar td {
    padding: 0;
    text-align: center;
    border: none;
    width: 14.28%;
}

.ui-datepicker .ui-datepicker-calendar td a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    color: #2f4263;
    text-decoration: none;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1;
}
.ui-datepicker .ui-datepicker-calendar td span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    text-decoration: none;
}

.ui-datepicker .ui-datepicker-calendar td a:hover {
    background: rgba(78, 114, 234, 0.08);
    color: #4E72EA;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-active {
    background: #4E72EA;
    color: #fff;
    border: none;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-highlight {
    background: rgba(255, 207, 106, 0.35);
    color: #2f4263;
    border: none;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-disabled {
    background: none;
    color: #D1D5DB;
    cursor: default;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-disabled:hover {
    background: none;
    color: #D1D5DB;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-disabled .ui-state-highlight {
    background: none;
    color: #D1D5DB;
}

/* Style dla pola daty */
.alm-date-input {
    cursor: pointer;
    background-color: #fff;
}

.alm-date-input:focus {
    cursor: pointer;
}

/* jQuery UI Datepicker select styles */
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    padding: 6px 28px 6px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #2f4263;
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    background-color: rgba(78, 114, 234, 0.08);
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%234E72EA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 10px 6px;
    margin: 0 5px;
}

.ui-datepicker select.ui-datepicker-month:hover,
.ui-datepicker select.ui-datepicker-year:hover {
    color: #4E72EA;
}

.ui-datepicker select.ui-datepicker-month:focus,
.ui-datepicker select.ui-datepicker-year:focus {
    outline: none;
    color: #4E72EA;
}

.ui-datepicker select.ui-datepicker-month option,
.ui-datepicker select.ui-datepicker-year option {
    background: #fff;
    color: #2f4263;
    padding: 8px;
}

.ui-datepicker select.ui-datepicker-month option:hover,
.ui-datepicker select.ui-datepicker-year option:hover {
    background: rgba(78, 114, 234, 0.08);
    color: #4E72EA;
}

/* Style dla pola z numerem dowodu osobistego */
#id_number {
    text-transform: uppercase;
    letter-spacing: 1px;
}

#id_number::placeholder {
    text-transform: none;
    letter-spacing: normal;
}

/* Style dla dropdownów kodów pocztowych */
.alm-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(78, 114, 234, 0.18);
    border-radius: 16px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 12px 28px rgba(78, 114, 234, 0.16);
    margin-top: 8px;
    padding: 6px;
}

.alm-dropdown-item {
    padding: 11px 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #2f4263;
    border-radius: 12px;
}

.alm-dropdown-item:hover {
    background-color: rgba(78, 114, 234, 0.08);
    color: #4E72EA;
}

/* Scrollbar styling dla dropdownów */
.alm-dropdown::-webkit-scrollbar {
    width: 8px;
}

.alm-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.alm-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.alm-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal styles */
.alm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 41, 55, 0.45);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.alm-modal.active {
    display: flex;
}

.alm-modal-content {
    background: #fff;
    padding: 38px 34px 34px;
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(78, 114, 234, 0.16);
    box-shadow: 0 18px 40px rgba(78, 114, 234, 0.18);
}

.alm-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 0;
}

.alm-modal-title {
    font-size: 26px;
    font-weight: 800;
    color: #222;
    text-align: center;
    margin-bottom: 24px!important;
}

.alm-modal-subtitle {
    font-size: 26px;
    font-weight: 800;
    color: #222;
    text-align: center;
    margin: 34px 0 24px 0!important;
}

.alm-modal-field {
    margin-bottom: 30px;
}

.alm-modal-field label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: #666;
}

.alm-modal-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.alm-loan-application .alm-modal-input-wrapper .alm-input {
    width: 100%;
    padding: 12px 60px 12px 15px;
    border: 1px solid rgba(78, 114, 234, 0.18);
    border-radius: 45px!important;
    font-size: 16px;
    font-weight: 500;
    color: var(--alm-form-highlight-color);
    box-shadow: 0 4px 12px 0 rgba(78, 114, 234, 0.25) !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.alm-loan-application .alm-modal-input-wrapper .alm-input:focus {
    outline: none;
    border-color: rgba(78, 114, 234, 0.35);
    box-shadow: 0 4px 12px 0 rgba(78, 114, 234, 0.25) !important;
}

.alm-modal-input-suffix {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--alm-form-highlight-color);
    font-weight: 600;
}

.alm-modal-field .alm-slider-container {
    margin-top: 0;
}

.alm-modal-field .alm-custom-slider {
    height: 8px;
    background: rgba(78, 114, 234, 0.14);
    border-radius: 0;
}

.alm-modal-field .alm-slider-progress {
    background: var(--alm-form-action-color);
    border-radius: 0;
}

.alm-modal-field .alm-slider-handle {
    width: 42px;
    height: 42px;
    background: var(--alm-form-action-color);
    border: none;
    box-shadow: none;
}

.alm-modal-field .alm-slider-handle img {
    display: none;
}

.alm-modal-field .alm-slider-handle::before,
.alm-modal-field .alm-slider-handle::after {
    content: "";
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.alm-modal-field .alm-slider-handle::before {
    border-right: 6px solid #fff;
    margin-right: 3px;
}

.alm-modal-field .alm-slider-handle::after {
    border-left: 6px solid #fff;
    margin-left: 3px;
}

.alm-modal-field .alm-slider-values {
    color: var(--alm-form-highlight-color);
    font-weight: 600;
}

.alm-modal-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--alm-form-highlight-color);
    text-align: center;
    margin-top: 10px;
}

.alm-modal-button {
    background: var(--alm-form-action-color);
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
}

.alm-modal-button:hover {
    background: var(--alm-form-action-color);
    color: #fff;
}

/* Postal Code API styles */
#postal_code.loading,
#company_postal_code.loading,
#company_nip.loading {
    padding-right: 84px!important;
}

.alm-input-wrapper.is-fetching::after,
.alm-input-wrapper:has(#postal_code.loading)::after,
.alm-input-wrapper:has(#company_postal_code.loading)::after,
.alm-input-wrapper:has(#company_nip.loading)::after {
    content: "";
    position: absolute;
    right: 54px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid rgba(78, 114, 234, 0.2);
    border-top-color: #4E72EA;
    border-right-color: #FFCF6A;
    border-radius: 50%;
    animation: alm-fetch-spinner 0.75s linear infinite;
    z-index: 25;
    pointer-events: none;
}

.postal-loading-message,
.gus-loading-message {
    display: none;
    color: #5F7192;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 0 0 0 20px;
    position: absolute;
    left: 18px;
    bottom: -18px;
    z-index: 10;
    min-width: 0;
    max-width: calc(100% - 36px);
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.postal-loading-message:before,
.gus-loading-message:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 11px;
    height: 11px;
    border: 2px solid rgba(78, 114, 234, 0.25);
    border-top-color: #4E72EA;
    border-right-color: #FFCF6A;
    border-radius: 50%;
    animation: alm-message-spinner 0.8s linear infinite;
}

@keyframes alm-message-spinner {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

@keyframes alm-fetch-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* GUS API styles */
#gus-api-error {
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
    display: none;
    position: absolute;
    left: 18px;
    bottom: -18px;
    z-index: 10;
    padding: 0;
    min-width: 0;
    max-width: calc(100% - 36px);
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alm-expand-text {
    color: var(--global-palette1);
    cursor: pointer;
    font-weight: 500;
    margin-left: 5px;
}

.alm-expanded-content {
    margin-top: 10px;
    padding-left: 30px;
    border-left: 2px solid #E5E7EB;
}

.alm-expanded-content ul {
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 20px;
}

.alm-expanded-content li {
    margin-bottom: 3px;
}

.alm-nested-consents {
    margin-top: 10px;
    padding-left: 22px;
}

.alm-nested-consent {
    margin-top: 8px;
    margin-bottom: 8px;
}

.alm-nested-consent label {
    font-weight: normal;
    font-size: 14px;
} 

.alm-step-5-wydatki, .alm-step-5-dochody {
    margin-bottom: 15px!important;
    font-weight: 500;
    font-size: 17px;
}

.alm-step-5-wydatki {
    margin-top: 40px!important;
}
