.alm-loan-application {
    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: 16px;
    font-weight: 500;
    color: #222;
    margin-bottom: 30px!important;
}

.alm-step-title {
    color: #222;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 45px!important;
}

.alm-step-title span {
    color: var(--alm-accent-color)!important;
}

.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-accent-color)!important;
}

#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-input {
    width: 100%;
    height: 60px;
    padding: 0 20px!important;
    border: 1px solid #d1d1d1;
    border-radius: 45px!important;
    font-size: 16px;
    transition: border-color 0.3s;
}

.alm-input:focus {
    border-color: #FF9800;
    outline: none;
}

.alm-input::placeholder {
    color: #888888;
    font-size: 12px;
}

/* Tooltip */
.alm-tooltip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 30;
}

.alm-tooltip-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.alm-tooltip-text {
    position: absolute;
    right: 0;
    top: 30px;
    background: #fff;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    padding: 10px;
    width: 250px;
    font-size: 12px;
    color: #666;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    pointer-events: none;
}

.alm-tooltip:hover .alm-tooltip-text {
    opacity: 1;
    visibility: visible;
    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: 100%!important;
}

.alm-consent-option input[type="checkbox"]:checked {
    border-radius: 100%!important;
}

.alm-consent-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color, #FF6B00);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 1px;
    border-radius: 100%!important;
}

.alm-consent-option label {
    font-size: 14px;
    line-height: 1.5;
    color: #888888;
    cursor: pointer;
}

.alm-form-navigation {
    display: flex;
    justify-content: center;
    flex-direction: column;
    margin-top: 45px;
    gap: 30px;
}

.alm-next-step {
    background: #FF9800;
    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: #222;
    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: #F57C00;
} 

@media screen and (max-width: 768px) {
    .alm-step-content, .alm-loan-application {
        padding: 0px;
    }

    .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-input.is-invalid {
    border-color: #dc3545 !important;
}

.alm-input.is-valid {
    border-color: #28a745 !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;
}

/* 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: var(--accent-color, #28a745);
}

#postal_code.is-invalid {
    border-color: #dc3545;
}


.apartment-number-placeholder {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--global-palette5);
    pointer-events: none;
}

.alm-input:focus + .apartment-number-placeholder,
.alm-input:not(:placeholder-shown) + .apartment-number-placeholder {
    display: none;
}

/* Style dla selectów */
.alm-select-arrow {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    z-index: 1;
    pointer-events: none;
}

.alm-select-arrow img {
    width: 10px;
    height: auto;
    filter: invert(73%) sepia(88%) saturate(1588%) hue-rotate(359deg) brightness(101%) contrast(106%);
}

.alm-select {
    padding-left: 45px!important;
    cursor: pointer;
    color: #222;
    -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: #222;
    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: var(--alm-accent-color);
    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;
}

/* Date input styles */
.alm-date-input {
    padding-left: 50px !important;
    color: #757575;
    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: #000;
}

.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: #000;
}

/* Firefox styles */
.alm-date-input {
    -moz-appearance: textfield;
}

.alm-date-input::-moz-placeholder {
    color: #757575;
}

.alm-date-input:focus::-moz-placeholder {
    color: #000;
}

/* jQuery UI Datepicker styles */
.ui-datepicker {
    width: 320px;
    padding: 20px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1F2937;
}

.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: #1F2937;
    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: #F3F4F6;
}

.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 #6B7280;
    border-right: 2px solid #6B7280;
    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: #6B7280;
    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: #1F2937;
    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: #F3F4F6;
    color: #1F2937;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-active {
    background: var(--global-palette1);
    color: #fff;
    border: none;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-highlight {
    background: #FFF8E6;
    color: var(--global-palette1);
    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: 0 25px 0 10px;
    font-size: 16px;
    font-weight: 500;
    color: #1F2937;
    cursor: pointer;
    position: relative;
    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='%236B7280' 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: var(--global-palette1);
}

.ui-datepicker select.ui-datepicker-month:focus,
.ui-datepicker select.ui-datepicker-year:focus {
    outline: none;
    color: var(--global-palette1);
}

.ui-datepicker select.ui-datepicker-month option,
.ui-datepicker select.ui-datepicker-year option {
    background: #fff;
    color: #1F2937;
    padding: 8px;
}

.ui-datepicker select.ui-datepicker-month option:hover,
.ui-datepicker select.ui-datepicker-year option:hover {
    background: #FFF8E6;
    color: var(--global-palette1);
}

/* 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 var(--alm-border-color);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.alm-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: var(--alm-text-color);
}

.alm-dropdown-item:hover {
    background-color: var(--alm-hover-color);
}

/* 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(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.alm-modal.active {
    display: flex;
}

.alm-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.alm-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.alm-modal-title {
    font-size: 20px;
    font-weight: 500;
    color: #222;
    margin-bottom: 20px!important;
}

.alm-modal-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #222;
    margin: 30px 0 20px 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-modal-input-wrapper .alm-input {
    width: 100%;
    padding: 12px 60px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--alm-accent-color);
    transition: border-color 0.3s;
}

.alm-modal-input-wrapper .alm-input:focus {
    outline: none;
    border-color: var(--alm-accent-color);
}

.alm-modal-input-suffix {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 500;
}

.alm-modal-field .alm-slider-container {
    margin-top: 0;
}

.alm-modal-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--alm-accent-color);
    text-align: center;
    margin-top: 10px;
}

.alm-modal-button {
    background: var(--alm-accent-color);
    color: white;
    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: #F57C00;
}

/* Postal Code API styles */
#postal_code.loading {
    background-image: url('../images/loading.gif');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.postal-loading-message {
    display: none;
    color: #666;
    font-size: 12px;
    padding-left: 25px;
    position: absolute;
    left: 0;
    bottom: -25px;
    z-index: 10;
}

.postal-loading-message:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #FF9800;
    border-top-color: transparent;
    border-radius: 50%;
    animation: postal-spinner 0.8s linear infinite;
}

@keyframes postal-spinner {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* GUS API styles */
#company_nip.loading {
    background-image: url('../images/loading.gif');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

#gus-api-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    position: absolute;
    left: 25px;
    bottom: -22px;
    z-index: 10;
}

.gus-loading-message {
    display: none;
    color: #666;
    font-size: 12px;
    padding-left: 25px;
    position: absolute;
    left: 0;
    bottom: -25px;
    z-index: 10;
}

.gus-loading-message:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #FF9800;
    border-top-color: transparent;
    border-radius: 50%;
    animation: gus-spinner 0.8s linear infinite;
}

@keyframes gus-spinner {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.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;
}