/* =========================================================
   MODAALI
========================================================= */

.ps-home-privacy {
    position: fixed;
    bottom: 18px;
    left: 14px;
    z-index: 20;
    font-size: var(--ps-privacy-link-size, 14px);
    line-height: 1.4;
}

.ps-home-privacy a {
    color: var(--ps-privacy-link-color, #c9d0d8);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .65);
    transition: color .2s ease;
}

.ps-home-privacy a:hover,
.ps-home-privacy a:focus-visible {
    color: var(--ps-privacy-link-hover-color, #fafafa);
}

@media (max-width: 680px) {
    .ps-home-privacy {
        position: static;
        margin: 24px 14px 0;
        font-size: var(--ps-privacy-link-size, 14px);
    }
}

.ps-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(0, 0, 0, .76);
}

/* =========================================================
   SIVUN VIERITYSPAINIKKEET
========================================================= */

.ps-scroll-controls {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ps-scroll-controls[hidden],
.ps-scroll-control[hidden] {
    display: none !important;
}

.ps-scroll-control {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #fafafa;
    background: #3278b4;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.ps-scroll-control svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ps-scroll-control:hover {
    background: #285f90;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}

.ps-scroll-control:active {
    transform: translateY(0);
}

.ps-scroll-control:focus-visible {
    outline: 3px solid rgba(255, 195, 0, .9);
    outline-offset: 3px;
}

@media (max-width: 680px) {
    .ps-scroll-controls {
        right: 14px;
        bottom: 14px;
        gap: 6px;
    }

    .ps-scroll-control {
        width: 42px;
        height: 42px;
    }
}

.ps-modal[hidden] {
    display: none;
}

.ps-modal__dialog {
    position: relative;
    width: min(100%, 680px);
    max-height: min(90vh, 900px);
    padding: clamp(28px, 5vw, 48px);
    overflow: auto;

    color: var(--ps-modal-text-color, #fafafa);
    background: var(--ps-modal-background, rgba(7, 15, 25, .74));
    border: 1px solid var(--ps-modal-border, transparent);
    border-radius: 12px;

    box-shadow: 0 24px 80px rgba(0, 0, 0, .55);

    backdrop-filter: blur(var(--ps-modal-blur, 14px)) saturate(85%);
    -webkit-backdrop-filter: blur(var(--ps-modal-blur, 14px)) saturate(85%);
}

.ps-modal__dialog:focus {
    outline: none;
}

.ps-modal__title {
    margin: 0 56px 24px 0;

    color: var(--ps-modal-title-color, #ffe700);

    font-size: clamp(1.7rem, 4vw, 2.15rem);
    font-weight: 700;
    line-height: 1.2;
}

.ps-modal__content {
    color: var(--ps-modal-text-color, #fafafa);
    font-size: 1rem;
    line-height: 1.6;
}

.ps-modal__content > :first-child {
    margin-top: 0;
}

.ps-modal__content > :last-child {
    margin-bottom: 0;
}


/* =========================================================
   SULKUPAINIKE
========================================================= */

.ps-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;

    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;

    place-items: center;

    color: var(--ps-modal-close-text, #fafafa);
    background: var(--ps-modal-close-background, #27417d);

    border: 0;
    border-radius: 50%;

    cursor: pointer;

    font-family: Arial, sans-serif;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.ps-modal__close:hover {
    background: var(--ps-modal-close-hover, #375cb2);
}

.ps-modal__close:focus-visible {
    outline: 3px solid #ffe700;
    outline-offset: 3px;
}

.ps-modal__close:active {
    transform: scale(.96);
}


/* =========================================================
   CONTACT FORM 7 MODAALISSA
========================================================= */

.ps-modal .wpcf7 {
    margin: 0;
}

.ps-modal .wpcf7 form {
    margin: 0;
}

.ps-modal .wpcf7 form > p {
    margin: 0 0 18px;
}

.ps-modal .wpcf7 form > p:last-of-type {
    margin-bottom: 0;
}

.ps-modal .wpcf7 label {
    display: block;

    color: var(--ps-modal-text-color, #fafafa);

    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.ps-modal .wpcf7-form-control-wrap {
    display: block;
    margin-top: 7px;
}

.ps-modal .wpcf7 input[type="text"],
.ps-modal .wpcf7 input[type="email"],
.ps-modal .wpcf7 input[type="tel"],
.ps-modal .wpcf7 input[type="url"],
.ps-modal .wpcf7 input[type="number"],
.ps-modal .wpcf7 input[type="date"],
.ps-modal .wpcf7 select,
.ps-modal .wpcf7 textarea {
    width: 100%;
    max-width: none;

    padding: 13px 15px;

    color: #151515;
    background: #fafafa;

    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 7px;

    box-shadow: none;

    font: inherit;
    font-size: 1rem;
    line-height: 1.45;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.ps-modal .wpcf7 textarea {
    min-height: 190px;
    resize: vertical;
}

.ps-modal .wpcf7 input[type="text"]:focus,
.ps-modal .wpcf7 input[type="email"]:focus,
.ps-modal .wpcf7 input[type="tel"]:focus,
.ps-modal .wpcf7 input[type="url"]:focus,
.ps-modal .wpcf7 input[type="number"]:focus,
.ps-modal .wpcf7 input[type="date"]:focus,
.ps-modal .wpcf7 select:focus,
.ps-modal .wpcf7 textarea:focus {
    border-color: #ffe700;
    outline: none;

    box-shadow:
        0 0 0 3px rgba(255, 231, 0, .2);
}

.ps-modal .wpcf7 input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;
    padding: 13px 28px;

    color: var(--ps-modal-submit-text, #fafafa);
    background: var(--ps-modal-submit-background, #27417d);

    border: 0;
    border-radius: 999px;

    cursor: pointer;

    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;

    transition:
        background-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.ps-modal .wpcf7 input[type="submit"]:hover {
    color: var(--ps-modal-submit-text, #fafafa);
    background: var(--ps-modal-submit-hover, #375cb2);
    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(0, 0, 0, .22);
}

.ps-modal .wpcf7 input[type="submit"]:focus-visible {
    outline: 3px solid #fafafa;
    outline-offset: 3px;
}

.ps-modal .wpcf7 .wpcf7-spinner {
    vertical-align: middle;
}

.ps-modal .wpcf7-not-valid-tip {
    margin-top: 6px;
    color: #ffb4b4;
    font-size: .9rem;
}

.ps-modal .wpcf7 form .wpcf7-response-output {
    margin: 20px 0 0;
    padding: 12px 14px;

    color: var(--ps-modal-text-color, #fafafa);

    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 7px;
}

.ps-modal .wpcf7 form.sent .wpcf7-response-output {
    border-color: #46b450;
}

.ps-modal .wpcf7 form.invalid .wpcf7-response-output,
.ps-modal .wpcf7 form.unaccepted .wpcf7-response-output,
.ps-modal .wpcf7 form.payment-required .wpcf7-response-output {
    border-color: #ffe700;
}


/* =========================================================
   MOBIILI
========================================================= */

@media (max-width: 600px) {
    .ps-modal {
        padding: 12px;
        align-items: center;
    }

    .ps-modal__dialog {
        width: 100%;
        max-height: 92vh;
        padding: 28px 20px 24px;

        border-radius: 10px;
    }

    .ps-modal__title {
        margin-right: 48px;
        margin-bottom: 22px;

        font-size: 1.6rem;
    }

    .ps-modal__close {
        top: 10px;
        right: 10px;

        width: 40px;
        height: 40px;
    }

    .ps-modal .wpcf7 textarea {
        min-height: 150px;
    }

    .ps-modal .wpcf7 input[type="submit"] {
        width: 100%;
    }
}
