/* "Zapytaj o ofertę": the form card, the NOTUS notice and the phone bar. The form markup is the plugin's, so its
   rules keep their old selectors: first style.css and css/main.css (UIkit) of the old theme, then css/single.css with
   body.page-single in place of body.hn-devpage, so every rule weighs what it weighed there. */

/* ---------- style.css ---------- */

.c-form-sidebar__submit {
    position: relative;
}

.wpcf7-form .c-form-sidebar__msg.uk-margin {
    margin-bottom: 10px;
}

.wpcf7-form .c-form-sidebar__msg.uk-margin,
.wpcf7-form .c-form-sidebar__phone.uk-margin,
.wpcf7-form .c-form-sidebar__email.uk-margin {
    width: 100%;
}

.wpcf7-form .c-form-sidebar__submit {
    width: 100%;
}

/* ---------- css/main.css (UIkit and the theme) ---------- */

.uk-checkbox,
.uk-input,
.uk-radio,
.uk-select,
.uk-textarea {
    box-sizing: border-box;
    margin: 0;
    border-radius: 0;
    font: inherit;
}

.uk-input {
    overflow: visible;
}

.uk-input,
.uk-textarea {
    -webkit-appearance: none;
}

.uk-input,
.uk-select,
.uk-textarea {
    max-width: 100%;
    width: 100%;
    border: 0;
    padding: 0 10px;
    background: #fff;
    color: #666;
}

.uk-input,
.uk-select:not([multiple]):not([size]) {
    height: 40px;
    vertical-align: middle;
    display: inline-block;
}

.uk-input:not(input),
.uk-select:not(select) {
    line-height: 38px;
}

.uk-border-rounded {
    border-radius: 5px;
}

.uk-flex {
    display: flex;
}

.uk-flex::before,
.uk-flex::after {
    display: none;
}

.uk-margin {
    margin-bottom: 20px;
}

.uk-margin-small {
    margin-top: 8px;
    margin-bottom: 8px;
}

* + .uk-margin {
    margin-top: 20px !important;
}

.uk-margin-small {
    margin-bottom: 10px;
}

* + .uk-margin-small {
    margin-top: 10px !important;
}

.c-form-sidebar__financing {
    width: 100%;
}

.c-form-sidebar__financing span::after {
    content: "⌄";
    position: absolute;
    right: 10px;
    font-size: 24px;
    color: #999;
    transform: translateY(-50%);
    pointer-events: none;
    top: 0%;
}

.modal-kredyt-info {
    display: none;
    font-size: 14px;
    max-width: 570px;
    width: 100%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    z-index: 99999;
    border: solid #dbdbdb 1px;
    border-radius: 0;
    padding: 5px 20px;
}

.modal-kredyt-info-head {
    padding-top: 8px;
    padding-bottom: 8px;
}

.modal-kredyt-overlay {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    z-index: 900;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
}

.modal-kredyt-info h3 {
    display: inline;
}

.modal-kredyt-info p {
    margin-top: 5px;
    margin-bottom: 5px;
}

.modal-kredyt-info h4 {
    margin-top: 15px;
    margin-bottom: 15px;
}

.modal-kredyt-info-body {
    max-height: 400px;
    overflow-y: scroll;
    padding: 10px;
}

.close-modal-kredyt {
    position: absolute;
    right: 3%;
    font-size: 26px;
    font-weight: 700;
    top: 1%;
    cursor: pointer;
}

@media (max-width: 601px) {
    .modal-kredyt-info {
        max-width: 270px;
    }
}

.wpcf7-form .regulaminField {
    font-size: 12px;
    margin: 0 0 10px 0;
    display: inline-block;
    color: #000;
}

/* ---------- css/single.css: the card ---------- */

body.page-single .contact-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 44px -32px rgba(13, 14, 17, 0.18);
    overflow: hidden;
}

body.page-single .contact-card__head {
    background: var(--bg);
    color: var(--ink);
    padding: 26px 28px 24px;
    border-bottom: 1px solid var(--line);
}

body.page-single .contact-card__head h3 {
    font-family: var(--font-head);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}

body.page-single .contact-card__body {
    padding: 24px 28px 28px;
}

body.page-single .contact-card__body input[type="text"],
body.page-single .contact-card__body input[type="email"],
body.page-single .contact-card__body input[type="tel"],
body.page-single .contact-card__body input[type="number"],
body.page-single .contact-card__body textarea,
body.page-single .contact-card__body select {
    width: 100%;
    height: auto;
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    background: #eeede8;
    padding: 13px 15px;
    font: 600 14.5px/1.4 var(--font-body);
    color: var(--ink);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    margin-bottom: 0;
}

body.page-single .contact-card__body textarea {
    resize: none;
    height: 124px;
    overflow-y: auto;
}

body.page-single .contact-card__body select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A6D75' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

body.page-single .contact-card__body .c-form-sidebar__financing span::after {
    content: none;
}

body.page-single .contact-card__body select:has(option[value=""]:checked) {
    color: var(--muted);
    font-weight: 500;
}

body.page-single .contact-card__body select option {
    color: var(--ink);
}

body.page-single .contact-card__body input::placeholder,
body.page-single .contact-card__body textarea::placeholder {
    color: var(--muted);
    font-weight: 500;
}

