.d4p-settings-section {
    h4 {
        padding: .75em .75em .75em 1.5em;
        border-bottom: 1px solid #DDD;
        border-top: 1px solid #DDD;
        background-color: #EEE;
        color: #111;
        margin: 0;
        font-size: 1em;
        font-weight: 400;
        letter-spacing: 1px;

        span {
            font-size: 1.2em;
        }
    }

    &:first-child {
        h4 {
            border-top: 0;
        }
    }

    &.d4p-switch-section-is-hidden {
        display: none;
    }

    .d4p-settings-table {
        margin: 0;

        > tbody {
            > tr {
                > th,
                > td {
                    border-bottom: 1px solid var(--d4p-color-main-border);
                    text-align: left;
                    vertical-align: top;
                    line-height: 1.8;
                }

                > th {
                    width: 30%;
                    padding: 1.5em;
                    font-size: 1em;

                    span {
                        font-size: 1.2em;
                        font-weight: 400;
                    }
                }

                > td {
                    padding: 1.5em 1.5em 1.5em 0;
                }

                &.d4p-switch-option-is-hidden {
                    display: none;
                }

                &:last-child {
                    > th,
                    > td {
                        border-bottom: 0;
                    }
                }
            }
        }

        @media screen and (max-width: 840px) {
            > tbody {
                > tr {
                    > th,
                    > td {
                        width: 100%;
                        padding: 1.5em;
                        display: block;
                    }

                    > th {
                        border-bottom: 0;
                        padding-bottom: 0;
                    }
                }
            }
        }

        .d4p-setting-wrapper {
            position: relative;

            .d4p-field-clear-button {
                position: absolute;
                top: .2em;
                right: .2em;
                line-height: 1;
                font-size: 1.2em;
                cursor: default;
                border: 0;
                padding: 4px;
                background: transparent;
                opacity: .1;

                &.__active {
                    opacity: .9;
                    cursor: pointer;
                }

                @media screen and (max-width: 768px) {
                    top: .3em;
                }
            }

            label {
                line-height: 1.8;
            }

            input[type=datetime-local],
            input[type=datetime],
            input[type=number],
            input[type=text],
            input[type=url],
            input[type=email],
            input[type=password] {
                border-radius: var(--d4p-layout-main-border-radius);
                padding: .3em .8em;
                width: 100%;
            }

            input[type=time],
            input[type=month],
            input[type=number] {
                width: 40%;
            }

            textarea {
                min-height: 100px;
                height: 160px;
                resize: vertical;
            }

            select {
                border-radius: var(--d4p-layout-main-border-radius);
                padding: .3em 2em .3em .8em;
                max-width: 100%;
            }

            .d4p-buttons-wrapper {
                margin: 1em 0 0;

                > * {
                    margin-right: .5em;
                }
            }

            .d4p-more-wrapper {
                margin: 1em 0 0;
                border: 1px solid #DDD;
                border-radius: var(--d4p-layout-main-border-radius);

                .d4p-more-title {
                    background: #E4E4E4;
                    padding: .5em;
                    font-weight: 500;

                    i {
                        cursor: pointer;
                        font-size: 1.3em;
                    }

                    button {
                        background: none;
                        border: 0;
                        margin: 0;
                        padding: 0;
                        cursor: pointer;
                    }
                }

                .d4p-more-content {
                    display: none;
                    padding: 1em;

                    p {
                        margin: 0 0 1em;

                        &:last-child {
                            margin: 0;
                        }
                    }

                    ul {
                        list-style: disc outside;
                        margin: 0 0 0 1.5em;
                    }

                    table {
                        margin: 0;
                        width: 100%;
                        border-collapse: collapse;
                        clear: both;

                        tr {
                            td {
                                padding: 5px 10px;
                                margin: 0;
                                vertical-align: middle;
                            }
                        }
                    }
                }

                &.__is-open {
                    i {
                        transform: rotate(90deg);
                    }

                    .d4p-more-content {
                        display: block
                    }
                }
            }

            .d4p-content-wrapper {
                border: 1px solid #DDD;
                padding: .5em 1em;
                max-height: 160px;
                overflow: auto;

                .d4p-wrapper-hierarchy {
                    margin: 0;

                    li {
                        margin: .3em 0;
                    }

                    ul.children {
                        margin-left: 1em;
                    }
                }
            }

            .d4p-description {
                margin: 1em 0 0 0;
                padding: 0;
                display: block;
                font-size: 1em;
                font-style: italic;
            }

            &.d4p-setting-color {
                .wp-picker-input-wrap {
                    input[type=text] {
                        width: 5rem;
                    }

                    input[type=button] {
                        line-height: 3.1em;
                    }
                }

                .wp-color-result {
                    padding-left: 4em;
                    margin: 0 1em 0 0;
                }
            }

            &.d4p-setting-range_integer,
            &.d4p-setting-range_absint,
            &.d4p-setting-x_by_y {
                input {
                    width: 25%;
                }
            }

            &.d4p-setting-checkboxes,
            &.d4p-setting-checkboxes_group,
            &.d4p-setting-radios {
                label {
                    display: block;
                    margin: 0 0 4px;
                }
            }

            &.d4p-setting-checkboxes_group {
                .d4p-group-title {
                    font-weight: bold;
                    font-size: 1.1em;
                    line-height: 2;
                }
            }

            &.d4p-setting-expandable_raw,
            &.d4p-setting-expandable_text {
                ol {
                    list-style: none;
                    margin: 0 0 .5em;
                }

                .exp-text-element {
                    display: flex;
                    align-items: center;
                    flex-wrap: nowrap;
                    column-gap: 1em;

                    button {
                        line-height: 2;
                        padding: .3em 1em;

                        i {
                            vertical-align: top;
                            font-size: 1.4em;
                            margin-top: 0.25em;
                        }
                    }
                }
            }

            &.d4p-setting-css_size {
                input[type=number] {
                    width: 80px;
                    vertical-align: top;
                    margin-right: .5em;
                }

                select {
                    width: 80px;
                    vertical-align: top;
                }
            }

            &.d4p-setting-expandable_pairs {
                .d4p-expandable-pairs-layout-normal {
                    .d4p-expandable-pairs-inside {
                        .d4p-element-pair-single {
                            border: 1px solid #CCC;
                            padding: 10px;
                            margin: 0 0 10px;

                            a {
                                font-size: .9em;
                            }

                            input {
                                margin: 0 0 5px;
                            }
                        }
                    }
                }

                .d4p-expandable-pairs-layout-inline {
                    .d4p-expandable-pairs-inside {
                        margin: 0 0 1em;

                        .d4p-element-pair-single {
                            display: flex;
                            flex-wrap: nowrap;
                            align-items: center;
                            gap: 5px;
                            margin-bottom: 5px;

                            &:first-child {
                                border-bottom: 3px solid #DDD;
                                font-weight: bold;
                            }

                            > div {
                                flex-grow: 1;
                                flex-basis: calc((100% - 36px) / 2);
                            }

                            > span {
                                flex-shrink: 1;
                                min-width: 36px;
                                display: block;

                                a {
                                    display: block;
                                    padding: 4px 12px;
                                    text-align: center;
                                }
                            }
                        }
                    }
                }
            }

            @media screen and (max-width: 840px) {
                input[type=time],
                input[type=month],
                input[type=number] {
                    width: 60%;
                }

                .d4p-check-uncheck {
                    font-size: 1.1em;
                }

                &.d4p-setting-css_size {
                    input[type=number] {
                        width: 50%;
                    }

                    select {
                        display: inline;
                    }
                }
            }

            @media screen and (max-width: 768px) {
                &.d4p-setting-color {
                    .wp-picker-input-wrap {
                        input[type=button] {
                            line-height: 2.8em;
                        }
                    }

                    .wp-color-result {
                        line-height: 2.8em;
                    }
                }
            }

            @media screen and (max-width: 480px) {
                input[type=time],
                input[type=month],
                input[type=number] {
                    width: 100%;
                }

                &.d4p-setting-css_size {
                    input[type=number] {
                        width: 50%;
                    }
                }
            }
        }

        .d4p-settings-item-error {
            th {
                border-left: 3px solid #D00 !important;
                padding: 10px !important;
                background-color: #FFEBEB;
            }

            td {
                padding: 10px 10px 10px 0 !important;
                background-color: #FFEBEB;
            }
        }
    }
}

