/* Styling for siden /lag-innlegg/ */

.page-lag-innlegg .page-section {
    padding-top: clamp(3rem, 5vw, 5rem);
    padding-bottom: clamp(3rem, 5vw, 5rem);
}

.page-lag-innlegg .page-section--intro {
    background: linear-gradient(180deg, rgba(237, 237, 237, 0.78) 0%, rgba(237, 237, 237, 0.35) 100%);
}

.page-lag-innlegg .page-section--intro .content-wrap,
.page-lag-innlegg .page-section--form .content-wrap {
    max-width: 900px;
}

.page-lag-innlegg .content--page {
    margin: 0;
}

.page-lag-innlegg .content__header {
    margin-bottom: 1rem;
}

.page-lag-innlegg .content__title {
    margin-bottom: 0;
}

.page-lag-innlegg .content__body > *:first-child {
    margin-top: 0;
}

.page-lag-innlegg .page-section--form {
    background: var(--color-main);
    border-top: 1px solid rgba(37, 57, 65, 0.1);
}

.beskrivelse-skjema .content__body {
    font-size: 0.95rem;
    line-height: 1.65;
}

.beskrivelse-skjema .content__body > *:first-child {
    margin-top: 0;
}

.skjema-styling .gform_wrapper {
    width: 100%;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--color-main-alt);
    border: 1px solid rgba(37, 57, 65, 0.12);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(37, 57, 65, 0.08);
}

.skjema-styling .gform_wrapper form {
    margin: 0;
}

.skjema-styling .gform_wrapper .gform_heading {
    display: none;
}

.skjema-styling .gform_wrapper .gform_body {
    margin-top: 0;
}

.skjema-styling .gform_wrapper .gform_fields {
    row-gap: 1.15rem;
    column-gap: 1.25rem;
}

.skjema-styling .gform_wrapper .gfield_label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--color-main-font);
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.35;
}

.skjema-styling .gform_wrapper .gfield_required,
.skjema-styling .gform_wrapper .gfield_required_asterisk {
    margin-left: 0.2rem;
    color: var(--color-main-font-hover);
    font-weight: 700;
}

.skjema-styling .gform_wrapper .gfield_description,
.skjema-styling .gform_wrapper .ginput_counter,
.skjema-styling .gform_wrapper .gfield_checkbox .gfield_description,
.skjema-styling .gform_wrapper .gfield_radio .gfield_description,
.skjema-styling .gform_wrapper .gform_fileupload_rules {
    margin-top: 0.5rem;
    color: rgba(37, 57, 65, 0.74);
    font-size: 0.875rem;
    line-height: 1.45;
}

.skjema-styling .gform_wrapper .gfield {
    margin-top: 0 !important;
    margin-bottom: 0;
}

.skjema-styling .gform_wrapper input[type="text"],
.skjema-styling .gform_wrapper input[type="email"],
.skjema-styling .gform_wrapper input[type="tel"],
.skjema-styling .gform_wrapper input[type="url"],
.skjema-styling .gform_wrapper input[type="number"],
.skjema-styling .gform_wrapper input[type="password"],
.skjema-styling .gform_wrapper select,
.skjema-styling .gform_wrapper textarea {
    width: 100%;
    min-height: 52px;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(37, 57, 65, 0.18);
    border-radius: 14px;
    background: #fff;
    color: var(--color-main-font);
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skjema-styling .gform_wrapper textarea {
    min-height: 180px;
    resize: vertical;
}

.skjema-styling .gfield--type-post_content textarea,
.skjema-styling .gfield--type-post_content .mce-edit-area iframe,
.skjema-styling .gfield--type-post_content .wp-editor-area {
    min-height: 280px;
}

.skjema-styling .gfield--type-fileupload .ginput_container_fileupload {
    padding-top: 0.15rem;
}

.skjema-styling .gfield--type-fileupload input[type="file"] {
    width: 100%;
    min-height: 0;
    padding: 0.65rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.skjema-styling .gfield--type-fileupload input[type="file"]::file-selector-button {
    margin-right: 1rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-main-font-hover);
    border-radius: 4px;
    background: var(--color-main-font-hover);
    color: #fff;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.skjema-styling .gfield--type-fileupload input[type="file"]::file-selector-button:hover {
    background: transparent;
    color: var(--color-main-font-hover);
}

.skjema-styling .gfield--type-fileupload .ginput_preview_list,
.skjema-styling .gfield--type-fileupload .gfield_fileupload_filename {
    margin-top: 0.75rem;
}

.skjema-styling .gfield--type-fileupload .gfield_description {
    margin-top: 0.75rem;
}

.skjema-styling .gform_wrapper input[type="text"]:focus,
.skjema-styling .gform_wrapper input[type="email"]:focus,
.skjema-styling .gform_wrapper input[type="tel"]:focus,
.skjema-styling .gform_wrapper input[type="url"]:focus,
.skjema-styling .gform_wrapper input[type="number"]:focus,
.skjema-styling .gform_wrapper input[type="password"]:focus,
.skjema-styling .gform_wrapper select:focus,
.skjema-styling .gform_wrapper textarea:focus {
    outline: none;
    border-color: var(--color-main-font-hover);
    box-shadow: 0 0 0 4px rgba(188, 17, 47, 0.12);
}

.skjema-styling .gform_wrapper .gform_footer {
    margin-top: 1.5rem;
    padding-top: 0;
}

.skjema-styling .gform_wrapper .gform_button,
.skjema-styling .gform_wrapper input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    border: 1px solid var(--color-main-font-hover);
    border-radius: 4px;
    background: var(--color-main-font-hover);
    color: #fff;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.2s ease;
}

