/**
 * Theme Name: SEHB
 * Template:   twentytwentyfour
 * ...other header fields
 */

html {
    scroll-behavior: smooth;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Base styling for the contact form
.wpcf7 {
    margin: 0 auto;
    padding: 32px;
}
*/

/* Email obfuscation. Use <span class="email">email@example<b>.example</b>.com</span> */
span.email b {
    display: none;
}


/* Styling for labels */
.wpcf7 label,
.wpcf7 legend {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-top: 32px;
}

.wpcf7 .wpcf7-list-item label {
    margin-top: 0
}

.wpcf7 .nomargin {
    margin: 0;
}

.wpcf7 p {
    margin: 0;
}

.wpcf7 p.counter {
    color: var(--wp--preset--color--contrast-2)
}

.wpcf7 p.ingress {
    margin: 0 0 32px 0;
}

.wpcf7 p.veiledning {
    margin-top: 32px;
    font-weight: 400;
}

.wpcf7 p.confirm {
    margin: 32px 0;
}


/* Styling for input fields */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    padding: 16px;
    margin-top: 4px;
    border: 2px solid #ccc;
    border-radius: 5px;
    color: #000;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box;
    /* transition: border-color 0.3s ease; */
    font-family: Inter, sans-serif;
}

.wpcf7 input[type="date"] {
    padding: 16px;
    height: 55px;
    margin-top: 4px;
    border: 2px solid #ccc;
    border-radius: 5px;
    color: #000;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box;
    /* transition: border-color 0.3s ease; */
    font-family: Inter, sans-serif;
}


.wpcf7 input.wpcf7-not-valid[type="text"],
.wpcf7 input.wpcf7-not-valid[type="email"],
.wpcf7 input.wpcf7-not-valid[type="tel"],
.wpcf7 input.wpcf7-not-valid[type="url"],
.wpcf7 input.wpcf7-not-valid[type="number"],
.wpcf7 input.wpcf7-not-valid[type="date"],
.wpcf7 textarea.wpcf7-not-valid,
.wpcf7 select.wpcf7-not-valid {
    border-color: #c30000;
}



.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    border-color: #007bff;
    outline: none;
}

/* Styling for textarea */
.wpcf7 textarea {
    height: 150px;
    resize: vertical;
    font-family: Inter, sans-serif;
}

/* Styling for select */
.wpcf7 select {
    cursor: pointer;
    padding-right: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #000;
    appearance: none;
    background-image: url('/wp-content/themes/sehb/icons/arrow-down.svg');
    background-position: right 16px center;
    background-repeat: no-repeat;
}

/* Fix for select element styling in IE11 and Edge */
.wpcf7 select::-ms-expand {
    display: none;
}

/* Styling for helper text */

.wpcf7 .help-block {
    font-weight: 400;
    font-size: 16px;
    margin-top: 4px;
    display: block;
    color: var(--wp--preset--color--contrast-2);
}

/* Styling for ul */
ul {
    margin: 16px 0 16px 0;
}

/* Add margin-bottom for li */
ul li {
    margin-bottom: 8px;
    /* Adjust the value to your preference */
}

li.wp-block-navigation-item.wp-block-navigation-link {
    margin-bottom: 0;
}


/* Styling for fieldset */

.wpcf7 fieldset {
    border: none;
    margin: var(--wp--preset--spacing--20) 0 0 0;
    padding: 0;
}

.wpcf7 fieldset.margin-top40 {
    margin: var(--wp--preset--spacing--40) 0 0 0;
}

/* Styling for attachment fields */
.wpcf7 input[type="file"] {
    position: relative;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 32px;
    font-size: 16px;
}

.wpcf7 input[type="file"]::file-selector-button {
    width: 145px;
    color: transparent;
}

/* Faked label styles and icon */
.wpcf7 input[type="file"]::before {
    position: absolute;
    pointer-events: none;
    top: 17px;
    left: 16px;
    height: 20px;
    width: 20px;
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230964B0'%3E%3Cpath d='M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z'/%3E%3C/svg%3E");
}

.wpcf7 input[type="file"]::after {
    position: absolute;
    pointer-events: none;
    top: 18px;
    left: 40px;
    color: #0964b0;
    content: "Last opp fil";
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

/* file upload button */
.wpcf7 input[type="file"]::file-selector-button {
    border-radius: 5px;
    padding: 0 16px;
    height: 55px;
    cursor: pointer;
    background-color: white;
    border: 2px solid #ccc;
    margin-right: 16px;
    /* transition: background-color 200ms; */
}

/* file upload button hover state */
.wpcf7 input[type="file"]::file-selector-button:hover {
    background-color: var(--wp--preset--color--custom-sehb-4);
}

/* file upload button active state */
.wpcf7 input[type="file"]::file-selector-button:active {
    background-color: #e5e7eb;
}

/* Styling for submit button */
.wpcf7 input[type="submit"] {
    display: inline-block;
    padding: 16px 20px;
    font-family: Inter, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: var(--wp--preset--color--custom-sehb-2);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    /* transition: background-color 0.3s ease; */
}

/* Styling for form rows */

@media screen and (min-width: 768px) {
    .wpcf7 .form-row {
        display: flex;
        flex-wrap: wrap;
        gap: 32px;
        /* Adjust the gap between the fields */
    }
}

.wpcf7 .form-group {
    flex: 1;
}

.wpcf7 .form-group.first,
.wpcf7 .form-group.second {
    width: 50%;
    /* Adjust the width as needed */
}

/* 25 % width input */
@media screen and (min-width: 768px) {

    .wpcf7 input#fodselsnummer,
    .wpcf7 input#stillingsprosent,
    .wpcf7 input#avdelingsleder-tlf,
    .wpcf7 input#telefon {
        width: calc(25% - 16px);
        min-width: 150px;
    }
}

