// Block preview — disable link clicks so clicking selects the block.
.ecs-block-preview {
    a {
        pointer-events: none;
    }

    // Re-enable for calendar navigation and interactive elements
    .fc a,
    .fc button,
    .fc .fc-button,
    .ecs-events.calendar a {
        pointer-events: auto;
    }
}

// Sidebar settings container
.ecs-sidebar-settings {
    padding: 16px;
}

// Setting sections within the sidebar
.ecs-setting-section {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;

    &:empty {
        display: none;
    }

    &:first-child {
        padding-top: 0;
    }

    &:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .components-toggle-control {
        margin-bottom: 0;
    }

    // Add spacing between a toggle and its sub-options
    .components-toggle-control + *:not(.components-toggle-control) {
        margin-top: 8px;
    }
}

.ecs-setting-section-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: #757575;
    margin-bottom: 8px;
}

// Content Order
.ecs-contentorder-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 7px 0;
    padding: 2px 14px 2px 8px;
    width: fit-content;
    border: 1px solid #1e1e1e;
    border-radius: 3px;
    color: #1e1e1e;
    font-size: 13px;
    font-weight: bold;

    &.unchecked {
        background-color: #e5e5e5;
        color: #aaa;
    }

    &.inactive {
        opacity: 0.4;
        border-style: dashed;
    }
}

.ecs-contentorder-item-inner {
    margin-top: 3px;
    display: flex;
    align-items: center;
}

// FormTokenField fix
.components-form-token-field__label {
    display: none;
}

.components-form-token-field__suggestions-list {
    margin: 0;
    padding: 0;
}

// General Setting Input Text
.ecs-setting-text-field {
    display: flex;
    flex-direction: column;

    label {
        font-size: 13px;
    }
}

.ecs-setting-help {
    line-height: 1.4;
    font-size: 12px;
    color: #757575;
    margin-top: 8px;
}

// Key Value Setting
.ecs-key-value {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.ecs-kv-row {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;

    .ecs-key-value {
        flex: 1;
    }

    .ecs-kv-remove {
        margin-top: 24px;
        flex-shrink: 0;
    }
}

.ecs-kv-add {
    margin-top: 4px;
}

// Month Setting
.ecs-settings-month {
    display: flex;
    flex-direction: column;

    .ecs-setting-current {
        margin-bottom: 8px;
    }

    .ecs-setting-year-month {
        display: flex;
        align-items: center;

        .ecs-setting-text-field input {
            width: 60px;
        }

        .ecs-month-divider {
            width: 10px;
            height: 19px;
            margin: 0 10px;
            border-bottom: 1px solid black;
        }
    }
}

// Thumbnail
.ecs-settings-thumb {
    display: flex;
    flex-direction: column;

    .ecs-settings-thumb-width-height {
        display: flex;
        align-items: center;

        .ecs-setting-text-field input {
            width: 60px;
        }

        .ecs-thumb-divider {
            width: 10px;
            height: 19px;
            margin: 0 10px;

            em {
                white-space: nowrap;
            }
        }
    }

    .ecs-settings-thumb-size {
        margin-top: 5px;
    }

    .ecs-setting-help {
        margin-top: 5px;
    }
}