.skjema-styling .gform_wrapper .gform_button:hover,
.skjema-styling .gform_wrapper input[type="submit"]:hover {
    background: transparent;
    color: var(--color-main-font-hover);
    border-color: var(--color-main-font-hover);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 57, 65, 0.12);
}

.skjema-styling .gform_wrapper .gform_confirmation_message,
.skjema-styling .gform_wrapper .gform_confirmation_wrapper,
.skjema-styling .gform_wrapper .validation_message,
.skjema-styling .gform_wrapper .gfield_validation_message {
    margin-top: 0.5rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(188, 17, 47, 0.18);
    border-radius: 14px;
    background: rgba(188, 17, 47, 0.06);
    color: var(--color-main-font);
}

.gform_confirmation_wrapper {
    background: #fff;
    font-weight: 600;
    padding: 1em;
}

.skjema-styling .gform_wrapper .gform_validation_errors {
    margin: 0 0 1.25rem;
    border: 1px solid rgba(188, 17, 47, 0.18);
    border-radius: 16px;
    background: rgba(188, 17, 47, 0.06);
    box-shadow: none;
}

.skjema-styling .gform_wrapper .gform_validation_errors h2,
.skjema-styling .gform_wrapper .gform_validation_errors .gform_submission_error {
    color: var(--color-main-font);
}

.skjema-styling .gform_wrapper .gform_validation_errors .gform-icon {
    color: var(--color-main-font-hover);
}

.skjema-styling .gfield_error input[type="text"],
.skjema-styling .gfield_error input[type="email"],
.skjema-styling .gfield_error input[type="tel"],
.skjema-styling .gfield_error input[type="url"],
.skjema-styling .gfield_error input[type="number"],
.skjema-styling .gfield_error input[type="password"],
.skjema-styling .gfield_error select,
.skjema-styling .gfield_error textarea {
    border-color: rgba(188, 17, 47, 0.55);
    box-shadow: 0 0 0 4px rgba(188, 17, 47, 0.08);
}

.skjema-styling .gform_wrapper .wp-editor-wrap,
.skjema-styling .gform_wrapper .mce-tinymce,
.skjema-styling .gform_wrapper .quicktags-toolbar {
    border: 1px solid rgba(37, 57, 65, 0.18);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
}

.skjema-styling .gform_wrapper .mce-toolbar-grp,
.skjema-styling .gform_wrapper .mce-statusbar,
.skjema-styling .gform_wrapper .quicktags-toolbar {
    background: rgba(237, 237, 237, 0.55);
    border-color: rgba(37, 57, 65, 0.12);
}

.skjema-styling .gform_wrapper .mce-edit-area iframe,
.skjema-styling .gform_wrapper .mce-edit-area textarea,
.skjema-styling .gform_wrapper textarea.wp-editor-area {
    min-height: 280px;
    background: #fff;
}

.skjema-styling .gform_wrapper .wp-editor-area {
    border: 0;
    box-shadow: none;
}

@media only screen and (min-width: 992px) {
    .page-lag-innlegg .page-section--intro .content-wrap,
    .page-lag-innlegg .page-section--form .content-wrap {
        max-width: 920px;
    }

    .beskrivelse-skjema .content__body {
        font-size: 1rem;
        line-height: 1.7;
    }

    .skjema-styling .gform_wrapper {
        padding: 2.5rem;
    }
}