/* 150px % width input */
@media screen and (min-width: 768px) {
    .wpcf7 input#oppsigelsestid {
        width: 150px;
    }
}


/* Ensure the form fields are responsive on smaller screens */
@media (max-width: 768px) {

    .wpcf7 .form-group.first,
    .wpcf7 .form-group.second {
        width: 100%;
    }
}

.wpcf7 input[type="submit"]:hover {
    background-color: var(--wp--preset--color--custom-sehb-3)
}

/* Styling for error and success messages */


.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    margin-top: 20px;
    padding: 16px;
    border: 4px solid #c30000;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.wpcf7 .wpcf7-validation-errors {
    color: #c30000;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.wpcf7-not-valid-tip {
    color: #c30000;
    font-size: 1em;
    font-weight: 600;
    display: block;
}

.wpcf7 .wpcf7-mail-sent-ok {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .wpcf7 {
        padding: 0;
    }

    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 input[type="url"],
    .wpcf7 textarea,
    .wpcf7 select {
        font-size: 16px;
        padding: 16px;
    }
}

/* Styling for checkbox inputs */
.wpcf7 input[type="checkbox"] {
    width: 20px;
    height: 20px;
    transform: scale(1.5);
    margin-right: 8px;
    cursor: pointer;
}

/* Adjusting the label to align with the bigger checkbox */
.wpcf7 .wpcf7-acceptance label {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;

    span {
        margin-left: 8px;
    }
}

/* Responsive adjustments for checkbox inputs */
@media (max-width: 768px) {
    .wpcf7 input[type="checkbox"] {
        width: 20px;
        height: 20px;
        transform: scale(1.3);
    }

    .wpcf7 .wpcf7-list-item label {
        padding: 10px 4px;
    }
}

/* radio */

@media (min-width: 768px) {
    .wpcf7 .wpcf7-list-item {
        margin: 16px 0;
        display: block;
    }
}

@media (max-width: 768px) {
    .wpcf7 .wpcf7-list-item {
        margin: 2px 0;
        display: block;
    }
}


input[type="radio"] {
    cursor: pointer;
    -webkit-transform: scale(1.75);
    -moz-transform: scale(1.75);
    -ms-transform: scale(1.75);
    -o-transform: scale(1.75);
    transform: scale(1.75);
    margin-right: 10px;
    /* Adjust spacing between radio button and label */
}

.wpcf7 .wpcf7-list-item-label {
    font-weight: 400;
    cursor: pointer;
}


/* radio toggle buttons */
/* [radio avdeling use_label_element default:get class:togglebuttons "Blakstad" "Emma Hjorth" "Helgerud"]  */

@media screen and (min-width: 768px) {

    .wpcf7 .togglebuttons .wpcf7-list-item {
        margin: 6px 8px 0 0;
        display: inline-block;
    }

    .wpcf7 .togglebuttons>span input {
        opacity: 0;
        position: absolute;
        z-index: -1;
        /* Keep the input behind the label but still accessible */
    }

    .wpcf7 .togglebuttons>span .wpcf7-list-item-label {
        cursor: pointer;
        display: block;
        color: #000;
        border-radius: 4px;
        background: #ffffff;
        padding: 16px 32px;
        border: 2px solid #ccc;

        @media (max-width: 768px) {
            padding: 16px 28px;
        }

    }

    /* Style when the radio button is checked */
    .wpcf7 .togglebuttons>span input:checked+.wpcf7-list-item-label {
        background: var(--wp--preset--color--custom-sehb-2);
        border: 1px solid var(--wp--preset--color--custom-sehb-2);
        color: #ffffff;
        font-weight: bold;
    }

    /* Style when the label is focused (via keyboard navigation) */
    .wpcf7 .togglebuttons>span input:focus+.wpcf7-list-item-label {
        outline: 2px solid #0056b3;
        outline-offset: 2px;
        /* Space between the outline and label border */
    }

    /* Style when the label is hovered */
    .wpcf7 .togglebuttons>span .wpcf7-list-item-label:hover {
        background-color: var(--wp--preset--color--custom-sehb-4);
    }

}

/* legend styles */

.wpcf7 .h3 {
    font-size: var(--wp--preset--font-size--large);
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 16px;
}


/* menu icon */
button.wp-block-navigation__responsive-container-open.always-shown:before {
    content: "☰ ";
    padding-right: 4px;
    line-height: 100%;
    font-size: 18px;
}