body.page-single .contact-card__body input:focus,
body.page-single .contact-card__body textarea:focus,
body.page-single .contact-card__body select:focus {
    outline: none;
    border-color: var(--red);
    background: var(--paper);
    box-shadow: 0 0 0 3px var(--red-soft);
}

body.page-single .contact-card__body .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 0;
    position: relative;
}

body.page-single .contact-card__body p {
    margin: 0 0 12px;
}

body.page-single .contact-card__body .wpcf7-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4%;
    width: 100%;
}

body.page-single .contact-card__body .wpcf7-form > .uk-margin {
    margin: 0 0 16px !important;
}

body.page-single .contact-card__body .c-form-sidebar__submit {
    order: 1;
    width: 100%;
    margin: 0 !important;
}

body.page-single .contact-card__body .regulaminField {
    order: 2;
    display: block;
    width: 100%;
    text-align: left;
    font: 500 11.5px/1.5 var(--font-body);
    color: var(--muted-2);
    margin: 0;
}

body.page-single .contact-card__body .regulaminField + .regulaminField {
    margin-top: 6px;
}

body.page-single .contact-card__body .regulaminField a {
    color: var(--muted);
    text-decoration: underline;
}

body.page-single .contact-card__body .regulaminField a:hover {
    color: var(--red);
}

/* The NOTUS notice is always shown on these pages (the old script only toggled it on older templates). */
body.page-single .contact-card__body .kredyt-zgoda-info {
    display: block !important;
    order: 3;
    width: 100%;
    text-align: left;
    font: 500 11.5px/1.5 var(--font-body);
    color: var(--muted-2);
    margin: 6px 0 0;
}

body.page-single .contact-card__body .kredyt-see-more {
    color: var(--muted);
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
    white-space: nowrap;
}

body.page-single .contact-card__body .kredyt-see-more:hover {
    color: var(--red);
}

body.page-single .modal-kredyt-info {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 24px 20px;
    box-shadow: 0 24px 60px -12px rgba(13, 14, 17, 0.28);
}

body.page-single .modal-kredyt-info h3 {
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 700;
}

body.page-single .modal-kredyt-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 14px 0 6px;
}

body.page-single .modal-kredyt-info p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-2);
}

body.page-single .modal-kredyt-info-body {
    max-height: min(420px, 60vh);
    overflow-y: auto;
    padding: 6px 10px 0 0;
}

body.page-single .close-modal-kredyt {
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 18px;
    border-radius: 50%;
    color: var(--muted);
    transition: background 0.15s ease, color 0.15s ease;
}

body.page-single .close-modal-kredyt:hover {
    background: var(--bg);
    color: var(--ink);
}

body.page-single .contact-card__body .wpcf7-submit,
body.page-single .contact-card__body input[type="submit"],
body.page-single .contact-card__body button[type="submit"] {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: var(--radius);
    background: var(--red);
    color: #fff;
    font: 800 13.5px/1 var(--font-body);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    margin: 0 !important;
    transition: background 0.15s ease;
}

body.page-single .contact-card__body .wpcf7-submit:hover,
body.page-single .contact-card__body input[type="submit"]:hover,
body.page-single .contact-card__body button[type="submit"]:hover {
    background: var(--red-dark);
}

body.page-single .contact-card__body .wpcf7-not-valid-tip {
    position: absolute;
    left: 15px;
    top: calc(100% + 1px);
    margin: 0;
    color: var(--red);
    font: 600 11px/1.2 var(--font-body);
}

body.page-single .contact-card__body .wpcf7-response-output {
    border-radius: var(--radius);
    font: 600 13px/1.5 var(--font-body);
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 14px;
}

/* ---------- css/single.css: the phone bar and the form sliding in ---------- */

body.page-single .mobile-cta {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 350;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px -12px rgba(13, 14, 17, 0.25);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}

body.page-single .mobile-cta.is-visible {
    transform: none;
}

body.page-single .mobile-cta a {
    display: block;
    text-align: center;
    background: var(--red);
    color: #fff;
    border-radius: var(--radius);
    padding: 14px;
    font: 700 15px/1 var(--font-body);
}

body.page-single .contact-card__close,
body.page-single .form-backdrop {
    display: none;
}

@keyframes form-slide {
    from {
        transform: translateY(28%);
        opacity: 0.4;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 860px) {
    body.page-single .mobile-cta {
        display: block;
    }

    body.page-single.is-form-open {
        overflow: hidden;
    }

    body.page-single.is-form-open .form-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(13, 14, 17, 0.55);
        z-index: 380;
    }

    body.page-single.is-form-open #contactCard {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 400;
        margin: 0;
        max-height: 86vh;
        max-height: 86dvh;
        overflow-y: auto;
        background: var(--paper);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -18px 48px -12px rgba(13, 14, 17, 0.4);
        animation: form-slide 0.28s ease;
    }

    body.page-single.is-form-open .contact-card__close {
        display: grid;
        place-items: center;
        position: sticky;
        top: 8px;
        margin: 8px 8px 0 auto;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 50%;
        background: var(--bg);
        color: var(--ink);
        font-size: 15px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }

    body.page-single.is-form-open .mobile-cta {
        display: none;
    }
}