details.d4p-section-details {
    margin: 10px 0 0;
    border: 1px solid #DDD;

    summary {
        background-color: #DDD;
        padding: 5px;
        color: #222;
        cursor: pointer;
    }

    > div {
        padding: 10px;
        overflow: auto;
        height: 160px;

        .form-table {
            margin: 0;

            > tbody {
                > tr {
                    > * {
                        line-height: 22px;
                        width: auto;
                        padding: 2px 0;
                    }
                }
            }

            code {
                font-style: normal;
            }
        }
    }
}

.dev4press-info-default-value {
    background-color: #EEE;
    font-family: monospace;
    color: #111;
    display: inline-block;
    padding: 1px 7px;
}

.d4p-group-separator {
    margin: 0;
    float: left;
    text-align: left;
    max-width: 920px;
    width: 100%;
    clear: both;
    overflow: auto;

    h3 {
        border-bottom: 2px solid #CCC;
        text-transform: uppercase;
        margin: 0 0 30px;
        font-size: 22px;
        line-height: 24px;

        > span {
            padding: 0 15px 2px;
            position: relative;
            top: 12px;
            background: #CCC;
            color: #111;
            font-weight: bold;
            margin: 0 0 0 30px;
        }
    }
}

.d4p-feature-group-break {
    margin: 0 0 2em;
    padding: 0;
    border-bottom: 1px solid #555;

    h3 {
        border-radius: var(--d4p-layout-main-border-radius) var(--d4p-layout-main-border-radius) 0 0;
        background-color: #555;
        color: #FFF;
        display: inline-block;
        font-size: 1.3em;
        font-weight: 300;
        line-height: 1.7;
        letter-spacing: 1px;
        margin: 0;
        padding: .4em 1.2em;

        i {
            margin: 0 7px 0 0;
            font-size: 16px;
        }
    }
}

.d4p-feature-break {
    margin: 0 0 2em;
    padding: 0;

    h2 {
        border-radius: var(--d4p-layout-main-border-radius) var(--d4p-layout-main-border-radius) 0 0;
        background-color: #555;
        color: #FFF;
        display: inline-block;
        font-size: 1.5em;
        font-weight: 300;
        line-height: 1.7;
        letter-spacing: 1px;
        margin: 0;
        padding: .5em 1em;

        i {
            margin: 0 7px 0 0;
            font-size: 18px;
        }
    }

    .d4p-feature-break-info {
        border-top: 2px solid #555;

        div {
            font-size: 1.2em;
            padding: .5em 1em;
            background: #DDD;
        }
    }
}