/*button hovers*/
.wp-element-button:hover,
.wp-block-button__link:hover {
    background-color: var(--wp--preset--color--custom-sehb-3)
}

.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color, .has-background):hover {
    background-color: var(--wp--preset--color--custom-sehb-5);
    color: var(--wp--preset--color--contrast)
}

.wp-block-group.card.tw-stretched-link.is-layout-flow.wp-block-group-is-layout-flow:hover {
    background-color: var(--wp--preset--color--custom-sehb-5)
}

.kort:hover {
    background-color: var(--wp--preset--color--custom-sehb-5) !important
}

/* timeline */

ol.sehb.timeline {
    counter-reset: timeline-step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    height: auto;
    list-style: none;
    margin: 0 auto 4rem;
    max-width: 1120px;
    padding: 0;
    position: relative;
    width: 100%;
    grid-gap: 1rem 1rem
}

@media screen and (min-width: 25rem) {
    ol.sehb.timeline {
        grid-gap: 2rem 2rem
    }
}

@media screen and (min-width: 75rem) {
    ol.sehb.timeline {
        grid-gap: 2.5rem 2.5rem
    }
}

ol.sehb.timeline>li.sehb {
    align-items: flex-start;
    counter-increment: timeline-step;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: auto;
    justify-content: flex-start;
    margin: 0;
    min-height: 4rem;
    padding: 0 0 0 3.5rem;
    position: relative;
    width: 100%
}

@media (max-width: 768px) {
    ol.sehb.timeline>li.sehb {
        width: calc(100% - 48px);
    }
}


@media screen and (min-width: 25rem) {
    ol.sehb.timeline>li.sehb {
        align-items: center;
        min-height: 0;
        padding-left: 0
    }
}

@media screen and (min-width: 75rem) {
    ol.sehb.timeline>li.sehb {
        padding-top: 2.5rem
    }
}


ol.sehb.timeline>li.sehb .sehb.description {
    color: var(--wp--preset--color--contrast-2);
    display: inline-block;
    font-family: var(--wp--preset--font-family--body);
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1rem;
    max-width: 30ch;
    padding: 0;
    text-align: left
}

@media screen and (min-width: 25rem) {
    ol.sehb.timeline>li.sehb .sehb.description {
        font-size: .875rem;
        line-height: 1.25rem
    }
}

@media screen and (min-width: 75rem) {
    ol.sehb.timeline>li.sehb .sehb.description {
        font-size: .9375rem;
        line-height: 1.5rem
    }
}

@media screen and (min-width: 90rem) {
    ol.sehb.timeline>li.sehb .sehb.description {
        font-size: 1rem;
    }
}

@media screen and (min-width: 25rem) {
    ol.sehb.timeline>li.sehb .sehb.description {
        text-align: center
    }
}

ol.sehb.timeline>li.sehb :last-child {
    margin-bottom: 0;
}

ol.sehb.timeline .title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25rem;
}

ol.sehb.timeline>li.sehb:before {
    align-items: center;
    /* background-color: transparent; */
    /* background-color: #faf9f7; */
    border: 1pt solid var(--wp--preset--color--custom-sehb-5);
    border-radius: 100%;
    content: counter(timeline-step);
    display: block;
    display: flex;
    flex-grow: 0;
    flex-shrink: 0;
    font-size: 1.375rem;
    font-weight: 400;
    height: 2.5rem;
    justify-content: center;
    left: 0;
    line-height: 1.75rem;
    position: absolute;
    top: 0;
    width: 2.5rem;
    background-color: var(--wp--preset--color--custom-sehb-5);
}

@media screen and (min-width: 25rem) {
    ol.sehb.timeline>li.sehb:before {
        font-size: 1.5rem;
        height: 3rem;
        left: auto;
        line-height: 2rem;
        margin-bottom: 1.5rem;
        margin-right: 0;
        position: static;
        top: auto;
        width: 3rem
    }
}

ol.sehb.timeline>li.sehb:after {
    background-color: var(--wp--preset--color--custom-sehb-4);
    content: "";
    height: calc(100% - 2.5rem);
    left: 1.25rem;
    position: absolute;
    top: 3rem;
    width: .0625rem
}

@media screen and (min-width: 25rem) {
    ol.sehb.timeline>li.sehb:after {
        height: .0625rem;
        left: calc(50% + 3rem);
        top: 4rem;
        width: calc(100% - 3.5rem)
    }
}

ol.sehb.timeline>li.sehb:last-of-type:after {
    content: none
}

p.nowrap {
    white-space: nowrap;
}

/* Custom spinner CF7 */

/* First we hide the default CF7 loader */
.wpcf7-spinner::before {
    display: none;
}

.wpcf7-spinner {
    width: 24px;
    height: 24px;
    border: 4px #ddd solid;
    border-top: 4px #2e93e6 solid;
    border-radius: 50%;
    animation: sp-anime 0.8s infinite linear;
    background-color: unset;
    opacity: 1;
    top: 10px !important
}

@keyframes sp-anime {
    100% {
        transform: rotate(360deg);
    }
}